Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b1ab504a
Commit
b1ab504a
authored
Nov 28, 2007
by
Richard Mansfield
Browse files
Filter drop-down institution list for institutional admins
parent
b67fd0c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/users/search.php
View file @
b1ab504a
...
...
@@ -46,10 +46,16 @@ $sortdir = param_alpha('sortdir', 'asc');
$offset
=
param_integer
(
'offset'
,
0
);
$limit
=
param_integer
(
'limit'
,
10
);
if
(
$USER
->
get
(
'admin'
))
{
$institutions
=
get_records_array
(
'institution'
);
}
else
{
$institutions
=
get_records_select_array
(
'institution'
,
"name IN ('"
.
join
(
"','"
,
array_keys
(
$USER
->
get
(
'admininstitutions'
)))
.
"')"
);
}
$smarty
=
smarty
(
array
(
'adminusersearch'
));
$smarty
->
assign
(
'search'
,
$search
);
$smarty
->
assign
(
'alphabet'
,
explode
(
','
,
get_string
(
'alphabet'
)));
$smarty
->
assign
(
'institutions'
,
get_records_array
(
'
institution
'
)
);
$smarty
->
assign
(
'institutions'
,
$
institution
s
);
$smarty
->
assign
(
'results'
,
build_admin_user_search_results
(
$search
,
$offset
,
$limit
,
$sortby
,
$sortdir
));
$smarty
->
display
(
'admin/users/search.tpl'
);
...
...
htdocs/theme/default/templates/admin/users/search.tpl
View file @
b1ab504a
...
...
@@ -37,7 +37,7 @@
<label>
Query:
<input
type=
"text"
name=
"query"
id=
"query"
{
if
!
empty
(
$search
->
query
)
}
value=
"
{
$search
->
query
}
"
{/
if
}
>
</label>
{
if
$USER
->
get
(
'admin'
)
&&
count
(
$institutions
)
>
1
}
{
if
count
(
$institutions
)
>
1
}
<span
class=
"institutions"
>
<label>
Institution:
<select
name=
"institution"
id=
"institution"
>
...
...
Write
Preview
Supports
Markdown
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