Move revision history above operator notes, move cancel button next to status with confirmation

This commit is contained in:
Troll (Hermes Agent) 2026-08-04 18:58:49 +00:00
parent 968a6fb43c
commit 8de32d91b7

View file

@ -110,6 +110,7 @@
margin-left:1.8rem; margin-left:1.8rem;
} }
.approved-box{font-size:1.2rem;font-weight:bold;color:#fbbf24;} .approved-box{font-size:1.2rem;font-weight:bold;color:#fbbf24;}
.status-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;}
.history-list{ .history-list{
margin:0; margin:0;
padding:0; padding:0;
@ -143,7 +144,15 @@
<div class="container"> <div class="container">
<p><a href="{{ url_for('admin_dashboard') }}">← Dashboard</a></p> <p><a href="{{ url_for('admin_dashboard') }}">← Dashboard</a></p>
<h1>Request #{{ req.id }} — {{ req.name }}</h1> <h1>Request #{{ req.id }} — {{ req.name }}</h1>
<p><strong>Status:</strong> <span class="status-badge">{{ statuses[req.status] }}</span></p> <div class="status-row">
<p style="margin:0"><strong>Status:</strong> <span class="status-badge">{{ statuses[req.status] }}</span></p>
{% if req.status != 'cancelled' %}
<form method="POST" onsubmit="return confirm('Are you sure you want to cancel request #{{ req.id }}?')" style="margin:0">
<input type="hidden" name="action" value="cancel_request">
<button type="submit" class="danger" style="margin:0">Cancel Request</button>
</form>
{% endif %}
</div>
{% with messages = get_flashed_messages(with_categories=true) %} {% with messages = get_flashed_messages(with_categories=true) %}
{% for category, message in messages %} {% for category, message in messages %}
@ -197,6 +206,29 @@
{% endif %} {% endif %}
</div> </div>
<!-- Revision History -->
<div class="section">
<h2>Revision History</h2>
{% if revision_history %}
<ul class="history-list">
{% for h in revision_history %}
<li>
<div class="meta">Revision #{{ h.revision_count }} — {{ h.created_at }}
{% if h.old_song_a_path or h.old_song_b_path %}
<br>Archived:
{% if h.old_song_a_path %}<br>A: {{ basename(h.old_song_a_path) }}{% endif %}
{% if h.old_song_b_path %}<br>B: {{ basename(h.old_song_b_path) }}{% endif %}
{% endif %}
</div>
<p class="note">{{ h.note or 'No note provided.' }}</p>
</li>
{% endfor %}
</ul>
{% else %}
<p class="copy-hint">No revisions recorded yet.</p>
{% endif %}
</div>
<!-- Operator Notes --> <!-- Operator Notes -->
<div class="section"> <div class="section">
<h2>Operator Notes</h2> <h2>Operator Notes</h2>
@ -368,42 +400,6 @@
{% endif %} {% endif %}
</form> </form>
</div> </div>
<!-- Request Actions -->
<div class="section">
<h2>Request Actions</h2>
{% if req.status != 'cancelled' %}
<form method="POST" onsubmit="return confirm('Mark request #{{ req.id }} as cancelled?')">
<input type="hidden" name="action" value="cancel_request">
<button type="submit" class="danger">Mark as Cancelled</button>
</form>
{% else %}
<p class="copy-hint">This request is cancelled.</p>
{% endif %}
</div>
<!-- Revision History -->
<div class="section">
<h2>Revision History</h2>
{% if revision_history %}
<ul class="history-list">
{% for h in revision_history %}
<li>
<div class="meta">Revision #{{ h.revision_count }} — {{ h.created_at }}
{% if h.old_song_a_path or h.old_song_b_path %}
<br>Archived:
{% if h.old_song_a_path %}<br>A: {{ basename(h.old_song_a_path) }}{% endif %}
{% if h.old_song_b_path %}<br>B: {{ basename(h.old_song_b_path) }}{% endif %}
{% endif %}
</div>
<p class="note">{{ h.note or 'No note provided.' }}</p>
</li>
{% endfor %}
</ul>
{% else %}
<p class="copy-hint">No revisions recorded yet.</p>
{% endif %}
</div>
</div> </div>
</div> </div>