Skip to content

Commit

Permalink
Use TimeAgo for Ticket Created At column, use tooltip to show real da…
Browse files Browse the repository at this point in the history
…te and time
  • Loading branch information
johnnyq committed Aug 24, 2024
1 parent f0086c8 commit 1bf80d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions client_tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,8 @@
</td>

<!-- Ticket Created At -->
<td>
<td title="<?php echo $ticket_created_at; ?>">
<?php echo $ticket_created_at_time_ago; ?>
<br>
<small class="text-secondary"><?php echo $ticket_created_at; ?></small>
</td>

</tr>
Expand Down
2 changes: 1 addition & 1 deletion ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@
while ($ticket_attachment = mysqli_fetch_array($sql_ticket_attachments)) {
$name = nullable_htmlentities($ticket_attachment['ticket_attachment_name']);
$ref_name = nullable_htmlentities($ticket_attachment['ticket_attachment_reference_name']);
echo "<hr><i class='fas fa-fw fa-paperclip text-secondary mr-1'></i>$name | <a href='uploads/tickets/$ticket_id/$ref_name' download='$name'><i class='fas fa-fw fa-download mr-1'></i>Download</a> | <a target='_blank' href='uploads/tickets/$ticket_id/$ref_name'><i class='fas fa-fw fa-external-link-alt mr-1'></i>View</a>";
echo "<hr class=''><i class='fas fa-fw fa-paperclip text-secondary mr-1'></i>$name | <a href='uploads/tickets/$ticket_id/$ref_name' download='$name'><i class='fas fa-fw fa-download mr-1'></i>Download</a> | <a target='_blank' href='uploads/tickets/$ticket_id/$ref_name'><i class='fas fa-fw fa-external-link-alt mr-1'></i>View</a>";
}
?>
</div>
Expand Down
12 changes: 6 additions & 6 deletions tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class="collapse

// Defaults to prevent undefined errors
$ticket_reply_created_at = "";
$ticket_reply_created_at_time_ago = "";
$ticket_reply_created_at_time_ago = "Never";
$ticket_reply_by_display = "";
$ticket_reply_type = "Client"; // Default to client for un-replied tickets

Expand Down Expand Up @@ -499,15 +499,15 @@ class="collapse

<!-- Ticket Last Response -->
<td>
<div title="<?php echo $ticket_reply_created_at; ?>"><?php echo $ticket_reply_created_at_time_ago; ?></div>
<div title="<?php echo $ticket_reply_created_at; ?>">
<?php echo $ticket_reply_created_at_time_ago; ?>
</div>
<div><?php echo $ticket_reply_by_display; ?></div>
</td>

<!-- Ticket Created At -->
<td>
<?php echo $ticket_created_at; ?>
<br>
<small class="text-secondary"><?php echo $ticket_created_at; ?></small>
<td title="<?php echo $ticket_created_at; ?>">
<?php echo $ticket_created_at_time_ago; ?>
</td>

</tr>
Expand Down

0 comments on commit 1bf80d3

Please sign in to comment.