Files
cao_sunyata/cao_blogr/templates/blog.jinja2
2022-09-14 17:33:17 +02:00

37 lines
1.5 KiB
Django/Jinja

{% extends "cao_blogr:templates/layout.jinja2" %}
{% block content %}
{% if request.authenticated_userid %}
<p>
<a href="{{ request.route_url('topic', topic=entry.topic_id) }}" class="btn btn-default" role="button">
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<a href="{{ request.route_url('blog_edit', topic=entry.topic_id, id=entry.id) }}" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
<a href="{{ request.route_url('blog_copy', topic=entry.topic_id, id=entry.id) }}" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-duplicate"></span> Duppliquer</a>
</p>
{% endif %}
<hr/>
<p>{{ body_html | safe }}</p>
<hr/>
<p>
Auteur : <strong>{{ entry.author }}</strong><br>
Publié le : <strong>{{ entry.created.strftime("%d-%m-%Y - %H:%M") }}</strong><br>
{% if request.authenticated_userid %}
Topic - Tag : <strong>{{ entry.topic_id }}</strong> - <strong>{{ entry.tag }}</strong><br>
Statut : <strong>{{ entry.status }}</strong>
{% endif %}
</p>
<script>
const anchors = document.querySelectorAll('a');
anchors.forEach((a) => {
a.setAttribute('target', '__blank');
a.setAttribute('rel', 'noopener noreferrer');
});
</script>
{% endblock %}