aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin/repo
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-06-25 00:23:05 +0200
committerGitHub <noreply@github.com>2020-06-24 23:23:05 +0100
commitc86478ec47366dfb7081cc2eb2790a0af1880eca (patch)
tree6301cdfabec3f619cd61e673fa9bef3802a16b82 /templates/admin/repo
parentae20de7771d81d76ff62227e464a699d55c62084 (diff)
downloadgitea-c86478ec47366dfb7081cc2eb2790a0af1880eca.tar.gz
gitea-c86478ec47366dfb7081cc2eb2790a0af1880eca.zip
[UI] Sortable Tables Header By Click (#7980)
* [UI] Sortable Tables Header By Click * get rid of padding above header * restart CI * fix lint * convert getArrow JS to SortArrow go func * addopt SortArrow funct * suggestions from @silverwind - tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates/admin/repo')
-rw-r--r--templates/admin/repo/list.tmpl22
1 files changed, 17 insertions, 5 deletions
diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl
index f946b8a461..b9b8865382 100644
--- a/templates/admin/repo/list.tmpl
+++ b/templates/admin/repo/list.tmpl
@@ -13,15 +13,27 @@
<table class="ui very basic striped table">
<thead>
<tr>
- <th>ID</th>
+ <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
<th>{{.i18n.Tr "admin.repos.owner"}}</th>
- <th>{{.i18n.Tr "admin.repos.name"}}</th>
+ <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
+ {{.i18n.Tr "admin.repos.name"}}
+ {{SortArrow "alphabetically" "reversealphabetically" $.SortType false}}
+ </th>
<th>{{.i18n.Tr "admin.repos.private"}}</th>
<th>{{.i18n.Tr "admin.repos.watches"}}</th>
- <th>{{.i18n.Tr "admin.repos.stars"}}</th>
- <th>{{.i18n.Tr "admin.repos.forks"}}</th>
+ <th data-sortt-asc="moststars" data-sortt-desc="feweststars">
+ {{.i18n.Tr "admin.repos.stars"}}
+ {{SortArrow "moststars" "feweststars" $.SortType false}}
+ </th>
+ <th data-sortt-asc="mostforks" data-sortt-desc="fewestforks">
+ {{.i18n.Tr "admin.repos.forks"}}
+ {{SortArrow "mostforks" "fewestforks" $.SortType false}}
+ </th>
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
- <th>{{.i18n.Tr "admin.repos.size"}}</th>
+ <th data-sortt-asc="size" data-sortt-desc="reversesize">
+ {{.i18n.Tr "admin.repos.size"}}
+ {{SortArrow "size" "reversesize" $.SortType false}}
+ </th>
<th>{{.i18n.Tr "admin.users.created"}}</th>
<th>{{.i18n.Tr "admin.notices.op"}}</th>
</tr>