From 4bfc71c73fae3718158f20775c908dfc05e98fea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20San=20Juli=C3=A1n?= <fjsanjulian@hotmail.com>
Date: Thu, 30 Jul 2015 22:14:52 +0200
Subject: [PATCH] pagination in repo issues page only if needed

---
 templates/repo/issue/list.tmpl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 72667625e..21da0f543 100644
--- a/templates/repo/issue/list.tmpl
+++ b/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" .}}
\ No newline at end of file
+{{template "base/footer" .}}