partitioncloud-server/partitioncloud/templates/partition/details.html

89 lines
2.9 KiB
HTML
Raw Normal View History

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
<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") }}
</td>
<td>
{% if user is not none %}
<div class="user-profile"><!-- Completely messy html for this -->
<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 }}
</div>
</div>
{% else %}
2024-01-25 16:22:04 +01:00
{{ _("Inconnu") }}
{% endif %}
</td>
</tr>
<tr>
<td>
2024-01-25 16:22:04 +01:00
{{ _("Type d'ajout") }}
</td>
<td>
{% if partition.source == "unknown" or partition.source == "upload" %}
{{ partition.source }}
{% else %}
<a href="{{ partition.source }}">search</a>
{% endif %}
</td>
</tr>
<tr>
<td>
2024-01-25 16:22:04 +01:00
{{ _("Albums") }}
</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>
</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>
</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>
</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>
</tr>
<tr>
2024-01-25 16:22:04 +01:00
<td>{{ _("Pièces jointes") }}</td>
{% 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) }}
{% else %}
2024-01-25 16:22:04 +01:00
{{ _("En rajouter") }}
{% endif %}
</a></td>
</tr>
</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 %}