mirror of
https://github.com/ae-utbm/sith3.git
synced 2024-06-26 16:38:06 +00:00
38 lines
1.4 KiB
Django/Jinja
38 lines
1.4 KiB
Django/Jinja
{% macro user_profile_link(user) -%}
|
|
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_display_name() }}</a>
|
|
{%- endmacro %}
|
|
|
|
{% 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 %}
|
|
|
|
{% macro user_mini_profile(user) %}
|
|
<div id="user_profile">
|
|
<div id="pictures">
|
|
{% if user.profile_pict %}
|
|
<img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
|
|
{% endif %}
|
|
</div>
|
|
<p>{{ user.get_full_name() }}</p>
|
|
{% if user.nick_name %}
|
|
<p id="nickname">« {{ user.nick_name }} »</p>
|
|
{% endif %}
|
|
{% if user.date_of_birth %}
|
|
<p>{% trans %}Born: {% endtrans %}{{ user.date_of_birth|date("d/m/Y") }}</p>
|
|
{% endif %}
|
|
{% if user.promo %}
|
|
<p><img src="{{ static('core/img/promo_%02d.png' % user.promo) }}" alt="Promo {{ user.promo }}" class="promo_pict" />
|
|
{% trans %}Promo: {% endtrans %}{{ user.promo }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{%- endmacro %}
|