Closes #237 Add options to show # of merged tickets in ticket table

merge-requests/2/head
Mike Koch 9 years ago
parent 4635050ac6
commit 7a9e20557b

@ -2049,8 +2049,8 @@ if ( defined('HESK_DEMO') )
<!-- Ticket List Tab --> <!-- Ticket List Tab -->
<div class="tab-pane fade in" id="ticket-list"> <div class="tab-pane fade in" id="ticket-list">
<div class="form-group"> <div class="form-group">
<label for="s_open_only" class="col-sm-3 control-label"><?php echo $hesklang['fitl']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#1','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label> <label for="s_open_only" class="col-sm-4 control-label"><?php echo $hesklang['fitl']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#1','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
<div class="col-sm-9"> <div class="col-sm-8">
<?php <?php
// List available fields // List available fields
foreach ($hesk_settings['possible_ticket_list'] as $key => $title) foreach ($hesk_settings['possible_ticket_list'] as $key => $title)
@ -2064,10 +2064,28 @@ if ( defined('HESK_DEMO') )
?> ?>
</div> </div>
</div> </div>
<div class="form-group">
<label for="show_number_merged" class="col-sm-4 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['show_number_merged']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
title="<?php echo $hesklang['show_number_merged']; ?>"
data-content="<?php echo $hesklang['show_number_merged_help']; ?>"></i>
</label>
<div class="col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" name="show_number_merged" <?php if ($modsForHesk_settings['show_number_merged']) {echo 'checked';} ?>> <?php echo $hesklang['show_number_merged_descr']; ?>
</label>
</div>
</div>
</div>
<div class="blankSpace"></div> <div class="blankSpace"></div>
<div class="form-group"> <div class="form-group">
<label for="s_submittedformat" class="col-sm-3 control-label"><?php echo $hesklang['sdf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label> <label for="s_submittedformat" class="col-sm-4 control-label"><?php echo $hesklang['sdf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
<div class="col-sm-9 form-inline"> <div class="col-sm-8 form-inline">
<?php <?php
$off = $hesk_settings['new_top'] ? '' : 'checked="checked"'; $off = $hesk_settings['new_top'] ? '' : 'checked="checked"';
echo ' echo '
@ -2078,8 +2096,8 @@ if ( defined('HESK_DEMO') )
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="s_updatedformat" class="col-sm-3 control-label"><?php echo $hesklang['lcf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label> <label for="s_updatedformat" class="col-sm-4 control-label"><?php echo $hesklang['lcf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
<div class="col-sm-9 form-inline"> <div class="col-sm-8 form-inline">
<?php <?php
echo ' echo '

@ -505,6 +505,7 @@ $set['html_emails'] = empty($_POST['html_emails']) ? 0 : 1;
$set['use_bootstrap_theme'] = empty($_POST['use_bootstrap_theme']) ? 0 : 1; $set['use_bootstrap_theme'] = empty($_POST['use_bootstrap_theme']) ? 0 : 1;
$set['new_kb_article_visibility'] = hesk_checkMinMax( intval( hesk_POST('new_kb_article_visibility') ) , 0, 2, 2); $set['new_kb_article_visibility'] = hesk_checkMinMax( intval( hesk_POST('new_kb_article_visibility') ) , 0, 2, 2);
$set['mfh_attachments'] = empty($_POST['email_attachments']) ? 0 : 1; $set['mfh_attachments'] = empty($_POST['email_attachments']) ? 0 : 1;
$set['show_number_merged'] = empty($_POST['show_number_merged']) ? 0 : 1;
if ($set['customer-email-verification-required']) if ($set['customer-email-verification-required'])
{ {
@ -564,7 +565,10 @@ $modsForHesk_settings[\'use_bootstrap_theme\'] = '.$set['use_bootstrap_theme'].'
$modsForHesk_settings[\'new_kb_article_visibility\'] = '.$set['new_kb_article_visibility'].'; $modsForHesk_settings[\'new_kb_article_visibility\'] = '.$set['new_kb_article_visibility'].';
//-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments //-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments
$modsForHesk_settings[\'attachments\'] = '.$set['mfh_attachments'].';'; $modsForHesk_settings[\'attachments\'] = '.$set['mfh_attachments'].';
//-- Setting for showing number of merged tickets in the ticket search screen. 0 = Disable, 1 = Enable
$modsForHesk_settings[\'show_number_merged\'] = '.$set['show_number_merged'].';';
// Write the file // Write the file
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) ) if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )

@ -60,7 +60,8 @@ LEFT(`message`, 400) AS `message`,
`lastreplier`, `lastreplier`,
`replierid`, `replierid`,
`archive`, `archive`,
`locked` `locked`,
`merged`
"; ";
foreach ($hesk_settings['custom_fields'] as $k=>$v) foreach ($hesk_settings['custom_fields'] as $k=>$v)

@ -321,7 +321,24 @@ if ($total > 0)
// Print tracking ID and link it to the ticket page // Print tracking ID and link it to the ticket page
if ( hesk_show_column('trackid') ) if ( hesk_show_column('trackid') )
{ {
echo '<td class="'.$color.'" style="text-align:left; white-space:nowrap;"><a href="admin_ticket.php?track='.$ticket['trackid'].'&amp;Refresh='.$random.'">'.$ticket['trackid'].'</a></td>'; echo '<td class="'.$color.'" style="text-align:left; white-space:nowrap;">
<a href="admin_ticket.php?track='.$ticket['trackid'].'&amp;Refresh='.$random.'">'.$ticket['trackid'].'</a>';
if ($modsForHesk_settings['show_number_merged'] && $ticket['merged'] != '') {
$tooltipMarkup = $hesklang['merged_tickets'];
$mergedIds = explode('#', $ticket['merged']);
$mergedTickets = '';
$numberOfTickets = 0;
foreach ($mergedIds as $mergeId) {
if ($mergeId != '') {
$numberOfTickets++;
$mergedTickets .= '<li>' . $mergeId . '</li>';
}
}
$tooltipMarkup .= '<ul>'.$mergedTickets.'</ul>';
$output = sprintf($hesklang['x_merged'], $numberOfTickets);
echo '&nbsp;&nbsp;<span data-toggle="htmlpopover-onclick" data-content="'.$tooltipMarkup.'" style="cursor: pointer;color: #666">'.$output.'</span>';
}
echo '</td>';
} }
// Print date submitted // Print date submitted

@ -19,6 +19,12 @@ var loadJquery = function()
html: 'true' html: 'true'
}); });
//-- Activate HTML on-click popovers
$('[data-toggle="htmlpopover-onclick"]').popover({
container: 'body',
html: 'true'
});
//-- Activate jQuery's date picker //-- Activate jQuery's date picker
$(function() { $(function() {
$('.datepicker').datepicker({ $('.datepicker').datepicker({

@ -36,6 +36,11 @@ $hesklang['language_key'] = 'Language Key';
$hesklang['language_key_description'] = 'This is the language file \'key\' that contains the text you want to display'; $hesklang['language_key_description'] = 'This is the language file \'key\' that contains the text you want to display';
$hesklang['can_man_ticket_statuses'] = 'Can manage ticket statuses'; $hesklang['can_man_ticket_statuses'] = 'Can manage ticket statuses';
$hesklang['key_required'] = 'Keys are required for all statuses'; $hesklang['key_required'] = 'Keys are required for all statuses';
$hesklang['x_merged'] = '(+%s merged)'; // %s number of tickets merged
$hesklang['merged_tickets'] = 'Merged tickets: ';
$hesklang['show_number_merged'] = 'Show number of tickets merged';
$hesklang['show_number_merged_descr'] = 'Show number of tickets merged next to Tracking ID';
$hesklang['show_number_merged_help'] = 'If enabled, the user will be able to see which tickets were merged into the other on the ticket serarch screen.';
// ADDED OR MODIFIED IN Mods for HESK 2.2.1 // ADDED OR MODIFIED IN Mods for HESK 2.2.1
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:) $hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)

@ -40,4 +40,7 @@ $modsForHesk_settings['use_bootstrap_theme'] = 1;
$modsForHesk_settings['new_kb_article_visibility'] = 0; $modsForHesk_settings['new_kb_article_visibility'] = 0;
//-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments //-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments
$modsForHesk_settings['attachments'] = 0; $modsForHesk_settings['attachments'] = 0;
//-- Setting for showing number of merged tickets in the ticket search screen. 0 = Disable, 1 = Enable
$modsForHesk_settings['show_number_merged'] = 1;
Loading…
Cancel
Save