#153 Finish adding basic "recent tickets" information

merge-requests/2/head
Mike Koch 9 years ago
parent 93ffba2a43
commit 297afdbf88

@ -652,11 +652,17 @@ if($ticket['email'] != '') {
array_push($recentTickets, $recentRow); array_push($recentTickets, $recentRow);
} }
foreach ($recentTickets as $recentTicket) { if ($recentTickets !== NULL) {
$thisTicketStatusRS = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `ID` = ".intval($recentTicket['status'])); $recentTicketsWithStatuses = array();
$theStatusRow = hesk_dbFetchAssoc($thisTicketStatusRS); foreach ($recentTickets as $recentTicket) {
$recentTicket['statusText'] = $hesklang[$theStatusRow['ShortNameContentKey']]; $newRecentTicket = $recentTicket;
$recentTicket['statusColor'] = $theStatusRow['TextColor']; $thisTicketStatusRS = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status']));
$theStatusRow = hesk_dbFetchAssoc($thisTicketStatusRS);
$newRecentTicket['statusText'] = $hesklang[$theStatusRow['ShortNameContentKey']];
$newRecentTicket['statusColor'] = $theStatusRow['TextColor'];
array_push($recentTicketsWithStatuses, $newRecentTicket);
}
$recentTickets = $recentTicketsWithStatuses;
} }
} }
@ -809,13 +815,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div> </div>
<?php } ?> <?php } ?>
</li> </li>
<?php if ($recentTickets != NULL): ?> <?php if ($recentTickets !== NULL): ?>
<li class="list-group-item"> <li class="list-group-item">
<strong><?php echo $hesklang['recent_tickets']; ?></strong> <strong><?php echo $hesklang['recent_tickets']; ?></strong>
<?php foreach ($recentTickets as $recentTicket): ?> <?php foreach ($recentTickets as $recentTicket): ?>
<p style="margin: 0"> <p style="margin: 0">
<i class="fa fa-circle"></i> <i class="fa fa-circle" data-toggle="tooltip" data-placement="top"
<?php echo $recentTicket['trackid']; ?> style="color: <?php echo $recentTicket['statusColor']; ?>"
title="<?php echo sprintf($hesklang['current_status_colon'], $recentTicket['statusText']); ?>"></i>
<?php echo '<a href="admin_ticket.php?track='.$recentTicket['trackid'].'&amp;Refresh='.mt_rand(10000,99999).'">'.$recentTicket['trackid'].'</a>'; ?>
</p> </p>
<?php endforeach; ?> <?php endforeach; ?>
</li> </li>

@ -60,6 +60,7 @@ $hesklang['yes_title_case'] = 'Yes';
$hesklang['no_title_case'] = 'No'; $hesklang['no_title_case'] = 'No';
$hesklang['autoclose_ticket_status'] = 'When a ticket is closed automatically, change the status to'; $hesklang['autoclose_ticket_status'] = 'When a ticket is closed automatically, change the status to';
$hesklang['recent_tickets'] = 'Recent tickets'; $hesklang['recent_tickets'] = 'Recent tickets';
$hesklang['current_status_colon'] = 'Current status: %s'; // %s: status name (i.e. "Resolved", "New", etc.)
// ADDED OR MODIFIED IN Mods for HESK 2.1.1 // ADDED OR MODIFIED IN Mods for HESK 2.1.1
$hesklang['new_article_default_type'] = 'Default Type for New Articles'; $hesklang['new_article_default_type'] = 'Default Type for New Articles';

Loading…
Cancel
Save