61 lines
1.9 KiB
HTML
61 lines
1.9 KiB
HTML
{% import "base.html" as base %}
|
|
|
|
{% call base::head("Wants - DataBuild") %}
|
|
{% call base::nav("wants", base.graph_label) %}
|
|
|
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem">
|
|
<h1 style="margin-bottom:0">Wants</h1>
|
|
<a href="/wants/create" class="btn-primary">Create Want</a>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Want ID</th>
|
|
<th>Status</th>
|
|
<th>Partitions</th>
|
|
<th>Comment</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for want in wants %}
|
|
<tr style="view-transition-name: want-{{ loop.index }}">
|
|
<td><a href="/wants/{{ want.want_id }}">{{ want.want_id }}</a></td>
|
|
<td>
|
|
{% match want.status %}
|
|
{% when Some with (s) %}<span class="status status-{{ s.name_lowercase }}">{{ s.name }}</span>
|
|
{% when None %}<span class="status">Unknown</span>
|
|
{% endmatch %}
|
|
</td>
|
|
<td>
|
|
{% for p in want.partitions %}
|
|
<a href="/partitions/{{ p.partition_ref_encoded }}" class="partition-ref">{{ p.partition_ref }}</a>{% if !loop.last %} {% endif %}
|
|
{% endfor %}
|
|
{% if want.partitions.is_empty() %}<span style="color:var(--color-text-muted)">-</span>{% endif %}
|
|
</td>
|
|
<td>{{ want.comment_display }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if wants.is_empty() %}
|
|
<tr>
|
|
<td colspan="4" style="text-align:center;color:var(--color-text-muted)">No wants found</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="pagination">
|
|
{% if self.has_prev() %}
|
|
<a href="?page={{ self.prev_page() }}">Previous</a>
|
|
{% else %}
|
|
<span class="disabled">Previous</span>
|
|
{% endif %}
|
|
<span>Page {{ page + 1 }} of {{ (total_count + page_size - 1) / page_size }}</span>
|
|
{% if self.has_next() %}
|
|
<a href="?page={{ self.next_page() }}">Next</a>
|
|
{% else %}
|
|
<span class="disabled">Next</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% call base::footer() %}
|