2022-12-19 15:19:58 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-01-25 16:22:04 +01:00
|
|
|
<h2>{% block title %}{{ _('Détails de "%(name)s"', name=partition.name)}}{% endblock %}</h2>
|
|
|
|
<br/>
|
2022-12-19 15:19:58 +01:00
|
|
|
|
2023-06-23 22:19:00 +02:00
|
|
|
<form action="/partition/{{ partition.uuid }}/edit" method="post" enctype="multipart/form-data">
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-01-25 16:22:04 +01:00
|
|
|
{{ _("Responsable de l'ajout") }}
|
2023-06-23 22:19:00 +02:00
|
|
|
</td>
|
2023-10-01 14:47:49 +02:00
|
|
|
<td>
|
2023-06-23 22:19:00 +02:00
|
|
|
{% if user is not none %}
|
|
|
|
<div class="user-profile"><!-- Completely messy html for this -->
|
2023-11-23 21:22:16 +01:00
|
|
|
<div class="table-username">{{ partition_user.username }}</div>
|
|
|
|
<div class="user-profile-picture" style="background-color:{{ partition_user.color }};" title="{{ partition_user.username }}">
|
|
|
|
{{ partition_user.username[0] | upper }}
|
2023-06-23 22:19:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2024-01-25 16:22:04 +01:00
|
|
|
{{ _("Inconnu") }}
|
2023-06-23 22:19:00 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2023-08-30 19:50:00 +02:00
|
|
|
<tr>
|
|
|
|
<td>
|
2024-01-25 16:22:04 +01:00
|
|
|
{{ _("Type d'ajout") }}
|
2023-08-30 19:50:00 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if partition.source == "unknown" or partition.source == "upload" %}
|
|
|
|
{{ partition.source }}
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ partition.source }}">search</a>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2023-06-23 22:19:00 +02:00
|
|
|
<tr>
|
|
|
|
<td>
|
2024-01-25 16:22:04 +01:00
|
|
|
{{ _("Albums") }}
|
2023-06-23 22:19:00 +02:00
|
|
|
</td>
|
|
|
|
<td class="liste">
|
|
|
|
<ul>
|
|
|
|
{% for album in albums %}
|
|
|
|
<li><a href="/albums/{{ album.uuid }}">{{ album.name }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-01-25 16:22:04 +01:00
|
|
|
<td>{{ _("Fichier") }}</td>
|
2024-01-16 21:25:32 +01:00
|
|
|
<td><a href="/partition/{{ partition.uuid }}">
|
|
|
|
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg" loading="lazy">
|
|
|
|
</a></td>
|
2023-06-23 22:19:00 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-01-25 16:22:04 +01:00
|
|
|
<td>{{ _("Titre") }}</td>
|
|
|
|
<td><input name="name" type="text" value="{{ partition.name }}" placeholder="{{ _('Titre') }}" required /><br/></td>
|
2023-06-23 22:19:00 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-01-25 16:22:04 +01:00
|
|
|
<td>{{ _("Auteur") }}</td>
|
|
|
|
<td><input name="author" type="text" value="{{ partition.author }}" placeholder="{{ _('Auteur') }}" /><br/></td>
|
2023-06-23 22:19:00 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2024-01-25 16:22:04 +01:00
|
|
|
<td>{{ _("Paroles") }}</td>
|
|
|
|
<td><textarea id="paroles" name="body" type="text" placeholder="{{ _('Paroles') }}">{{ partition.body }}</textarea><br/></td>
|
2023-06-23 22:19:00 +02:00
|
|
|
</tr>
|
2023-10-26 14:14:40 +02:00
|
|
|
<tr>
|
2024-01-25 16:22:04 +01:00
|
|
|
<td>{{ _("Pièces jointes") }}</td>
|
2023-10-26 14:14:40 +02:00
|
|
|
{% set _ = partition.load_attachments() %}
|
|
|
|
<td><a href="/partition/{{ partition.uuid }}/attachments">
|
|
|
|
{% if partition.attachments %}
|
2024-01-25 16:22:04 +01:00
|
|
|
{% set number=partition.attachments | length %}
|
|
|
|
{{ _("Oui, %(number)s", number=number) }}
|
2023-10-26 14:14:40 +02:00
|
|
|
{% else %}
|
2024-01-25 16:22:04 +01:00
|
|
|
{{ _("En rajouter") }}
|
2023-10-26 14:14:40 +02:00
|
|
|
{% endif %}
|
|
|
|
</a></td>
|
|
|
|
</tr>
|
2023-06-23 22:19:00 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-01-25 16:22:04 +01:00
|
|
|
<input type="submit" value="{{ _('Mettre à jour') }}" />
|
2022-12-19 15:19:58 +01:00
|
|
|
</form>
|
|
|
|
<a href="/partition/{{ partition.uuid }}/delete">
|
2024-01-25 16:22:04 +01:00
|
|
|
<button id="delete-partition">{{ _("Supprimer") }}</button>
|
2022-12-19 15:19:58 +01:00
|
|
|
</a>
|
|
|
|
|
|
|
|
{% endblock %}
|