aboutsummaryrefslogtreecommitdiffstats
path: root/templates/news/show.html
blob: 40844500b0e3ab470d6b327a620135bf39c09a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends 'layout.html' %}

{% block content %}
<div class="quickview"/>
<h2>Détails</h2>
<ul>
    <li>Auteur : <a href="{{url_for('view_user', user_id=news.user_id)}}">{{news.user_name}}</a></li>
    <li>Date : {{news.date|format_date}} </li>
    <li><a href="#comments">{{"Commentaire"|pluralize(comments|count)}}</a></li>
</div>

<div class="news"/>
<h1>{{news.title}}</h1>

<div class="news_content">
{{news.content_cache|safe}}
</div>

<hr/>
<h2 id="comments">Commentaires</h2>
{% if not comments %}
Pas de commentaires pour l'instant.
{% endif %}
{% for comment in comments %}
<h3 class="comment">
    Posté par <a href="{{url_for('view_user', user_id=comment.user_id)}}">{{comment.user_name}}</a> le {{comment.date|format_date}}
</h3>
<div class="comment_content"/>
{{comment.content_cache|safe}}
</div>
{% endfor %}

<h2 id="add">Ajouter un commentaire</h2>

<form class="comment_add" method="post" action="{{url_for('show_news', news_id=news.id)}}">
<textarea name="content" cols="90" rows="10">
</textarea>

<p class="submit"><input type="submit" value="Ajouter"/></p>
</div>
<div style="clear:both"/>
{% endblock %}