From b908ac9fab141b72f38db3d40a9f6054bb701982 Mon Sep 17 00:00:00 2001 From: Alexey Terentyev Date: Thu, 24 May 2018 04:03:42 +0300 Subject: Added repository search ordered by stars or forks. Forks column in admin repo list. (#3969) * Added repository search order by stars or forks. Added Forks column to admin repository list. Signed-off-by: Alexey Terentyev * Renamed search repo template Signed-off-by: Alexey Terentyev --- templates/admin/base/search.tmpl | 2 -- templates/admin/repo/list.tmpl | 4 +++- templates/admin/repo/search.tmpl | 29 +++++++++++++++++++++++++++++ templates/explore/repo_search.tmpl | 29 +++++++++++++++++++++++++++++ templates/explore/repos.tmpl | 2 +- templates/user/profile.tmpl | 4 ++-- 6 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 templates/admin/repo/search.tmpl create mode 100644 templates/explore/repo_search.tmpl (limited to 'templates') diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 7d23e51c89..b817a8ad79 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -12,8 +12,6 @@ {{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}} {{.i18n.Tr "repo.issues.filter_sort.recentupdate"}} {{.i18n.Tr "repo.issues.filter_sort.leastupdate"}} - {{.i18n.Tr "repo.issues.label.filter_sort.by_size"}} - {{.i18n.Tr "repo.issues.label.filter_sort.reverse_by_size"}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 86d6b80426..f706eaa1c8 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -7,7 +7,7 @@ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
- {{template "admin/base/search" .}} + {{template "admin/repo/search" .}}
@@ -19,6 +19,7 @@ + @@ -34,6 +35,7 @@ + diff --git a/templates/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl new file mode 100644 index 0000000000..8e69f7c388 --- /dev/null +++ b/templates/admin/repo/search.tmpl @@ -0,0 +1,29 @@ + + +
+ + +
+ diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl new file mode 100644 index 0000000000..de0b63e077 --- /dev/null +++ b/templates/explore/repo_search.tmpl @@ -0,0 +1,29 @@ + + +
+ + + +
+ +
diff --git a/templates/explore/repos.tmpl b/templates/explore/repos.tmpl index 9ca9879103..c728219d3e 100644 --- a/templates/explore/repos.tmpl +++ b/templates/explore/repos.tmpl @@ -2,7 +2,7 @@
{{template "explore/navbar" .}}
- {{template "explore/search" .}} + {{template "explore/repo_search" .}} {{template "explore/repo_list" .}} {{template "base/paginate" .}}
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 837f8bd949..915da555be 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -100,12 +100,12 @@
{{else if eq .TabName "stars"}}
- {{template "explore/search" .}} + {{template "explore/repo_search" .}} {{template "explore/repo_list" .}} {{template "base/paginate" .}}
{{else}} - {{template "explore/search" .}} + {{template "explore/repo_search" .}} {{template "explore/repo_list" .}} {{template "base/paginate" .}} {{end}} -- cgit v1.2.3
{{.i18n.Tr "admin.repos.private"}} {{.i18n.Tr "admin.repos.watches"}} {{.i18n.Tr "admin.repos.stars"}}{{.i18n.Tr "admin.repos.forks"}} {{.i18n.Tr "admin.repos.issues"}} {{.i18n.Tr "admin.repos.size"}} {{.i18n.Tr "admin.users.created"}} {{.NumWatches}} {{.NumStars}}{{.NumForks}} {{.NumIssues}} {{SizeFmt .Size}} {{.CreatedUnix.FormatShort}}