diff options
author | Alexey Terentyev <terentyev.alexey@gmail.com> | 2018-05-24 04:03:42 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-24 09:03:42 +0800 |
commit | b908ac9fab141b72f38db3d40a9f6054bb701982 (patch) | |
tree | 11a91f0a12fa32b0fa834d0388949fb59d13f4a2 /templates/explore | |
parent | ea2a938e8a25588634364b3bc6ce8d6634ae4c60 (diff) | |
download | gitea-b908ac9fab141b72f38db3d40a9f6054bb701982.tar.gz gitea-b908ac9fab141b72f38db3d40a9f6054bb701982.zip |
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 <axifnx@gmail.com>
* Renamed search repo template
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
Diffstat (limited to 'templates/explore')
-rw-r--r-- | templates/explore/repo_search.tmpl | 29 | ||||
-rw-r--r-- | templates/explore/repos.tmpl | 2 |
2 files changed, 30 insertions, 1 deletions
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 @@ +<div class="ui right floated secondary filter menu"> + <!-- Sort --> + <div class="ui right dropdown type jump item"> + <span class="text"> + {{.i18n.Tr "repo.issues.filter_sort"}} + <i class="dropdown icon"></i> + </span> + <div class="menu"> + <a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a> + <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a> + <a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> + <a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> + <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a> + <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a> + <a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a> + <a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a> + <a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a> + <a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a> + </div> + </div> +</div> +<form class="ui form ignore-dirty" style="max-width: 90%"> + <div class="ui fluid action input"> + <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> + <input type="hidden" name="tab" value="{{$.TabName}}"> + <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> + </div> +</form> +<div class="ui divider"></div> 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 @@ <div class="explore repositories"> {{template "explore/navbar" .}} <div class="ui container"> - {{template "explore/search" .}} + {{template "explore/repo_search" .}} {{template "explore/repo_list" .}} {{template "base/paginate" .}} </div> |