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

59 lines
1.8 KiB
HTML
Raw Normal View History

2022-12-18 22:40:07 +01:00
{% extends 'base.html' %}
2022-12-18 22:40:07 +01:00
{% block content %}
<h2>{% block title %}Modifier "{{ partition.name }}"{% endblock %}</h2>
2022-12-18 22:40:07 +01:00
<br/>
<form action="/partition/{{ partition.uuid }}/edit" method="post" enctype="multipart/form-data">
<table>
<tbody>
<tr>
<td>Fichier</td>
2024-01-16 21:00:14 +01:00
<td><a href="/partition/{{ partition.uuid }}">
<img class="partition-thumbnail" src="/thumbnails/{{ partition.uuid }}.jpg">
</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 %}
Oui, {{ partition.attachments | length }}
{% else %}
En rajouter
{% endif %}
</a></td>
</tr>
</tbody>
</table>
2022-12-18 22:40:07 +01:00
<input type="submit" value="Mettre à jour" />
</form>
<a href="/partition/{{ partition.uuid }}/delete">
<button id="delete-partition">Supprimer</button>
2022-12-18 22:40:07 +01:00
</a>
{% endblock %}