{# Trends table partial: swapped by the controls form via htmx. #} {% macro amount_cell(row, period) -%} {%- if period.key in row.cells -%} {%- set value = row.cells[period.key] -%} {{ '%.2f'|format(value) }} {%- else -%} {%- endif -%} {%- endmacro %} {% macro total_cell(value) -%} {{ '%.2f'|format(value) }} {%- endmacro %} {% macro sort_th(column, label, extra_class="") %} {% set state = params.sort_state_for_column(column) %} {{ label }} {% if state == 'asc' %} {% elif state == 'desc' %} {% else %} {% endif %} {% endmacro %} {% if table.rows %} {% else %} {% endif %}