{% 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 %} {% if activity.visible and activity.project.visible and activity.project.customer.visible %} {{ macro.label(activity.name, 'primary', activity.project.customer.name ~ ': ' ~ activity.project.name) }} {% else %} {{ macro.label(activity.name, 'warning', activity.project.customer.name ~ ': ' ~ activity.project.name) }} {% endif %} {% 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_counter(title, amount, icon, color, url) %}
{# this is a ugly hack, make me look nicely (dashboard widget with link) #} {% if url %} {% endif %} {{ title|trans }} {{ amount }} {% if url %} {% endif %}
{% endmacro %} {% macro info_box_progress(title, description, amount, percentage, icon, color) %}
{{ title|trans }} {{ amount }}
{{ description }}
{% endmacro %} {% macro info_box_more(title, amount, unit, url, icon, color) %}

{{ amount }}{{ unit|default('') }}

{{ title|trans }}

{{ 'more.info.link'|trans }}
{% 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 %}