Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
96eb98d6
Commit
96eb98d6
authored
Apr 17, 2020
by
Robert Czechowski
Committed by
Robert Czechowski
May 14, 2020
Browse files
Admin page: Show hint to more results if not all results are shown
parent
b4f1193f
Pipeline
#639
canceled with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/core.rs
View file @
96eb98d6
...
...
@@ -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
))
...
...
templates/default/admin_search_results.hbs
View file @
96eb98d6
...
...
@@ -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}}
Robert Czechowski
@zgtm
mentioned in issue
#79 (closed)
·
Jun 08, 2020
mentioned in issue
#79 (closed)
mentioned in issue #79
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment