diff options
Diffstat (limited to 'templates/news/list.html')
| -rw-r--r-- | templates/news/list.html | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/templates/news/list.html b/templates/news/list.html index a5a367a..c7ea740 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -1,15 +1,21 @@ {% extends 'layout.html' %} {% block content %} +<div class="second_menu"> + <a href="/news/add/">Ajouter une actualité</a> +</div> <div class="news"> {% for news in news %} <div class="news_head"> - <h2><a href="{{ url_for('show_news', news_id = news.id)}}"> - {{ news.title }}</a> - </h2> - <p>Posté par <a href="">{{ news.name }}</a> le {{news.date|format_date}}</p> + <h2><a href="{{url_for('show_news', news_id = news.id)}}">{{ news.title }}</a> + </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> + </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> </div> - <div class="news_content"> {{ news.content_cache|safe }} </div> |
