{% from "macros/form.html" import m_field %} {% macro m_tags(entity, ns=None) %} {%- set tags_form = tags.entity_tags_form(entity)(obj=entity, ns=ns) %} {{ tags_form['tags'].render_view() }} {% endmacro %} {# display tags from a search result #} {% macro m_tags_from_hit(hit) %} {%- for tag in tags.tags_from_hit(hit['tag_ids']) %} {{ tag.label }} {%- endfor %} {% endmacro %} {% macro m_tags_form(entity, ns=None) %} {%- set ctx = tags.get_form_context(entity) %}
{% endmacro %} {# show tags with an edit button, that replaces content by edit form #} {% macro m_tags_toggle_edit(entity, ns=None) %}