Files
skeleton-api/app/templates/admin/augmented_part_detail.html
T

76 lines
2.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}{{ ap.description | truncate(40) }} · {{ app_name }}{% endblock %}
{% block body %}
{% include "_nav.html" %}
<main class="container">
<p><a href="/admin/augmented-parts" class="btn btn-ghost">← Augmented Parts</a></p>
<h1> {% if ap.sku %} {{ ap.sku }} {% else %} {{ ap.description }} {% endif %} </h1>
<p class="muted">
<span class="tag">{{ ap.part_type.name }}</span>
{% if ap.sub_part_type %}<span class="tag">{{ ap.sub_part_type.name }}</span>{% endif %}
{% if ap.description %}{{ ap.description }}{% endif %}
</p>
<div class="grid">
<div class="card">
<h2>Details</h2>
<dl class="kv">
<dt>SKU</dt><dd>{{ ap.sku or "—" }}</dd>
<dt>Description</dt><dd>{{ ap.description }}</dd>
<dt>Colour</dt><dd>{{ ap.colour.name if ap.colour else "—" }}</dd>
<dt>Manufacturer</dt><dd>{{ ap.manufacturer.name if ap.manufacturer else "—" }}</dd>
<dt>Type</dt><dd>{{ ap.part_type.name }}</dd>
<dt>Sub type</dt><dd>{{ ap.sub_part_type.name if ap.sub_part_type else "—" }}</dd>
<dt>Scope model</dt>
<dd>
{% if ap.scope_model %}
{{ ap.scope_model.name }}
{% if ap.scope_model.url %} · <a href="{{ ap.scope_model.url }}" target="_blank" rel="noopener">link</a>{% endif %}
{% else %}—{% endif %}
</dd>
</dl>
</div>
{% if scope_info %}
<div class="card">
<h2>Scope information</h2>
<dl class="kv">
<dt>Magnification</dt>
<dd>
{% if scope_info.magnification_min is not none or scope_info.magnification_max is not none %}
{{ scope_info.magnification_min if scope_info.magnification_min is not none else "?" }}–{{ scope_info.magnification_max if scope_info.magnification_max is not none else "?" }}×
{% else %}—{% endif %}
</dd>
<dt>Model suffix</dt><dd>{{ scope_info.model_suffix or "—" }}</dd>
<dt>Objective lens diameter</dt>
<dd>
{% if scope_info.objective_lens_diameter_mm is not none %}
{{ scope_info.objective_lens_diameter_mm }} mm
{% else %}—{% endif %}
</dd>
<dt>Objective thread</dt><dd>{{ scope_info.objective_thread_pitch or "—" }}</dd>
</dl>
</div>
{% endif %}
</div>
{% if can_read_attachment_points %}
<div class="card">
{% include "admin/_augmented_part_attachment_points.html" %}
</div>
{% endif %}
{% if can_read_fits %}
<div class="card">
{% include "admin/_augmented_part_fits.html" %}
</div>
{% endif %}
<div class="card">
{% include "admin/_augmented_part_notes.html" %}
</div>
</main>
{% endblock %}