|
53 | 53 | {% endif %} |
54 | 54 | {% endif %} |
55 | 55 |
|
56 | | - {% if children_albums|length > 0 %} |
57 | | - <h4>{% trans %}Albums{% endtrans %}</h4> |
58 | | - <div class="albums"> |
59 | | - {% for a in children_albums %} |
60 | | - {{ display_album(a, is_sas_admin) }} |
61 | | - {% endfor %} |
| 56 | + {% if show_albums %} |
| 57 | + <div x-data="albums({ parentId: {{ album.id }} })" class="margin-bottom"> |
| 58 | + <h4>{% trans %}Albums{% endtrans %}</h4> |
| 59 | + <div class="albums" :aria-busy="loading"> |
| 60 | + <template x-for="album in albums" :key="album.id"> |
| 61 | + <a :href="album.sas_url"> |
| 62 | + <div |
| 63 | + x-data="{thumbUrl: album.thumbnail || '{{ static("core/img/sas.jpg") }}'}" |
| 64 | + class="album" |
| 65 | + :class="{not_moderated: !album.is_moderated}" |
| 66 | + > |
| 67 | + <img :src="thumbUrl" :alt="album.name" loading="lazy" /> |
| 68 | + <template x-if="album.is_moderated"> |
| 69 | + <div class="text" x-text="album.name"></div> |
| 70 | + </template> |
| 71 | + <template x-if="!album.is_moderated"> |
| 72 | + <div class="overlay"> </div> |
| 73 | + <div class="text">{% trans %}To be moderated{% endtrans %}</div> |
| 74 | + </template> |
| 75 | + </div> |
| 76 | + {% if edit_mode %} |
| 77 | + <input type="checkbox" name="file_list" :value="album.id"> |
| 78 | + {% endif %} |
| 79 | + </a> |
| 80 | + </template> |
| 81 | + </div> |
62 | 82 | </div> |
63 | | - |
64 | | - <br> |
65 | 83 | {% endif %} |
66 | 84 |
|
67 | 85 | <div x-data="pictures({ albumId: {{ album.id }}, maxPageSize: {{ settings.SITH_SAS_IMAGES_PER_PAGE }} })"> |
68 | | - {{ download_button(_("Download album")) }} |
69 | | - |
70 | 86 | <h4>{% trans %}Pictures{% endtrans %}</h4> |
| 87 | + <br> |
| 88 | + {{ download_button(_("Download album")) }} |
71 | 89 | <div class="photos" :aria-busy="loading"> |
72 | 90 | <template x-for="picture in getPage(page)"> |
73 | 91 | <a :href="picture.sas_url"> |
74 | | - <div |
75 | | - class="photo" |
76 | | - :class="{not_moderated: !picture.is_moderated}" |
77 | | - > |
| 92 | + <div class="photo" :class="{not_moderated: !picture.is_moderated}"> |
78 | 93 | <img :src="picture.thumb_url" :alt="picture.name" loading="lazy" /> |
79 | 94 | <template x-if="!picture.is_moderated"> |
80 | 95 | <div class="overlay"> </div> |
|
0 commit comments