Making objective_lens a thing

This commit is contained in:
Ian Roddis committed 2026-08-04 16:48:00 -03:00
1 parent fcb4dbaa62
commit 12e6984c63
17 files changed
+115 -119

No files matched your search

+3 -3
View File
@@ -8,10 +8,10 @@
{{ mag(info.magnification_max) }}
{%- endif -%}
{%- endmacro -%}
{%- macro magnification(info, objective_diameter_mm) -%}
{%- macro magnification(info) -%}
{%- set range = magnification_range(info) -%}
{%- if range -%}
{{ range }}x{% if objective_diameter_mm is not none %}{{ mag(objective_diameter_mm) }}{% endif %}
{{ range }}x{% if info.objective_lens_diameter_mm is not none %}{{ mag(info.objective_lens_diameter_mm) }}{% endif %}
{%- else -%}
<span class="muted">—</span>
{%- endif -%}
@@ -43,7 +43,7 @@
<td>{{ scope.manufacturer.name if scope.manufacturer else "—" }}</td>
<td>{{ scope.scope_model.name if scope.scope_model else "—" }}</td>
<td>{{ scope.sub_part_type.name if scope.sub_part_type else "—" }}</td>
<td>{{ magnification(info, row.objective_diameter_mm) }}</td>
<td>{{ magnification(info) }}</td>
<td>
{% if info and info.objective_thread_pitch %}
{{ info.objective_thread_pitch }}
@@ -44,6 +44,12 @@
{% 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>