{% comment %} History Panel Component ======================= A reusable history panel component for displaying object change history and FSM transitions. Purpose: Displays both regular history records and FSM (Finite State Machine) transition history for parks, rides, and other entities with historical tracking. Usage Examples: Basic history: {% include 'components/history_panel.html' with history=history %} With FSM toggle (for moderators): {% include 'components/history_panel.html' with history=history show_fsm_toggle=True fsm_history_url=fsm_url model_type='park' object_id=park.id can_view_fsm=perms.parks.change_park %} Ride history: {% include 'components/history_panel.html' with history=history show_fsm_toggle=True fsm_history_url=fsm_url model_type='ride' object_id=ride.id can_view_fsm=perms.rides.change_ride %} Parameters: Required: - history: QuerySet or list of history records Optional (FSM): - show_fsm_toggle: Show toggle button for FSM history (default: False) - fsm_history_url: URL for loading FSM transition history via HTMX - model_type: Model type for FSM history (e.g., 'park', 'ride') - object_id: Object ID for FSM history - can_view_fsm: Whether user can view FSM history (default: False) Optional (styling): - title: Panel title (default: 'History') - panel_class: Additional CSS classes for panel - max_height: Maximum height for scrollable area (default: 'max-h-96') - collapsed: Start collapsed (default: False) Dependencies: - Tailwind CSS for styling - Alpine.js for interactivity - HTMX (optional, for FSM history lazy loading) - Font Awesome icons Accessibility: - Uses heading structure for panel title - Toggle button has accessible label - History items use semantic structure {% endcomment %} {% with title=title|default:'History' show_fsm_toggle=show_fsm_toggle|default:False can_view_fsm=can_view_fsm|default:False max_height=max_height|default:'max-h-96' collapsed=collapsed|default:False %}
No history available.
{% endfor %}