{% macro icon(icon) %} {% endmacro %} {%- macro page_actions(tools) -%} {%- endmacro -%} {% macro page_header(title) %} {% endmacro %} {% macro label_visible(visible) %} {% import _self as macro %} {% if visible %} {{ macro.label('badge.visible', 'success') }} {% else %} {{ macro.label('badge.invisible', 'warning') }} {% endif %} {% endmacro %} {% macro label_role(role) %} {% import _self as macro %} {% if role == 'ROLE_SUPER_ADMIN' %} {{ macro.label(role, 'danger') }} {% else %} {{ macro.label(role, 'primary') }} {% endif %} {% endmacro %} {% macro username(user) %} {{ user.alias|default(user.username) }} {% endmacro %} {% macro label_user(user) %} {% import _self as macro %} {{ macro.label(macro.username(user), 'primary') }} {% endmacro %} {% macro label_activity(activity) %} {% import _self as macro %} {% set isVisible = activity.visible %} {% if isVisible and not activity.project is null %} {% set isVisible = activity.project.visible %} {% if isVisible and not activity.project.customer is null %} {% set isVisible = activity.project.customer.visible %} {% endif %} {% endif %} {% set label = '' %} {% if not activity.project is null %} {% set label = activity.project.customer.name ~ ': ' ~ activity.project.name %} {% endif %} {{ macro.label(activity.name, (isVisible ? 'primary' : 'warning'), label) }} {% endmacro %} {% macro label_project(project) %} {% import _self as macro %} {% if project.visible and project.customer.visible %} {{ macro.label(project.name, 'primary', project.customer.name) }} {% else %} {{ macro.label(project.name, 'warning', project.customer.name) }} {% endif %} {% endmacro %} {% macro label_customer(customer) %} {% import _self as macro %} {% if customer.visible %} {{ macro.label(customer.name, 'primary') }} {% else %} {{ macro.label(customer.name, 'warning') }} {% endif %} {% endmacro %} {% macro badge_counter(count, url) %} {% if url %} {{ count }} {% else %} {{ count }} {% endif %} {% endmacro %} {% macro label(title, type, tooltip) %} {# success, warning, danger, primary #} {{ title|trans }} {% endmacro %} {% macro badge(title, color) %} {# black, green, blue, yellow #} {{ title|trans }} {% endmacro %} {% macro alert(type, description, title, icon) %}
{% if title %}

{{ title|trans }}

{% endif %} {{ description|trans }}
{% endmacro %} {% macro callout(type, description, title, icon) %}
{% if title %}

{% if icon %}{% endif %} {{ title|trans }}

{% endif %}

{{ description|trans }}

{% endmacro %} {% macro info_box_progress(title, description, amount, percentage, icon, color) %}
{{ title|trans }} {{ amount }}
{{ description }}
{% endmacro %} {% macro button_group_dropdown(title, actions) %}
{% endmacro %} {% macro button_group(actions) %} {% import _self as macro %}
{% for icon, url in actions %} {{ macro.button_action(icon, url) }} {% endfor %}
{% endmacro %} {% macro button_action(icon, url) %} {% endmacro %}