Fix close-ticket UX, add cmd palette hint, breadcrumb, image lightbox

- ticket.js: status change requiring a comment now shows an inline
  modal with a textarea — comment is actually posted before the status
  changes, instead of just warning the user and changing anyway
- layout_header.php: add ⌘K button in header so users can discover
  the command palette; also removes inline onclick in favor of JS
  (CSP-safe via nonce script block already present)
- TicketView.php: upgrade breadcrumb to lt-breadcrumb markup with
  ticket title preview (truncated at 45 chars) and aria-current
- ticket.js + ticket.css: image attachments now render as clickable
  thumbnails (3rem×3rem) that open in lt.lightbox; non-image files
  keep the icon display unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 12:15:40 -04:00
parent 6eae9ef816
commit 6c491c1baa
4 changed files with 86 additions and 19 deletions
+9 -5
View File
@@ -137,11 +137,15 @@ include __DIR__ . '/layout_header.php';
<!-- Back nav + ticket toolbar -->
<div class="lt-page-header">
<div class="lt-flex lt-flex-gap-sm lt-flex-align-center">
<a href="/" class="lt-btn lt-btn-ghost lt-btn-sm">&larr; Dashboard</a>
<span class="lt-text-muted lt-text-xs">/</span>
<span class="lt-text-muted lt-text-xs">Ticket #<?= htmlspecialchars($ticket['ticket_id']) ?></span>
</div>
<nav class="lt-breadcrumb" aria-label="Breadcrumb">
<a href="/" class="lt-breadcrumb-item">Dashboard</a>
<span class="lt-breadcrumb-sep" aria-hidden="true">/</span>
<span class="lt-breadcrumb-item active" aria-current="page"
title="<?= htmlspecialchars($ticket['title'], ENT_QUOTES, 'UTF-8') ?>">
#<?= htmlspecialchars($ticket['ticket_id']) ?> &mdash;
<?= htmlspecialchars(mb_strimwidth($ticket['title'], 0, 45, '…')) ?>
</span>
</nav>
<div class="lt-btn-group">
<!-- Status dot indicator -->
<?php