diff --git a/public/css/style.css b/public/css/style.css
index e6c98d07..4e766db8 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -202,6 +202,10 @@ div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:last-of-typ
{
width: 12rem;
}
+#mainmenu .navbar-form select.form-control#max
+{
+ width: 8rem;
+}
.special-img
{
position: relative;
diff --git a/router/templateFunctions.go b/router/templateFunctions.go
index d1b3fe54..5789d194 100644
--- a/router/templateFunctions.go
+++ b/router/templateFunctions.go
@@ -36,6 +36,24 @@ var FuncMap = template.FuncMap{
}
return "error"
},
+ "genSearchWithOrdering": func(currentUrl url.URL, sortBy string) template.URL {
+ values := currentUrl.Query()
+ order := false
+ if _, ok := values["order"]; ok {
+ order, _ = strconv.ParseBool(values["order"][0])
+ if values["sort"][0]==sortBy {
+ order=!order //Flip order by repeat-clicking
+ } else {
+ order=false //Default to descending when sorting by something new
+ }
+ }
+ values.Set("sort", sortBy)
+ values.Set("order", strconv.FormatBool(order))
+
+ currentUrl.RawQuery=values.Encode()
+
+ return template.URL(currentUrl.String())
+ },
"genNav": func(nav Navigation, currentUrl *url.URL, pagesSelectable int) template.HTML {
var ret = ""
if (nav.TotalItem > 0) {
diff --git a/templates/_search.html b/templates/_search.html
index aaf6240e..d737f16d 100644
--- a/templates/_search.html
+++ b/templates/_search.html
@@ -31,24 +31,7 @@
-
-{{end}}
-{{define "search_advanced"}}
-
-
-