소스 검색

pagination in repo issues page only if needed

Fernando San Julián 9 년 전
부모
커밋
4bfc71c73f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      templates/repo/issue/list.tmpl

+ 3 - 1
templates/repo/issue/list.tmpl

@@ -87,6 +87,7 @@
       {{end}}
 			
 			{{with .Page}}
+			{{if gt .Total 1}}
 			<div class="center page buttons">
 				<div class="ui borderless pagination menu">
 				  <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&page={{.Previous}}"{{end}}>
@@ -105,7 +106,8 @@
 				</div>
 			</div>
 			{{end}}
+			{{end}}
 		</div>
 	</div>
 </div>
-{{template "base/footer" .}}
+{{template "base/footer" .}}