added topic_edit.jinja2

This commit is contained in:
2022-05-10 21:29:32 +02:00
parent cd5651ac62
commit 4f5bb3350e
16 changed files with 179 additions and 143 deletions

View File

@@ -54,16 +54,16 @@
<div class="container">
<div align="center">
<span class="menu-item">
<a href="{{ request.route_url('topic', topic='FR1') }}">Enseignement</a>&nbsp;
<a href="{{ request.route_url('topic', topic='FR1') }}">ENSEIGNEMENT</a>&nbsp;
</span>
<span class="menu-item">
<a href="{{ request.route_url('topic', topic='FR2') }}">Pratique</a>&nbsp;
<a href="{{ request.route_url('topic', topic='FR2') }}">PRATIQUE</a>&nbsp;
</span>
<span class="menu-item">
<a href="{{ request.route_url('topic', topic='FR3') }}">Qi Gong</a>&nbsp;
<a href="{{ request.route_url('topic', topic='FR3') }}">Qi GONG</a>&nbsp;
</span>
<span class="menu-item">
<a href="{{ request.route_url('topic', topic='FR4') }}">Sciences</a>&nbsp;
<a href="{{ request.route_url('topic', topic='FR4') }}">SCIENCES</a>&nbsp;
</span>
</div>

View File

@@ -11,7 +11,7 @@
</div>
{% endif %}
<div class="col-sm-3">
<a href=" {{request.route_url('users')}} "><span class="glyphicon glyphicon-user icone-big"></span>
<a href=" {{request.route_url('topics')}} "><span class="glyphicon glyphicon-list icone-big"></span>
<h4>TOPICS / TAGS</h4>
</a>
</div>

View File

@@ -2,12 +2,16 @@
{% block content %}
{{ topic_quote | safe }}
<br />
{% if request.authenticated_userid %}
<p><a href="{{ request.route_url('blog_edit', topic=topic, id='0') }}" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
</p>
{% endif%}
{{ liste | safe }}
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends "cao_blogr:templates/layout.jinja2" %}
{% block content %}
<form action="{{ url }}" method="post" class="form">
{% 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.topic_name.errors %}
<div class="error">{{error}}</div>
{% endfor %}
<div class="form-group">
<label class="required-field" for="topic_name">{{form.topic_name.label}}</label>
{{form.topic_name(class_='form-control')}}
</div>
{% for error in form.topic_quote.errors %}
<div class="error">{{ error }}</div>
{% endfor %}
<div class="form-group">
<label class="required-field" for="topic_quote">{{ form.topic_quote.label }}</label>
{{ form.topic_quote(class_='form-control', cols="35", rows="5") }}
</div>
<div class="form-group">
<a class="btn btn-default" href="{{ request.route_url('topics') }}">
<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>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,30 @@
{% extends "layout.jinja2" %}
{% block content %}
<p>
<a href="{{ request.route_url('settings') }}" class="btn btn-default" role="button">
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<a href="{{ request.route_url('user_add', name='new') }}" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span> Nouvel utilisateur</a>
</p>
<table id="users_list" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Rubrique</th>
<th>Nom</th>
</tr>
</thead>
{% for entry in topics %}
<tr>
<td>{{ entry.topic }}</td>
<td>
<a href="{{ request.route_url('topic_edit', topic=entry.topic) }}">
{{ entry.topic_name }}
</a>
</td>
</tr>
{% endfor %}
</table>
{% endblock %}