瀏覽代碼

Disable GIN header if repo is bare/uninitialised

Uninitialised repository shouldn't try to display any DOI related
buttons or information.
Achilleas Koutsou 5 年之前
父節點
當前提交
72acf8a8d9
共有 1 個文件被更改,包括 3 次插入1 次删除
  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}}