{# src/urika/dashboard/templates/_macros.html #} {% macro tabs(name, panels) %} {# panels = list of {id, label} dicts; the caller supplies the panel bodies as Jinja blocks named after the panel ids. #}
{% for p in panels %} {% endfor %}
{{ caller(active='') }}
{% endmacro %} {% macro action_label(verb, noun, exists) -%} {# "Generate report" / "Re-generate report"; "Finalize project" / "Re-finalize project". Use for any button or modal title where we toggle on prior-artifact existence. #} {%- if exists -%}Re-{{ verb | lower }} {{ noun }}{%- else -%}{{ verb }} {{ noun }}{%- endif -%} {%- endmacro %} {% macro modal(id, title) %} {# Usage: {% call modal('new-experiment', 'New experiment') %}
...
{% endcall %} Trigger with: #} {% endmacro %}