Browse Source

#390 Add dropdown for tools

merge-requests/2/head
Mike Koch 6 years ago
parent
commit
71a38e1156
  1. 55
      inc/show_admin_nav.inc.php
  2. 7
      language/en/text.php

55
inc/show_admin_nav.inc.php

@ -112,16 +112,53 @@ if (hesk_check_kb_only(false)) {
} elseif (hesk_checkPermission('can_export', 0)) {
echo '<li><a href="export.php"><i class="fa fa-line-chart" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['reports'] . '</a></li>';
}
$tools_count = 0;
$dropdown_items = '<ul class="dropdown-menu" role="menu">';
if (hesk_checkPermission('can_ban_emails', 0)) {
echo '<li><a href="banned_emails.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_ban_ips', 0)) {
echo '<li><a href="banned_ips.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_service_msg', 0)) {
echo '<li><a href="service_messages.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_man_email_tpl', 0)) {
echo '<li><a href="manage_email_templates.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_man_ticket_statuses', 0)) {
echo '<li><a href="manage_statuses.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
$tools_count++;
$dropdown_items .= '<li><a href="banned_emails.php">' . $hesklang['manage_banned_emails'] . '</a></li>';
}
if (hesk_checkPermission('can_ban_ips', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="banned_ips.php">' . $hesklang['manage_banned_ips'] . '</a></li>';
}
if (hesk_checkPermission('can_service_msg', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="service_messages.php">' . $hesklang['manage_service_messages'] . '</a></li>';
}
if (hesk_checkPermission('can_man_email_tpl', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="manage_email_templates.php">' . $hesklang['manage_email_templates'] . '</a></li>';
}
if (hesk_checkPermission('can_man_ticket_statuses', 0)) {
$tools_count++;
$dropdown_items .= '<li><a href="manage_statuses.php">' . $hesklang['manage_statuses'] . '</a></li>';
}
$dropdown_items .= '</ul>';
if ($tools_count > 1) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_TOOLS') {
$active = ' active';
}
echo '<li class="dropdown'.$active.'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '<span class="caret"></span>
</a>
'.$dropdown_items.'
</li>';
} else {
if (hesk_checkPermission('can_ban_emails', 0)) {
echo '<li><a href="banned_emails.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_ban_ips', 0)) {
echo '<li><a href="banned_ips.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_service_msg', 0)) {
echo '<li><a href="service_messages.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_man_email_tpl', 0)) {
echo '<li><a href="manage_email_templates.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
} elseif (hesk_checkPermission('can_man_ticket_statuses', 0)) {
echo '<li><a href="manage_statuses.php"><i class="fa fa-wrench" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['tools'] . '</a> </li>';
}
}
if (hesk_checkPermission('can_man_settings', 0)) {
echo '<li><a href="admin_settings.php"><i class="fa fa-cog" ' . $iconDisplay . '></i>&nbsp;' . $hesklang['settings'] . '</a></li>';

7
language/en/text.php

@ -21,6 +21,13 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN Mods for HESK 2.6.0
$hesklang['manage_statuses'] = 'Manage Statuses';
$hesklang['manage_service_messages'] = 'Manage Service Messages';
$hesklang['manage_banned_ips'] = 'Manage Banned IPs';
$hesklang['manage_banned_emails'] = 'Manage Banned Emails';
$hesklang['manage_email_templates'] = 'Manage Email Templates';
// ADDED OR MODIFIED IN Mods for HESK 2.5.0
$hesklang['ticket_message_no_attachments'] = 'Ticket/Reply message, however attachments will not be included in the email';
$hesklang['click_for_device_information'] = 'Click for device information';

Loading…
Cancel
Save