Fix article editor
This commit is contained in:
@@ -239,8 +239,25 @@
|
||||
<div class="card-body p-2">
|
||||
{% for h in history %}
|
||||
<div class="history-item">
|
||||
<strong>{{ h.field_name.replace('_',' ').title() }}</strong>
|
||||
changed from <em>{{ h.old_value or '—' }}</em> to <em>{{ h.new_value or '—' }}</em>
|
||||
{# ── Field label ── #}
|
||||
{% if h.field_name == 'assigned_to' %}
|
||||
<strong>Assigned To</strong>
|
||||
{% elif h.field_name == 'status' %}
|
||||
<strong>Status</strong>
|
||||
{% elif h.field_name == 'priority' %}
|
||||
<strong>Priority</strong>
|
||||
{% else %}
|
||||
<strong>{{ h.field_name.replace('_',' ').title() }}</strong>
|
||||
{% endif %}
|
||||
|
||||
{# ── Values — format status/priority nicely; keep others as-is ── #}
|
||||
{% set old = h.old_value or 'Unassigned' %}
|
||||
{% set new = h.new_value or 'Unassigned' %}
|
||||
{% if h.field_name in ('status', 'priority') %}
|
||||
{% set old = old.replace('_',' ').title() %}
|
||||
{% set new = new.replace('_',' ').title() %}
|
||||
{% endif %}
|
||||
changed from <em>{{ old }}</em> to <em>{{ new }}</em>
|
||||
<br>
|
||||
<span style="font-size:10px;">by {{ h.changer.full_name }} · {{ h.changed_at.strftime('%b %d %H:%M') }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user