finalize topic template

This commit is contained in:
2022-05-03 19:24:51 +02:00
parent cd7e21bb53
commit e7bebbe5e4
13 changed files with 101 additions and 65 deletions

View File

@@ -20,37 +20,27 @@
{{ form.body(class_='form-control', cols="35", rows="20") }}
</div>
{% for error in form.topic.errors %}
<div class="error">{{ error }}</div>
{% endfor %}
<div class="form-group">
<label class="required-field" for="topic">{{ form.topic.label }}</label>
{{ form.topic(class_='form-control') }}
</div>
{% for error in form.tag.errors %}
<div class="text-danger">{{ error }}</div>
{% endfor %}
<div class="form-group">
<label class="required-field" for="tag">{{ form.tag.label }}</label>
{{ form.tag(class_='form-control') }}
</div>
<p>
Topic : <strong>{{ entry.topic }}</strong>
&nbsp;|&nbsp;
Tag : <strong>{{ entry.tag }}</strong>
&nbsp;|&nbsp;
Créé le : <strong>{{ entry.created.strftime("%d-%m-%Y - %H:%M") }}</strong>
&nbsp;|&nbsp;
Modifié le : <strong>{{ entry.edited.strftime("%d-%m-%Y - %H:%M") }}</strong>
<p>
Topic : <strong>{{ entry.topic_id }}</strong>
{% if blog_id != '0' %}
&nbsp;|&nbsp;
Créé le : <strong>{{ entry.created.strftime("%d-%m-%Y - %H:%M") }}</strong>
&nbsp;|&nbsp;
Modifié le : <strong>{{ entry.edited.strftime("%d-%m-%Y - %H:%M") }}</strong>
{% endif %}
</p>
<br />
<div class="form-group">
<a class="btn btn-default" href="{{ request.route_url('home') }}"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<a class="btn btn-default" href="{{ request.route_url('topic', topic=entry.topic_id) }}">
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<button class="btn btn-primary" type="submit" name="form.submitted">
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
{% if action == 'edit' %}
{% if blog_id != '0' %}
<button class="btn btn-warning" type="submit" name="form.deleted">
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
{% endif %}