The actions are now on every page in the same place instead of a button row that differed per page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
1002 B
HTML
20 lines
1002 B
HTML
{% macro badge(status, label, field=None) -%}
|
|
<span class="badge badge-{{ status }}" {% if field %}data-badge="{{ field }}"{% endif %}><span class="dot" aria-hidden="true"></span><span data-badge-label>{{ label }}</span></span>
|
|
{%- endmacro %}
|
|
|
|
{% macro menu_action(url, label, confirm=None, confirm_title=None, danger=False) -%}
|
|
<form method="post" action="{{ url }}" {% if confirm %}data-confirm="{{ confirm }}" data-confirm-title="{{ confirm_title or label }}"{% endif %}>
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit"{% if danger %} class="danger"{% endif %}>{{ label }}</button>
|
|
</form>
|
|
{%- endmacro %}
|
|
|
|
{% macro csrf() -%}
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
{%- endmacro %}
|
|
|
|
{# Width is applied by app.js: the CSP does not allow inline style attributes. #}
|
|
{% macro meter(percent, field) -%}
|
|
<div class="meter" role="presentation"><span data-meter="{{ field }}" data-pct="{{ percent }}"></span></div>
|
|
{%- endmacro %}
|