Release v2.4.2
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h2>Timetables</h2>
|
||||
<p>Store grouped events with start and end times so a timetable region can show what is coming up next.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-outline card-primary" data-table-search-container data-table-pagination-card>
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Saved groups</h3>
|
||||
<div class="card-tools d-flex flex-nowrap align-items-center gap-2">
|
||||
<div class="input-group input-group-sm flex-shrink-1" style="width: min(14rem, 100%);">
|
||||
<span class="input-group-text" aria-hidden="true"><i class="bi bi-search"></i></span>
|
||||
<input type="search" class="form-control" placeholder="Search timetables" aria-label="Search timetables" data-table-search />
|
||||
</div>
|
||||
{{#if (hasPermission currentUser 'timetables.create')}}
|
||||
<a class="btn btn-primary btn-sm" href="/data-sources/timetables/new">Add timetable group</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body table-responsive p-0">
|
||||
<table class="table table-striped w-100 mb-0" data-table-searchable>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-table-sort-key="name">Name</th>
|
||||
<th data-table-sort-key="description">Description</th>
|
||||
<th data-table-sort-key="entries">Entries</th>
|
||||
<th data-table-sort-key="next_start">Next start</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#if timetableGroups.length}}
|
||||
{{#each timetableGroups}}
|
||||
<tr data-table-search-row>
|
||||
<td data-label="Name">{{name}}</td>
|
||||
<td data-label="Description" class="text-break">{{short_description}}</td>
|
||||
<td data-label="Entries">{{entry_count}}</td>
|
||||
<td data-label="Next start">
|
||||
{{#if nextStartValue}}
|
||||
<time data-local-datetime datetime="{{nextStartValue}}">{{nextStartLabel}}</time>
|
||||
{{else}}
|
||||
{{nextStartLabel}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td data-label="Actions">
|
||||
{{#if (anyPermission ../currentUser 'timetables.update' 'timetables.delete')}}
|
||||
<div class="actions">
|
||||
{{#if (hasPermission ../currentUser 'timetables.update')}}
|
||||
<a class="btn btn-sm btn-primary" href="/data-sources/timetables/{{id}}/edit">Edit</a>
|
||||
{{/if}}
|
||||
{{#if (hasPermission ../currentUser 'timetables.delete')}}
|
||||
<form class="inline-form" method="post" action="/data-sources/timetables/{{id}}/delete" data-confirm-message="Delete this timetable group?">
|
||||
{{#if inUse}}
|
||||
<button class="btn btn-sm btn-outline-danger" type="submit" disabled>Delete</button>
|
||||
{{else}}
|
||||
<button class="btn btn-sm btn-danger" type="submit">Delete</button>
|
||||
{{/if}}
|
||||
</form>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<span class="empty">-</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<tr data-table-search-empty-default><td colspan="5" class="empty">No timetable groups yet.</td></tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{> table-pagination pagination=pagination basePath="/data-sources/timetables" alwaysShow=true}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user