{% comment %} FSM History Table Partial Template Displays FSM transition logs in a responsive table format with HTMX integration. Required context: - history_logs: QuerySet or list of StateLog objects Optional context: - show_model_column: Boolean to show/hide model type column (default: True) - show_object_link: Boolean to make object IDs clickable (default: True) - compact: Boolean for compact layout (default: False) - page_obj: Paginator page object for pagination {% endcomment %}
Loading history...

{% if show_model_column|default:True %}
{% endif %}
Timestamp | Model | Object ID | Transition | From | To | User | Actions
--- | --- | --- | --- | --- | --- | --- | ---
{% for log in history_logs %}
{% if show_model_column|default:True %}
{% endif %}

{{ log.timestamp|date:"M d, Y H:i" }}

{{ log.content_type.model|title }}

{% if show_object_link|default:True %} #{{ log.object_id }} {% else %} #{{ log.object_id }} {% endif %}

{{ log.transition|default:"—" }}

{% with from_state=log.source_state %} {{ from_state|default:"—" }} {% endwith %}

{% with to_state=log.state %} {{ to_state|default:"—" }} {% endwith %}

{{ log.by.username|default:"System" }}

{% empty %}

### No history found

No state transitions have been recorded yet.

{% endfor %}

{% if page_obj %} {% include "moderation/partials/history_pagination.html" %} {% endif %}