Skip to content

Commit ee1f9cc

Browse files
committed
Show search box see BT#13028
1 parent b645a34 commit ee1f9cc

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

main/admin/index.php

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@
6666
}
6767

6868
/* Users */
69-
$blocks['users']['icon'] = Display::return_icon('members.png', get_lang('Users'), array(), ICON_SIZE_MEDIUM, false);
69+
$blocks['users']['icon'] = Display::return_icon(
70+
'members.png',
71+
get_lang('Users'),
72+
array(),
73+
ICON_SIZE_MEDIUM,
74+
false
75+
);
7076
$blocks['users']['label'] = api_ucfirst(get_lang('Users'));
7177
$blocks['users']['class'] = 'block-admin-users';
7278

@@ -76,20 +82,20 @@
7682
$blocks['users']['extraContent'] = file_get_contents($usersBlockExtraFile);
7783
}
7884

85+
$search_form = '
86+
<form method="get" class="form-inline" action="user_list.php">
87+
<div class="form-group">
88+
<input class="form-control" type="text" name="keyword" value=""
89+
aria-label="'.get_lang('Search').'">
90+
<button class="btn btn-default" type="submit">
91+
<em class="fa fa-search"></em> ' . get_lang('Search').'
92+
</button>
93+
</div>
94+
</form>';
95+
$blocks['users']['search_form'] = $search_form;
96+
7997
if (api_is_platform_admin()) {
8098
$blocks['users']['editable'] = true;
81-
82-
$search_form = '
83-
<form method="get" class="form-inline" action="user_list.php">
84-
<div class="form-group">
85-
<input class="form-control" type="text" name="keyword" value=""
86-
aria-label="'.get_lang('Search').'">
87-
<button class="btn btn-default" type="submit">
88-
<em class="fa fa-search"></em> ' . get_lang('Search').'
89-
</button>
90-
</div>
91-
</form>';
92-
$blocks['users']['search_form'] = $search_form;
9399
$items = array(
94100
array('url' => 'user_list.php', 'label' => get_lang('UserList')),
95101
array('url' => 'user_add.php', 'label' => get_lang('AddUsers')),
@@ -109,12 +115,12 @@
109115
array('url' => 'user_add.php', 'label' => get_lang('AddUsers')),
110116
);
111117
} else {
112-
$items = array(
118+
$items = [
113119
array('url' => 'user_list.php', 'label' => get_lang('UserList')),
114120
array('url' => 'user_add.php', 'label' => get_lang('AddUsers')),
115121
array('url' => 'user_import.php', 'label' => get_lang('ImportUserListXMLCSV')),
116122
array('url' => 'usergroups.php', 'label' => get_lang('Classes')),
117-
);
123+
];
118124
}
119125

120126
$blocks['users']['items'] = $items;

0 commit comments

Comments
 (0)