mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-13 05:19:26 +00:00
See description
- Reworked CSS of user photos tab - Reworked Picture page CSS - A message is now displayed on the user page when he's tagged on a picture in can't access (picture unavailable)
This commit is contained in:
@ -1,5 +1,10 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{%- block additional_css -%}
|
||||
<link rel="stylesheet" href="{{ scss('core/override.scss') }}">
|
||||
<link rel="stylesheet" href="{{ scss('sas/album.scss') }}">
|
||||
{%- endblock -%}
|
||||
|
||||
{% block title %}
|
||||
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s pictures{% endtrans %}
|
||||
{% endblock %}
|
||||
@ -8,19 +13,35 @@
|
||||
{% if can_edit(profile, user) %}
|
||||
<button id="download_all_pictures", onclick=download_pictures()>{% trans %}Download all my pictures{% endtrans %}</button>
|
||||
{% endif %}
|
||||
{% for a in albums %}
|
||||
<div style="padding: 10px">
|
||||
{% for a in albums %}
|
||||
<h4>{{ a.name }}</h4>
|
||||
<hr>
|
||||
{% for picture in pictures[a.id] %}
|
||||
<div class="picture">
|
||||
<a href="{{ url("sas:picture", picture_id=picture.id) }}#pict">
|
||||
<img src="{{ picture.get_download_thumb_url() }}" alt="{{ picture.get_display_name() }}" style="max-width: 100%" loading="lazy"/>
|
||||
</a>
|
||||
<div class="photos">
|
||||
{% for p in pictures[a.id] %}
|
||||
{% if p.can_be_viewed_by(user) %}
|
||||
<a href="{{ url("sas:picture", picture_id=p.id) }}#pict">
|
||||
<div
|
||||
class="photo{% if not p.is_moderated %} not_moderated{% endif %}"
|
||||
style="background-image: url('{% if p.file %}{{ p.get_download_url() }}{% else %}{{ static('core/img/sas.jpg') }}{% endif %}');"
|
||||
>
|
||||
{% if not p.is_moderated %}
|
||||
<div class="overlay"> </div>
|
||||
<div class="text">{% trans %}To be moderated{% endtrans %}</div>
|
||||
{% else %}
|
||||
<div class="text"> </div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
{% else %}
|
||||
<div>
|
||||
<div class="photo">
|
||||
<div class="text">{% trans %}Picture Unavailable{% endtrans %}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
|
Reference in New Issue
Block a user