Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1] Move hooks filter above table #8111

Open
wants to merge 2 commits into
base: release-2.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions Sources/ManageMaintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ function AdminBoardRecount()
validateToken(!isset($_REQUEST['step']) ? 'admin-maint' : 'admin-boardrecount');
$context['not_done_token'] = 'admin-boardrecount';
createToken($context['not_done_token']);

$context['page_title'] = $txt['not_done_title'];
$context['continue_post_data'] = '';
$context['continue_countdown'] = 3;
Expand Down Expand Up @@ -1867,13 +1867,6 @@ function($hook) use ($current_filter)
foreach ($hooks as $hook => $functions)
$hooks_filters[] = '<option' . ($current_filter == $hook ? ' selected ' : '') . ' value="' . $hook . '">' . $hook . '</option>';

if (!empty($hooks_filters))
$context['insert_after_template'] .= '
<script>
var hook_name_header = document.getElementById(\'header_list_integration_hooks_hook_name\');
hook_name_header.innerHTML += ' . JavaScriptEscape('<select style="margin-left:15px;" onchange="window.location=(\'' . $scripturl . '?action=admin;area=maintain;sa=hooks\' + (this.value ? \';filter=\' + this.value : \'\'));"><option value="">' . $txt['hooks_reset_filter'] . '</option>' . implode('', $hooks_filters) . '</select>') . ';
</script>';

if (!empty($_REQUEST['do']) && isset($_REQUEST['hook']) && isset($_REQUEST['function']))
{
checkSession('request');
Expand Down Expand Up @@ -2019,6 +2012,15 @@ function($accumulator, $functions)
<li><span class="main_icons error"></span> ' . $txt['hooks_disable_legend_temp_missing'] . '</li>
</ul>'
),
array(
'position' => 'above_column_headers',
'value' => '
<select onchange="window.location=(\'' . $scripturl . '?action=admin;area=maintain;sa=hooks\' + (this.value ? \';filter=\' + this.value : \'\'));">
<option value="">' . $txt['hooks_reset_filter'] . '</option>
' . implode('', $hooks_filters) . '
</select>',
'class' => 'floatright',
),
),
);

Expand Down
3 changes: 2 additions & 1 deletion Themes/default/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,8 @@ ul li.greeting {
#display_jump_to_select,
#message_index_jump_to_select,
#search_jump_to_select,
#quick_mod_jump_to_select {
#quick_mod_jump_to_select,
#list_integration_hooks select {
width: 29ch;
overflow: hidden;
}
Expand Down
Loading