{% macro buttons(is_popup=False) %}
{% if not is_popup %} {% for action in actions %} {%- set action_url = stream.url_for(env, action.action, item=item.id) -%} {{- action.title -}} {% endfor -%} {% endif %} {% if save_allowed %}
{% if 'save_and_continue' in item_buttons %} Сохранить {% endif %} {% macro buttons_in_tooltip() %} {%- if create_allowed and 'save_and_add_another' in item_buttons -%} … и создать новый {%- endif -%} {%- if list_allowed and 'save' in item_buttons -%} … и закрыть {%- endif -%} {% endmacro %} {% set buttons_in_tooltip_rendered = buttons_in_tooltip() %} {% if buttons_in_tooltip_rendered %}
{{- buttons_in_tooltip_rendered -}}
{% endif %}
{% endif %}
{% endmacro %} {% block content %}
{% endblock %}