aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin/org
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/org
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/org')
-rw-r--r--templates/admin/org/list.tmpl12
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl
index fc512f2ad9..4f6bc50342 100644
--- a/templates/admin/org/list.tmpl
+++ b/templates/admin/org/list.tmpl
@@ -16,12 +16,18 @@
<table class="ui very basic striped table">
<thead>
<tr>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.orgs.name"}}</th>
+ <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
+ <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
+ {{.i18n.Tr "admin.orgs.name"}}
+ {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
+ </th>
<th>{{.i18n.Tr "admin.orgs.teams"}}</th>
<th>{{.i18n.Tr "admin.orgs.members"}}</th>
<th>{{.i18n.Tr "admin.users.repos"}}</th>
- <th>{{.i18n.Tr "admin.users.created"}}</th>
+ <th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate">
+ {{.i18n.Tr "admin.users.created"}}
+ {{SortArrow "recentupdate" "leastupdate" $.SortType false}}
+ </th>
<th>{{.i18n.Tr "admin.users.edit"}}</th>
</tr>
</thead>