mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 19:23:27 +00:00
Enhance user picture view
This commit is contained in:
parent
7453b857fb
commit
8771cc9b86
@ -85,7 +85,7 @@
|
|||||||
<div class="tools">
|
<div class="tools">
|
||||||
{% for t in list_of_tabs %}
|
{% for t in list_of_tabs %}
|
||||||
<a href="{{ t.url }}"
|
<a href="{{ t.url }}"
|
||||||
{%- if current_tab == t.slug -%}
|
{%- if current_tab == t.slug %}
|
||||||
class="selected_tab"
|
class="selected_tab"
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
>{{ t.name }}</a>
|
>{{ t.name }}</a>
|
||||||
|
@ -6,19 +6,27 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for r in profile.pictures.exclude(picture=None).values('user__pictures__picture__parent').distinct() %}
|
{% set album = None %}
|
||||||
|
{% set new_album = True %}
|
||||||
|
{% for r in profile.pictures.exclude(picture=None).order_by('-picture__parent__id', 'id') -%}
|
||||||
|
{%- if album != r.picture.parent %}
|
||||||
|
{%- if album %}
|
||||||
|
</div>
|
||||||
|
{% endif -%}
|
||||||
|
{% set new_album = True %}
|
||||||
|
{% set album = r.picture.parent %}
|
||||||
<div style="padding: 10px">
|
<div style="padding: 10px">
|
||||||
{% set album = profile.pictures.filter(picture__parent=r['user__pictures__picture__parent']).first().picture.parent %}
|
|
||||||
<h4>{{ album.name }}</h4>
|
<h4>{{ album.name }}</h4>
|
||||||
<hr>
|
<hr>
|
||||||
{% for r in profile.pictures.exclude(picture=None).filter(picture__parent=album).order_by('id') %}
|
{% else %}
|
||||||
|
{% set new_album = False %}
|
||||||
|
{%- endif %}
|
||||||
<div class="picture">
|
<div class="picture">
|
||||||
<a href="{{ url("sas:picture", picture_id=r.picture.id) }}#pict">
|
<a href="{{ url("sas:picture", picture_id=r.picture.id) }}#pict">
|
||||||
<img src="{{ r.picture.as_picture.get_download_thumb_url() }}" alt="{{ r.picture.get_display_name() }}" style="max-width: 100%"/>
|
<img src="{{ r.picture.as_picture.get_download_thumb_url() }}" alt="{{ r.picture.get_display_name() }}" style="max-width: 100%"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user