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

@@ -0,0 +1,23 @@
{% extends "cao_blogr:templates/layout.jinja2" %}
{% block content %}
<div class="container-fluid">
<div class="row text-center">
<div class="col-sm-3">
<a href=" {{request.route_url('users')}} "><span class="glyphicon glyphicon-user icone-big"></span></a>
<h4>UTILISATEURS</h4>
</div>
<div class="col-sm-3">
<a href=" {{request.route_url('users')}} "><span class="glyphicon glyphicon-user icone-big"></span></a>
<h4>TOPICS / TAGS</h4>
</div>
<div class="col-sm-3">
<a href=" {{request.route_url('topic', topic='ADM')}} "><span class="glyphicon glyphicon-file icone-big"></span></a>
<h4>PAGES ADMIN</h4>
</div>
</div>
</div>
{% endblock %}

View File

@@ -4,8 +4,8 @@
{% if request.authenticated_userid %}
<p>
<a href="{{ request.route_url('home') }}">[ Retour ]</a>
<a href="{{ request.route_url('blog_edit', id=entry.id) }}">[ Modifier ]</a>
<a href="{{ request.route_url('topic', topic=entry.topic_id) }}">[ Retour ]</a>
<a href="{{ request.route_url('blog_edit', topic=entry.topic_id, id=entry.id) }}">[ Modifier ]</a>
</p>
{% endif %}

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 %}

View File

@@ -149,7 +149,6 @@
<!-- Container (POSTS Section) -->
<div id="posts">
<br>
<h2 class="text-center">DERNIERES PUBLICATIONS</h2>
<ul>
@@ -174,7 +173,7 @@
<div class="row">
<div class="col-xs-4">
<p><span class="glyphicon glyphicon-envelope"></span>&nbsp;Centre Méditation Sunyata Paris<br>
<p><span class="glyphicon glyphicon-envelope"></span>&nbsp;Centre de Méditation Sunyata<br>
116 bd Maréchal Foch<br>
93160 NOISY LE GRAND
</p>

View File

@@ -91,7 +91,7 @@
|&nbsp;<a href="{{ request.route_url('topic', topic='FR2') }}">Pratique</a>&nbsp;
|&nbsp;<a href="{{ request.route_url('topic', topic='FR3') }}">Qi Gong</a>&nbsp;
|&nbsp;<a href="{{ request.route_url('topic', topic='FR4') }}">Sciences</a>&nbsp;
|&nbsp;<a href="{{ request.route_url('topic', topic='FR9') }}">Méditation Sunyata</a>&nbsp;
|&nbsp;<a href="{{ request.route_url('topic', topic='FR9') }}">A propos</a>&nbsp;
|</big>
</p>
<p class="text-center">
@@ -99,7 +99,7 @@
&nbsp|&nbsp<a href="{{ request.route_url('blog', id=1, slug='mentions-l%25C3%25A9gales') }}">Mentions légales</a>
{% if request.authenticated_userid == 'admin' %}
&nbsp|&nbsp<a href="{{request.route_url('users')}}">Utilisateurs</a>
&nbsp|&nbsp<a href="{{request.route_url('admin')}}">Admin</a>
{% endif %}
</p>

View File

@@ -3,21 +3,11 @@
{% block content %}
{% if request.authenticated_userid %}
<p><a href="{{ request.route_url('blog_edit', topic='topic', id='0') }}">
<p><a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}">
[Nouveau post]</a>
</p>
{% endif%}
<ul>
{% for entry in items %}
<li>
{{ entry.edited.strftime("%d-%m-%Y") }}&nbsp;&nbsp;
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.slug) }}">
<span class="glyphicon glyphicon-menu-right"></span>&nbsp;&nbsp;{{ entry.title }}
</a>
</li>
{% endfor %}
</ul>
{{ liste | safe }}
{% endblock %}