Browse Source

#391 Add .active to customer-side nav items

merge-requests/2/head
Mike Koch 6 years ago
parent
commit
9a8da11a8f
  1. 32
      inc/header.inc.php
  2. 3
      index.php
  3. 2
      knowledgebase.php
  4. 1
      ticket.php

32
inc/header.inc.php

@ -147,7 +147,12 @@ if (is_dir(HESK_PATH . 'install')) {
background-color: <?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>;
}
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover {
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:focus,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:hover {
color: <?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>;
background-color: <?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>;
background-image: none;
@ -257,10 +262,22 @@ if ($modsForHesk_settings['show_icons']) {
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="<?php echo HESK_PATH; ?>"><i
<?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_HOME') {
$active = 'class="active"';
}
?>
<li <?php echo $active; ?>><a href="<?php echo HESK_PATH; ?>"><i
class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?>
</a></li>
<li class="dropdown">
<?php
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_TICKET') {
$active = ' active';
}
?>
<li class="dropdown<?php echo $active; ?>">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i
class="fa fa-ticket" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['ticket'] ?>
<b class="caret"></b></a>
@ -273,8 +290,13 @@ if ($modsForHesk_settings['show_icons']) {
</a></li>
</ul>
</li>
<?php if ($hesk_settings['kb_enable']) { ?>
<li><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i
<?php if ($hesk_settings['kb_enable']) {
$active = '';
if (defined('PAGE_TITLE') && PAGE_TITLE == 'CUSTOMER_KB') {
$active = 'class="active"';
}
?>
<li <?php echo $active; ?>><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i
class="fa fa-book" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['kb_text'] ?>
</a></li> <?php } ?>
<?php include('custom/header-custom.inc.php'); ?>

3
index.php

@ -141,6 +141,7 @@ function print_add_ticket()
define('RECAPTCHA', 1);
}
define('PAGE_TITLE', 'CUSTOMER_TICKET');
// Print header
$hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket'];
require_once(HESK_PATH . 'inc/header.inc.php');
@ -1203,6 +1204,8 @@ function print_start()
// Connect to database
hesk_dbConnect();
define('PAGE_TITLE', 'CUSTOMER_HOME');
/* Print header */
require_once(HESK_PATH . 'inc/header.inc.php');

2
knowledgebase.php

@ -42,6 +42,8 @@ hesk_check_maintenance();
// Load Knowledgebase-related functions
hesk_load_database_functions();
define('PAGE_TITLE', 'CUSTOMER_KB');
/* Is Knowledgebase enabled? */
if (!$hesk_settings['kb_enable']) {
hesk_error($hesklang['kbdis']);

1
ticket.php

@ -33,6 +33,7 @@ define('HESK_PATH', './');
define('HESK_NO_ROBOTS', 1);
define('WYSIWYG', 1);
define('VALIDATOR', 1);
define('PAGE_TITLE', 'CUSTOMER_TICKET');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');

Loading…
Cancel
Save