Add an ‘edit’ field type

Like the link field, but right aligns so that it sits nicely in the
last column of a table.
This commit is contained in:
Chris Hill-Scott
2016-08-22 13:49:41 +01:00
parent f84e8e2519
commit fc93d9ff52
2 changed files with 14 additions and 8 deletions

View File

@@ -85,6 +85,12 @@
{% endcall %}
{%- endmacro %}
{% macro edit_field(text, link) -%}
{% call field(align='right') %}
<a href="{{ link }}">{{ text }}</a>
{% endcall %}
{%- endmacro %}
{% macro boolean_field(yes) -%}
{% call field(status='yes' if yes else 'no') %}
{{ "Yes" if yes else "No" }}