Files
fitguide/app/templates/scopes.html
T

50 lines
2.0 KiB
HTML

{% extends "base.html" %}
{% block title %}Scopes · {{ app_name }}{% endblock %}
{% block body %}
{% include "_nav.html" %}
<main class="container">
<h1>Scopes</h1>
<p class="muted">
Every scope on record, with the accessories that fit it. Each part-type
column lists matching parts; <span class="fit-badge fit-badge-exact">Exact</span>
is a confirmed fit, <span class="fit-badge fit-badge-possible">Possible</span> a candidate.
</p>
<div class="filter-bar">
<form hx-get="/scopes/filter"
hx-target="#scopes-table-card"
hx-trigger="input delay:300ms, change"
hx-swap="outerHTML">
<input type="text" name="description" placeholder="Search scopes…"
value="{{ filters.description or '' }}">
<select name="manufacturer_id">
<option value="">All manufacturers</option>
{% for m in manufacturers %}
<option value="{{ m.id }}" {{ "selected" if filters.manufacturer_id and filters.manufacturer_id|int == m.id }}>{{ m.name }}</option>
{% endfor %}
</select>
<select name="scope_model_id">
<option value="">All models</option>
{% for sm in scope_models %}
<option value="{{ sm.id }}" {{ "selected" if filters.scope_model_id and filters.scope_model_id|int == sm.id }}>{{ sm.name }}</option>
{% endfor %}
</select>
<select name="sub_part_type_id">
<option value="">All types</option>
{% for spt in sub_part_types %}
<option value="{{ spt.id }}" {{ "selected" if filters.sub_part_type_id and filters.sub_part_type_id|int == spt.id }}>{{ spt.name }}</option>
{% endfor %}
</select>
<select name="fits_part_type_id">
<option value="">Fits any accessory</option>
{% for ct in column_types %}
<option value="{{ ct.id }}" {{ "selected" if filters.fits_part_type_id and filters.fits_part_type_id|int == ct.id }}>Fits {{ ct.name }}</option>
{% endfor %}
</select>
</form>
</div>
{% include "_scopes_table_card.html" %}
</main>
{% endblock %}