Files
kmtnflower/src/app/admin/admin-history-tab.component.html
T

37 lines
1.0 KiB
HTML

<div class="tab-content">
<div class="tab-toolbar">
<h2>History Timeline ({{ (entries$ | async)?.length }})</h2>
<button class="btn btn-add" (click)="onAdd()">+ Add Entry</button>
</div>
<table class="admin-table">
<thead>
<tr>
<th>Year</th>
<th>Title</th>
<th>Order</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@for (entry of entries$ | async; track entry.id) {
<tr>
<td>{{ entry.year }}</td>
<td>{{ entry.title }}</td>
<td>{{ entry.display_order }}</td>
<td>{{ entry.active ? 'Yes' : 'No' }}</td>
<td class="actions">
<button class="btn-icon btn-edit" (click)="onEdit(entry)">Edit</button>
<button class="btn-icon btn-delete" (click)="onDelete(entry.id)">Delete</button>
</td>
</tr>
} @empty {
<tr>
<td colspan="5" class="empty-row">No history entries yet. Click "Add Entry" to create one.</td>
</tr>
}
</tbody>
</table>
</div>