engelsystem/resources/views/macros/base.twig

26 lines
750 B
Twig

{% macro angel() %}
<span class="icon-icon_angel"></span>
{% endmacro %}
{% macro glyphicon(glyph) %}
<span class="glyphicon glyphicon-{{ glyph }}"></span>
{% endmacro %}
{% macro alert(message, type) %}
<div class="alert alert-{{ type|default('info') }}">{{ message }}</div>
{% endmacro %}
{% macro user(user) %}
<a href="{{ url('users', {'action': 'view', 'user_id': user.id}) }}"
{%- if not user.state.arrived %} class="text-muted"{% endif -%}
>
{{ _self.angel() }} {{ user.name }}
</a>
{% endmacro %}
{% macro button(label, url, type, size) %}
<a href="{{ url }}" class="btn btn-{{ type|default('default') }}{% if size %} btn-{{ size }}{% endif %}">
{{ label }}
</a>
{% endmacro %}