#275 Show download count next to attachment name
This commit is contained in:
parent
f375859de3
commit
246d2e6261
@ -1520,7 +1520,7 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
$att=explode(',',substr($attachments, 0, -1));
|
||||
echo '<div class="table-responsive">';
|
||||
echo '<table class="table table-striped attachment-table">';
|
||||
echo '<thead><tr><th> </th><th>'.$hesklang['file_name'].'</th><th>'.$hesklang['action'].'</th></tr></thead>';
|
||||
echo '<thead><tr><th> </th><th>'.$hesklang['file_name'].'</th><th>'.$hesklang['download_count'].'</th><th>'.$hesklang['action'].'</th></tr></thead>';
|
||||
echo '<tbody>';
|
||||
foreach ($att as $myatt)
|
||||
{
|
||||
@ -1569,6 +1569,9 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
<td>
|
||||
<p>'.$att_name.'</p>
|
||||
</td>
|
||||
<td>
|
||||
'.mfh_getNumberOfDownloadsForAttachment($att_id).'
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">';
|
||||
/* Can edit and delete tickets? */
|
||||
|
@ -1973,3 +1973,12 @@ function mfh_getDisplayTextForStatusId($statusId) {
|
||||
return $hesklang[$statusRec['Key']];
|
||||
}
|
||||
}
|
||||
|
||||
function mfh_getNumberOfDownloadsForAttachment($att_id, $table='attachments')
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
$res = hesk_dbQuery('SELECT `download_count` FROM `'.hesk_dbEscape($hesk_settings['db_pfix'].$table)."` WHERE `att_id` = ".intval($att_id));
|
||||
$rec = hesk_dbFetchAssoc($res);
|
||||
return $rec['download_count'];
|
||||
}
|
@ -53,6 +53,7 @@ $hesklang['status_sort'] = 'Status Sorting';
|
||||
$hesklang['status_sort_help'] = 'Determines if statuses shown on the manage statuses page and all dropdowns are sorted by the user-defined order (default), or sorted alphabetically.';
|
||||
$hesklang['cannot_delete_status_tickets'] = 'This status cannot be deleted because there are tickets set to this status.';
|
||||
$hesklang['default_statuses_updated'] = 'Default statuses have been updated!';
|
||||
$hesklang['download_count'] = 'Download Count';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.3.0
|
||||
$hesklang['sm_icon'] = 'Icon';
|
||||
|
Loading…
x
Reference in New Issue
Block a user