Migrate albums and pictures to their own tables

This commit is contained in:
imperosol
2025-01-26 12:51:54 +01:00
parent 99d85e0361
commit dc8a678e39
23 changed files with 1490 additions and 137 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
{% block content %}
<code>
<a href="{{ url('sas:main') }}">SAS</a> / {{ print_path(album.parent) }} {{ album.get_display_name() }}
<a href="{{ url('sas:main') }}">SAS</a> / {{ print_path(album.parent) }} {{ album.name }}
</code>
{% set is_sas_admin = user.can_edit(album) %}
@@ -30,7 +30,7 @@
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="album-navbar">
<h3>{{ album.get_display_name() }}</h3>
<h3>{{ album.name }}</h3>
<div class="toolbar">
<a href="{{ url('sas:album_edit', album_id=album.id) }}">{% trans %}Edit{% endtrans %}</a>
+2 -2
View File
@@ -1,6 +1,6 @@
{% macro display_album(a, edit_mode) %}
<a href="{{ url('sas:album', album_id=a.id) }}">
{% if a.file %}
{% if a.thumbnail %}
{% set img = a.get_download_url() %}
{% set alt = a.name %}
{% elif a.children.filter(is_folder=False, is_moderated=True).exists() %}
@@ -31,7 +31,7 @@
{% macro print_path(file) %}
{% if file and file.parent %}
{{ print_path(file.parent) }}
<a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> /
<a href="{{ url("sas:album", album_id=file.id) }}">{{ file.name }}</a> /
{% endif %}
{% endmacro %}
+1 -1
View File
@@ -100,7 +100,7 @@
<span
x-text="Intl.DateTimeFormat(
'{{ LANGUAGE_CODE }}', {dateStyle: 'long'}
).format(Date.parse(currentPicture.date))"
).format(Date.parse(currentPicture.created_at))"
>
</span>
</div>