diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-07 22:22:58 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-07 22:22:58 -0500 |
| commit | d7e915f77c42f6d0c5a85e03d87106c27082ec99 (patch) | |
| tree | 41c5221cb470c6c0fc677c528f4b8deaec74922c /templates/news/list.html | |
| parent | e5ecbccd2aba5b7ce0c8ab363e2a5502f5c6b8c9 (diff) | |
| download | famille-flask-d7e915f77c42f6d0c5a85e03d87106c27082ec99.tar.gz | |
reworked the templates
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> |
