aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/news/list.html10
-rw-r--r--templates/news/show.html5
2 files changed, 11 insertions, 4 deletions
diff --git a/templates/news/list.html b/templates/news/list.html
index c7ea740..b2bee8a 100644
--- a/templates/news/list.html
+++ b/templates/news/list.html
@@ -11,13 +11,17 @@
</h2>
{% if news.user_name==session.user_name %}
<div style="float:right">
- <a href="{{ url_for('edit_news', news_id = news.id)}}">Modifier cette actualité</a>
+ <a href="{{url_for('edit_news', news_id = news.id)}}">Modifier cette actualité</a>
</div>
{% endif %}
- <p>Posté par <a href="{{ url_for('view_user', user_id = news.user_id)}}">{{ news.user_name }}</a> le {{news.date|format_date}}</p>
+ <p>Posté par <a href="{{url_for('view_user', user_id = news.user_id)}}">{{ news.user_name }}</a> le {{news.date|format_date}}</p>
</div>
+ <p class="comments">
+ <a href="{{url_for('show_news', news_id = news.id)}}#comments">{{news.ncomments|pluralize}}</a>|
+ <a href="{{url_for('show_news', news_id = news.id)}}#add">Ajouter un commentaire</a>
+</p>
<div class="news_content">
- {{ news.content_cache|safe }}
+ <p>{{ news.content_cache|safe }}</p>
</div>
{% endfor %}
</div>
diff --git a/templates/news/show.html b/templates/news/show.html
index 782b0a4..dcc4e4a 100644
--- a/templates/news/show.html
+++ b/templates/news/show.html
@@ -18,9 +18,12 @@
<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', comment.user_name)}}">{{comment.user_name}}</a> le {{comment.date|format_date}}
+ 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}}