Selaa lähdekoodia

Disable GIN header if repo is bare/uninitialised

Uninitialised repository shouldn't try to display any DOI related
buttons or information.
Achilleas Koutsou 5 vuotta sitten
vanhempi
commit
72acf8a8d9
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      templates/repo/header_gin.tmpl

+ 3 - 1
templates/repo/header_gin.tmpl

@@ -1,4 +1,5 @@
-{{if or $.DOI $.IsRepositoryAdmin}} {{/* Show DOI buttons or badge */}}
+{{if not $.IsBareRepo}}
+	{{if or $.DOI $.IsRepositoryAdmin}} {{/* Show DOI buttons or badge */}}
 					{{if $.IsRepositoryAdmin}}
 						{{if $.IsDOIReady}} {{/* Ready to (re)register: Show button */}}
 							<a class="ui basic button" href="/{{.Repository.Owner.Name}}/{{.Repository.Name}}/doi"><i class="octicon octicon-squirrel"></i> Request {{if $.DOI}}New{{end}} DOI</a>
@@ -30,4 +31,5 @@
 			<div class="column"><!-- start column -->
 				<div class="ui header">
 					<div class="ui right">
+	{{end}}
 {{end}}