mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 19:37:06 +00:00
feat(activities): Add read views for Activity
This commit is contained in:
26
activities/templates/activities/activity/detail.html
Normal file
26
activities/templates/activities/activity/detail.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{% url 'activities:activity.list' %}">Activities</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ object }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<hr>
|
||||
|
||||
<dl>
|
||||
<dt>Series</dt>
|
||||
<dl>{{ activity.series|default_if_none:'Standalone Activity' }}</dl>
|
||||
|
||||
<dt>Type</dt>
|
||||
<dd>{{ activity.type }}</dd>
|
||||
|
||||
<dt>Medium</dt>
|
||||
<dd>{{ activity.medium }}</dd>
|
||||
</dl>
|
||||
|
||||
{% endblock %}
|
||||
37
activities/templates/activities/activity/list.html
Normal file
37
activities/templates/activities/activity/list.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item active" aria-current="page">Activities</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<hr>
|
||||
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for activity in activity_list.all %}
|
||||
<tr>
|
||||
<td>{{ activity }}</td>
|
||||
<td>
|
||||
<a class="btn btn-sm btn-info"
|
||||
href="{% url 'activities:activity.detail' pk=activity.pk %}">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td>No records</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user