From 1610296f54c767c28090b32e7e361931b2ac03b5 Mon Sep 17 00:00:00 2001
From: Pheng Heong TAN <phtan90@gmail.com>
Date: Sun, 8 Apr 2018 08:54:21 +0800
Subject: [PATCH] Modify pagination. (#3766)

I wanted navigation to the page "first" and the page
"last" of the pages of commits. I discovered this
has already been implemented in one of the templates.

Signed-off-by: Tan Pheng Heong <phtan90@gmail.com>
---
 templates/repo/commits_table.tmpl | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index 8a8e2c369e..ec433974c9 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -79,24 +79,4 @@
 	</div>
 {{end}}
 
-{{with .Page}}
-	{{if gt .TotalPages 1}}
-		<div class="center page buttons">
-			<div class="ui borderless pagination menu">
-				<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchNameSubURL}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
-					<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
-				</a>
-				{{range .Pages}}
-					{{if eq .Num -1}}
-						<a class="disabled item">...</a>
-					{{else}}
-						<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchNameSubURL}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a>
-					{{end}}
-				{{end}}
-				<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchNameSubURL}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}>
-					{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
-				</a>
-			</div>
-		</div>
-	{{end}}
-{{end}}
+{{template "base/paginate" .}}
\ No newline at end of file