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

60 lines
2.0 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<h2>{% block title %}{{ _("Modifier \"%(name)s\"", name=partition.name) }}{% endblock %}</h2>
<br/>
<form action="/partition/{{ partition.uuid }}/edit" method="post" enctype="multipart/form-data">
<table>
<tbody>
<tr>
<td>{{ _("Fichier") }}</td>
<td><a href="/partition/{{ partition.uuid }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg" loading="lazy">
</a></td>
</tr>
{% if partition.source != "unknown" and partition.source != "upload" %}
<tr>
<td>
{{ _("Source") }}
</td>
<td class="partition-source">
<a href="{{ partition.source }}">{{ partition.source.split("/")[2] }}</a>
</td>
</tr>
{% endif %}
<tr>
<td>{{ _("Titre") }}</td>
<td><input name="name" type="text" value="{{ partition.name }}" placeholder="{{ _('Titre') }}" required /><br/></td>
</tr>
<tr>
<td>{{ _("Auteur") }}</td>
<td><input name="author" type="text" value="{{ partition.author }}" placeholder="{{ _('Auteur') }}" /><br/></td>
</tr>
<tr>
<td>{{ _("Paroles") }}</td>
<td><textarea id="paroles" name="body" type="text" placeholder="{{ _('Paroles') }}">{{ partition.body }}</textarea><br/></td>
</tr>
<tr>
<td>{{ _("Pièces jointes") }}</td>
{% set _ = partition.load_attachments() %}
<td><a href="/partition/{{ partition.uuid }}/attachments">
{% if partition.attachments %}
{% set number=partition.attachments | length %}
{{ _("Oui, %(number)s", number=number) }}
{% else %}
{{ _("En rajouter") }}
{% endif %}
</a></td>
</tr>
</tbody>
</table>
<input type="submit" value="{{ _('Mettre à jour') }}" />
</form>
<a href="/partition/{{ partition.uuid }}/delete">
<button id="delete-partition">{{ _("Supprimer") }}</button>
</a>
{% endblock %}