added showing blogs by tag
This commit is contained in:
26
cao_blogr/templates/blog_bytag.jinja2
Normal file
26
cao_blogr/templates/blog_bytag.jinja2
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "layout.jinja2" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p><a href="{{ url_retour }}">[ retour ]</a></p>
|
||||
|
||||
<table class="table table-condensed">
|
||||
{% for entry in items %}
|
||||
<tr>
|
||||
<td>{{ entry.created.strftime("%d %b %y") }}</td>
|
||||
<td>
|
||||
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.slug) }}">{{ entry.title }}</a>
|
||||
</td>
|
||||
{% if entry.status != 'publié' %}
|
||||
<td><span class="label label-danger">{{ entry.status }}</span></td>
|
||||
{% else %}
|
||||
<td> </td>
|
||||
{% endif%}
|
||||
</tr>
|
||||
{% else %}
|
||||
<p class="text-danger">Aucun post trouvé !</p>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<p class="text-center">[ {{nb_items}} billets ]</p>
|
||||
|
||||
{% endblock %}
|
||||
@@ -46,6 +46,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<h2 class="text-center">Index</h2>
|
||||
<p class="text-center">
|
||||
|
|
||||
{% for tag in tags %}
|
||||
<a href="{{ request.route_url('blog_bytag', tag=tag.tag, retour='blog_search') }}">{{ tag.tag }}</a> |
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
<table id="posts_list" class="table table-condensed">
|
||||
{% for entry in last_ten %}
|
||||
<tr>
|
||||
<td>{{ entry.created.strftime("%d.%m.%Y") }}</td>
|
||||
<td>{{ entry.created.strftime("%d %b %y") }}</td>
|
||||
<td>
|
||||
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.slug) }}">{{ entry.title }}</a>
|
||||
</td>
|
||||
<td>{{ entry.tag }}</td>
|
||||
<td>
|
||||
[ <a href="{{ request.route_url('blog_bytag', tag=entry.tag, retour='home') }}">{{ entry.tag }}</a> ]
|
||||
</td>
|
||||
{% if entry.status != 'publié' %}
|
||||
<td><span class="label label-danger">{{ entry.status }}</span></td>
|
||||
{% else %}
|
||||
@@ -25,5 +27,5 @@
|
||||
<p class="text-danger">Aucun post trouvé</p>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ request.route_url('home') }}">CAO Blogr</a>
|
||||
<a class="navbar-brand" href="{{ request.route_url('home') }}">CAOTEK</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@@ -59,14 +59,10 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% if request.path == '/' %}
|
||||
{# -- display carousel -- #}
|
||||
{% block carousel %}
|
||||
{% endblock carousel %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Container (The Page Template Section) -->
|
||||
<div class="container">
|
||||
<br>
|
||||
<br>
|
||||
<!-- Display Page Title -->
|
||||
{% if page_title %}
|
||||
<h1>{{ page_title }}</h1>
|
||||
|
||||
Reference in New Issue
Block a user