summaryrefslogtreecommitdiffstats
path: root/routers/home.go
diff options
context:
space:
mode:
authorJorrit Klein Bramel <drsect0r@users.noreply.github.com>2017-05-02 10:34:28 +0200
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-05-02 16:34:28 +0800
commit87efc8c6d4dbcbfb1e814091b16ae84c8564678c (patch)
tree7b475eb2297c97bb95229adde132c1fd24f6da53 /routers/home.go
parent3792867955f590661469cc23c16e14e9d6fabb85 (diff)
downloadgitea-87efc8c6d4dbcbfb1e814091b16ae84c8564678c.tar.gz
gitea-87efc8c6d4dbcbfb1e814091b16ae84c8564678c.zip
Sort on repo size in admin panel (#1654)
* fix #1653 sort on repo size * fix minor mistake in en-us locale
Diffstat (limited to 'routers/home.go')
-rw-r--r--routers/home.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/home.go b/routers/home.go
index 9fa565b217..c02bd813fa 100644
--- a/routers/home.go
+++ b/routers/home.go
@@ -94,6 +94,10 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
orderBy = "name DESC"
case "alphabetically":
orderBy = "name ASC"
+ case "reversesize":
+ orderBy = "size DESC"
+ case "size":
+ orderBy = "size ASC"
default:
orderBy = "created_unix DESC"
}