macros.jinja 613 Bytes
Newer Older
Skia's avatar
Skia committed
1 2 3
{% macro user_profile_link(user) -%}
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_display_name() }}</a>
{%- endmacro %}
Skia's avatar
Skia committed
4 5 6 7 8 9 10 11 12 13 14 15 16

{% macro user_link_with_pict(user) -%}
<a href="{{ url("core:user_profile", user_id=user.id) }}" class="mini_profile_link" >
    <span>
    {% if user.profile_pict %}
    <img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
    {% else %}
    <img src="{{ static('core/img/na.gif') }}" alt="{% trans %}Profile{% endtrans %}" />
    {% endif %}
    </span>
    <em>{{ user.get_display_name() }}</em>
    </a>
{%- endmacro %}