diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 515ce72a21..6f4866e373 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -667,6 +667,8 @@ issues.label_deletion_desc = Deleting this label will remove its information in
issues.label_deletion_success = This label has been deleted successfully!
issues.label.filter_sort.alphabetically = Alphabetically
issues.label.filter_sort.reverse_alphabetically = Reverse alphabetically
+issues.label.filter_sort.by_size = Size
+issues.label.filter_sort.reverse_by_size = Reverse size
issues.num_participants = %d Participants
issues.attachment.open_tab = `Click to see "%s" in a new tab`
issues.attachment.download = `Click to download "%s"`
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"
}
diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl
index 9e450ee367..5491d6b94a 100644
--- a/templates/admin/base/search.tmpl
+++ b/templates/admin/base/search.tmpl
@@ -12,6 +12,8 @@
{{.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"}}