Commit 96eb98d6 authored by Robert Czechowski's avatar Robert Czechowski Committed by Robert Czechowski
Browse files

Admin page: Show hint to more results if not all results are shown

parent b4f1193f
Pipeline #639 canceled with stage
......@@ -1076,8 +1076,18 @@ pub fn admin_search_users<T: MedalConnection>(conn: &T, session_token: &str,
let mut data = json_val::Map::new();
match conn.get_search_users(s_data) {
Ok(users) => data.insert("users".to_string(), to_json(&users)),
Err(groups) => data.insert("groups".to_string(), to_json(&groups)),
Ok(users) => {
data.insert("users".to_string(), to_json(&users));
if users.len() >= 30 {
data.insert("more_users".to_string(), to_json(&true));
}
},
Err(groups) => {
data.insert("groups".to_string(), to_json(&groups));
if groups.len() >= 30 {
data.insert("more_groups".to_string(), to_json(&true));
}
}
};
Ok(("admin_search_results".to_string(), data))
......
......@@ -3,16 +3,24 @@
<h2>Benutzer</h2>
<ul>
{{#each users}}
<li><a href="{{this.0}}">{{this.0}}: {{this.1}} {{this.2}}</li>
<li><a href="{{this.0}}">{{this.0}}: {{this.1}} {{this.2}}</a></li>
{{/each}}
</ul>
{{#if more_users}}
… weitere Ergebnisse vorhanden. Bitte Suche verfeinern!
{{/if}}
{{/if}}
{{#if groups}}
<h2>Gruppen</h2>
<ul>
{{#each groups}}
<li><a href="/admin/group/{{this.0}}">{{this.0}}: {{this.1}} {{this.2}}</li>
<li><a href="/admin/group/{{this.0}}">{{this.0}}: {{this.1}} {{this.2}}</a></li>
{{/each}}
</ul>
{{#if more_groups}}
… weitere Ergebnisse vorhanden. Bitte Suche verfeinern!
{{/if}}
{{/if}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment