search notify where we are searching
This commit is contained in:
@@ -250,6 +250,13 @@ async fn run_search(
|
||||
// Numeric form so the <select> can mark the active option (Tera can't
|
||||
// compare a string param against a numeric category id).
|
||||
"selected_category_id": selected_category.parse::<i32>().unwrap_or(-1),
|
||||
// Display name of the active category, so the search bar can show that
|
||||
// the query is scoped to it. `None` for "all"/"none" (the template maps
|
||||
// "none" to the localized "uncategorized" label itself).
|
||||
"selected_category_name": selected_category
|
||||
.parse::<i32>()
|
||||
.ok()
|
||||
.and_then(|id| category_name.get(&id).cloned()),
|
||||
"uncategorized_count": uncategorized_count,
|
||||
"sort": sort,
|
||||
"per_page": per_page,
|
||||
|
||||
Reference in New Issue
Block a user