Merge branch 'master' into tiny-mce-for-tickets
This commit is contained in:
commit
c73f97e0de
@ -954,6 +954,32 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="quick_help_sections[]" class="col-sm-6 control-label">
|
||||
<span class="label label-primary"
|
||||
data-toggle="tooltip"
|
||||
title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
|
||||
<?php echo $hesklang['quick_help_sections']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
|
||||
title="<?php echo $hesklang['quick_help_sections']; ?>"
|
||||
data-content="<?php echo htmlspecialchars($hesklang['quick_help_sections_help']); ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-6">
|
||||
<?php
|
||||
$quickHelpRs = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections`");
|
||||
while ($row = hesk_dbFetchAssoc($quickHelpRs)): ?>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="quick_help_sections[]"
|
||||
value="<?php echo $row['id']; ?>" <?php if ($row['show']) { echo 'checked'; } ?>>
|
||||
<?php echo $hesklang[$row['location']]; ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -496,6 +496,14 @@ for ($i=1;$i<=20;$i++)
|
||||
|
||||
$set['hesk_version'] = $hesk_settings['hesk_version'];
|
||||
|
||||
// Process quick help sections
|
||||
hesk_dbConnect();
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` SET `show` = '0'");
|
||||
$postArray = hesk_POST_array('quick_help_sections');
|
||||
foreach ($postArray as $value) {
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` SET `show` = '1' WHERE `id` = '".intval($value)."'");
|
||||
}
|
||||
|
||||
// Save the modsForHesk_settings.inc.php file
|
||||
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
|
||||
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
|
||||
|
21
index.php
21
index.php
@ -42,6 +42,7 @@ require(HESK_PATH . 'inc/common.inc.php');
|
||||
|
||||
// Are we in maintenance mode?
|
||||
hesk_check_maintenance();
|
||||
hesk_load_database_functions();
|
||||
|
||||
// Are we in "Knowledgebase only" mode?
|
||||
hesk_check_kb_only();
|
||||
@ -166,7 +167,17 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
</ol>
|
||||
|
||||
<!-- 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">
|
||||
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||
<div align="left" class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<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 class="col-md-8">
|
||||
<?php endif; ?>
|
||||
<div class="<?php echo $columnWidth; ?>">
|
||||
<?php
|
||||
// This will handle error, success and notice messages
|
||||
hesk_handle_messages();
|
||||
@ -220,8 +232,6 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<?php
|
||||
$is_table = 0;
|
||||
|
||||
hesk_load_database_functions();
|
||||
|
||||
// Get categories
|
||||
hesk_dbConnect();
|
||||
$orderBy = $modsForHesk_settings['category_order_column'];
|
||||
@ -1038,6 +1048,9 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($columnWidth == 'col-md-10 col-md-offset-1'): ?>
|
||||
<div class="col-md-1"> </div></div>
|
||||
<?php endif; ?>
|
||||
<!-- END FORM -->
|
||||
|
||||
|
||||
@ -1069,7 +1082,6 @@ function print_start()
|
||||
}
|
||||
|
||||
// Connect to database
|
||||
hesk_load_database_functions();
|
||||
hesk_dbConnect();
|
||||
|
||||
/* Print header */
|
||||
@ -1243,7 +1255,6 @@ function forgot_tid()
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
|
||||
/* Get ticket(s) from database */
|
||||
hesk_load_database_functions();
|
||||
hesk_dbConnect();
|
||||
|
||||
$email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1');
|
||||
|
@ -540,4 +540,40 @@ function execute232Scripts() {
|
||||
hesk_dbConnect();
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.3.2' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
// END Version 2.3.2
|
||||
// END Version 2.3.2
|
||||
|
||||
// BEGIN Version 2.4.0
|
||||
function execute240Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`location` VARCHAR(100) NOT NULL,
|
||||
`show` ENUM('0','1') NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
|
||||
|
||||
executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)
|
||||
VALUES ('create_ticket', '1')");
|
||||
executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)
|
||||
VALUES ('view_ticket_form', '1')");
|
||||
executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)
|
||||
VALUES ('view_ticket', '1')");
|
||||
executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)
|
||||
VALUES ('knowledgebase', '1')");
|
||||
}
|
||||
|
||||
function execute240FileUpdate() {
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
if (strpos($file, '$modsForHesk_settings[\'category_order_column\']') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Column to sort categories by. Can be either \'name\' or \'cat_order\'
|
||||
$modsForHesk_settings[\'category_order_column\'] = \'cat_order\';';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
@ -155,7 +155,16 @@ function hesk_kb_header($kb_link) {
|
||||
<li class="active"><?php echo $hesklang['kb_text']; ?></li>
|
||||
</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">
|
||||
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@ -166,7 +175,8 @@ function hesk_kb_header($kb_link) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<?php endif; ?>
|
||||
<div class="<?php echo $columnWidth; ?>">
|
||||
<?php
|
||||
/* Print small search box */
|
||||
hesk_kbSearchSmall();
|
||||
@ -417,6 +427,7 @@ function hesk_show_kb_article($artid)
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
hesk_kbFooter();
|
||||
} // END hesk_show_kb_article()
|
||||
|
||||
|
||||
@ -618,5 +629,16 @@ function hesk_show_kb_category($catid, $is_search = 0) {
|
||||
/* Get list of latest articles */
|
||||
hesk_kbLatestArticles($hesk_settings['kb_latest'], 0);
|
||||
}
|
||||
hesk_kbFooter();
|
||||
} // 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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -27,6 +27,11 @@ $hesklang['sort_alphabetically'] = 'Sort alphabetically';
|
||||
$hesklang['category_sort'] = 'Category Sorting';
|
||||
$hesklang['category_sort_help'] = 'Determines if categories shown on the manage categories page and all dropdowns are sorted by the user-defined order (default), or
|
||||
sorted alphabetically.';
|
||||
$hesklang['quick_help_sections'] = 'Quick Help Sections';
|
||||
$hesklang['quick_help_sections_help'] = 'Check the checkbox to show the "Quick Help" sections on the left-hand side, or uncheck to not show.';
|
||||
$hesklang['create_ticket'] = 'Create ticket';
|
||||
$hesklang['view_ticket_form'] = 'View ticket form';
|
||||
$hesklang['knowledgebase'] = 'Knowledgebase section';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.3.0
|
||||
$hesklang['sm_icon'] = 'Icon';
|
||||
|
27
ticket.php
27
ticket.php
@ -217,7 +217,16 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
|
||||
</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">
|
||||
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||
<div align="left" class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<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 class="col-md-8">
|
||||
<?php endif; ?>
|
||||
<div class="<?php echo $columnWidth; ?>">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
@ -457,9 +467,19 @@ function print_form()
|
||||
<li><a href="<?php echo $hesk_settings['site_url']; ?>"><?php echo $hesk_settings['site_title']; ?></a></li>
|
||||
<li><a href="<?php echo $hesk_settings['hesk_url']; ?>"><?php echo $hesk_settings['hesk_title']; ?></a></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">
|
||||
<?php if ($columnWidth == 'col-md-8'): ?>
|
||||
<div align="left" class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@ -470,7 +490,8 @@ function print_form()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<?php endif; ?>
|
||||
<div class="<?php echo $columnWidth; ?>">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
|
Loading…
x
Reference in New Issue
Block a user