#218 Utilize quick help section settings on actual pages
This commit is contained in:
parent
5c3fca0682
commit
43d00943c6
21
index.php
21
index.php
@ -42,6 +42,7 @@ require(HESK_PATH . 'inc/common.inc.php');
|
|||||||
|
|
||||||
// Are we in maintenance mode?
|
// Are we in maintenance mode?
|
||||||
hesk_check_maintenance();
|
hesk_check_maintenance();
|
||||||
|
hesk_load_database_functions();
|
||||||
|
|
||||||
// Are we in "Knowledgebase only" mode?
|
// Are we in "Knowledgebase only" mode?
|
||||||
hesk_check_kb_only();
|
hesk_check_kb_only();
|
||||||
@ -166,7 +167,17 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
|||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<!-- START MAIN LAYOUT -->
|
<!-- START MAIN LAYOUT -->
|
||||||
|
<?php
|
||||||
|
$columnWidth = 'col-md-8';
|
||||||
|
hesk_dbConnect();
|
||||||
|
$showRs = hesk_dbQuery("SELECT `show` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` WHERE `id` = 1");
|
||||||
|
$show = hesk_dbFetchAssoc($showRs);
|
||||||
|
if (!$show['show']) {
|
||||||
|
$columnWidth = 'col-md-10 col-md-offset-1';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||||
<div align="left" class="col-md-4">
|
<div align="left" class="col-md-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
||||||
@ -175,7 +186,8 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<?php endif; ?>
|
||||||
|
<div class="<?php echo $columnWidth; ?>">
|
||||||
<?php
|
<?php
|
||||||
// This will handle error, success and notice messages
|
// This will handle error, success and notice messages
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
@ -220,8 +232,6 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
|||||||
<?php
|
<?php
|
||||||
$is_table = 0;
|
$is_table = 0;
|
||||||
|
|
||||||
hesk_load_database_functions();
|
|
||||||
|
|
||||||
// Get categories
|
// Get categories
|
||||||
hesk_dbConnect();
|
hesk_dbConnect();
|
||||||
$orderBy = $modsForHesk_settings['category_order_column'];
|
$orderBy = $modsForHesk_settings['category_order_column'];
|
||||||
@ -1038,6 +1048,9 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($columnWidth == 'col-md-10 col-md-offset-1'): ?>
|
||||||
|
<div class="col-md-1"> </div></div>
|
||||||
|
<?php endif; ?>
|
||||||
<!-- END FORM -->
|
<!-- END FORM -->
|
||||||
|
|
||||||
|
|
||||||
@ -1069,7 +1082,6 @@ function print_start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect to database
|
// Connect to database
|
||||||
hesk_load_database_functions();
|
|
||||||
hesk_dbConnect();
|
hesk_dbConnect();
|
||||||
|
|
||||||
/* Print header */
|
/* Print header */
|
||||||
@ -1243,7 +1255,6 @@ function forgot_tid()
|
|||||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||||
|
|
||||||
/* Get ticket(s) from database */
|
/* Get ticket(s) from database */
|
||||||
hesk_load_database_functions();
|
|
||||||
hesk_dbConnect();
|
hesk_dbConnect();
|
||||||
|
|
||||||
$email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1');
|
$email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1');
|
||||||
|
@ -155,7 +155,16 @@ function hesk_kb_header($kb_link) {
|
|||||||
<li class="active"><?php echo $hesklang['kb_text']; ?></li>
|
<li class="active"><?php echo $hesklang['kb_text']; ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$columnWidth = 'col-md-8';
|
||||||
|
$showRs = hesk_dbQuery("SELECT `show` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` WHERE `id` = 4");
|
||||||
|
$show = hesk_dbFetchAssoc($showRs);
|
||||||
|
if (!$show['show']) {
|
||||||
|
$columnWidth = 'col-md-10 col-md-offset-1';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -166,7 +175,8 @@ function hesk_kb_header($kb_link) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<?php endif; ?>
|
||||||
|
<div class="<?php echo $columnWidth; ?>">
|
||||||
<?php
|
<?php
|
||||||
/* Print small search box */
|
/* Print small search box */
|
||||||
hesk_kbSearchSmall();
|
hesk_kbSearchSmall();
|
||||||
@ -417,6 +427,7 @@ function hesk_show_kb_article($artid)
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
hesk_kbFooter();
|
||||||
} // END hesk_show_kb_article()
|
} // END hesk_show_kb_article()
|
||||||
|
|
||||||
|
|
||||||
@ -618,5 +629,16 @@ function hesk_show_kb_category($catid, $is_search = 0) {
|
|||||||
/* Get list of latest articles */
|
/* Get list of latest articles */
|
||||||
hesk_kbLatestArticles($hesk_settings['kb_latest'], 0);
|
hesk_kbLatestArticles($hesk_settings['kb_latest'], 0);
|
||||||
}
|
}
|
||||||
|
hesk_kbFooter();
|
||||||
} // END hesk_show_kb_category()
|
} // END hesk_show_kb_category()
|
||||||
|
|
||||||
|
function hesk_kbFooter() {
|
||||||
|
global $hesk_settings;
|
||||||
|
|
||||||
|
$showRs = hesk_dbQuery("SELECT `show` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` WHERE `id` = 4");
|
||||||
|
$show = hesk_dbFetchAssoc($showRs);
|
||||||
|
if (!$show['show']) {
|
||||||
|
echo '<div class="col-md-1"> </div></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
25
ticket.php
25
ticket.php
@ -217,7 +217,16 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
|||||||
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$columnWidth = 'col-md-8';
|
||||||
|
$showRs = hesk_dbQuery("SELECT `show` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` WHERE `id` = 3");
|
||||||
|
$show = hesk_dbFetchAssoc($showRs);
|
||||||
|
if (!$show['show']) {
|
||||||
|
$columnWidth = 'col-md-10 col-md-offset-1';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||||
<div align="left" class="col-md-4">
|
<div align="left" class="col-md-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
||||||
@ -226,7 +235,8 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<?php endif; ?>
|
||||||
|
<div class="<?php echo $columnWidth; ?>">
|
||||||
<?php
|
<?php
|
||||||
/* This will handle error, success and notice messages */
|
/* This will handle error, success and notice messages */
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
@ -459,7 +469,17 @@ function print_form()
|
|||||||
<li class="active"><?php echo $hesklang['view_ticket_nav']; ?></li>
|
<li class="active"><?php echo $hesklang['view_ticket_nav']; ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
hesk_dbConnect();
|
||||||
|
$columnWidth = 'col-md-8';
|
||||||
|
$showRs = hesk_dbQuery("SELECT `show` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` WHERE `id` = 2");
|
||||||
|
$show = hesk_dbFetchAssoc($showRs);
|
||||||
|
if (!$show['show']) {
|
||||||
|
$columnWidth = 'col-md-10 col-md-offset-1';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||||
<div align="left" class="col-md-4">
|
<div align="left" class="col-md-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -470,7 +490,8 @@ function print_form()
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<?php endif; ?>
|
||||||
|
<div class="<?php echo $columnWidth; ?>">
|
||||||
<?php
|
<?php
|
||||||
/* This will handle error, success and notice messages */
|
/* This will handle error, success and notice messages */
|
||||||
hesk_handle_messages();
|
hesk_handle_messages();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user