aboutsummaryrefslogtreecommitdiffstats
path: root/templates/explore
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-11-07 11:44:49 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-11-07 12:44:29 +0100
commit562f9b6eae72e3f952a2ce1e74249bcd44e69272 (patch)
tree4646fa27320196cf547a9081ccbf83b9a6484e6a /templates/explore
parent86fb1a0cb13de00a5ba49e29efa35573c01c9821 (diff)
downloadgitea-562f9b6eae72e3f952a2ce1e74249bcd44e69272.tar.gz
gitea-562f9b6eae72e3f952a2ce1e74249bcd44e69272.zip
Merge all pagination-templates into 'base/paginate'
to reduce code-duplicity
Diffstat (limited to 'templates/explore')
-rw-r--r--templates/explore/organizations.tmpl2
-rw-r--r--templates/explore/page.tmpl21
-rw-r--r--templates/explore/repos.tmpl2
-rw-r--r--templates/explore/users.tmpl2
4 files changed, 3 insertions, 24 deletions
diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl
index 6953414e85..c44456be4c 100644
--- a/templates/explore/organizations.tmpl
+++ b/templates/explore/organizations.tmpl
@@ -27,7 +27,7 @@
{{end}}
</div>
- {{template "explore/page" .}}
+ {{template "base/paginate" .}}
</div>
</div>
</div>
diff --git a/templates/explore/page.tmpl b/templates/explore/page.tmpl
deleted file mode 100644
index fd3e7a7a82..0000000000
--- a/templates/explore/page.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-{{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="{{$.Link}}?page={{.Previous}}&q={{$.Keyword}}"{{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="{{$.Link}}?page={{.Num}}&q={{$.Keyword}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}&q={{$.Keyword}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
- </a>
- </div>
- </div>
- {{end}}
-{{end}}
diff --git a/templates/explore/repos.tmpl b/templates/explore/repos.tmpl
index 080a5076f1..eac3f1d26c 100644
--- a/templates/explore/repos.tmpl
+++ b/templates/explore/repos.tmpl
@@ -6,7 +6,7 @@
<div class="twelve wide column content">
{{template "explore/search" .}}
{{template "explore/repo_list" .}}
- {{template "explore/page" .}}
+ {{template "base/paginate" .}}
</div>
</div>
</div>
diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl
index c13ccc6977..ce356f4fde 100644
--- a/templates/explore/users.tmpl
+++ b/templates/explore/users.tmpl
@@ -27,7 +27,7 @@
{{end}}
</div>
- {{template "explore/page" .}}
+ {{template "base/paginate" .}}
</div>
</div>
</div>