diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-11-08 23:16:46 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-11-08 23:16:46 +0100 |
| commit | 18afe971d1e4db12c0e0d7d68937775d4f35d6a6 (patch) | |
| tree | a7589e4f6cccc40e2490b86ec071a34ba3752dec /templates | |
| parent | ea39366c947bcc2e9234a50d79e13e472abd9736 (diff) | |
| download | famille-flask-18afe971d1e4db12c0e0d7d68937775d4f35d6a6.tar.gz | |
Add info boxes on home page.
The choice of BeautifulSoup to shorten comments is open to discussion. It is a bit
overkill.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/news/list.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/news/list.html b/templates/news/list.html index e95abe8..61625c1 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -4,6 +4,31 @@ <div class="second_menu"> <a href="/news/add/">Ajouter une actualité</a> </div> +<div class="quickview"> +<h2>Dernières visites</h2> + +<table> + {% for user in users %} + <tr> + <td><a href="{{url_for('view_user', user_id=user.id)}}">{{user.user_name}}</a></td> + <td>{{user.last_seen|format_date}}</td> + </tr> + {% endfor %} +</table> + +<h2>Derniers commentaires</h2> +<ul> + {% for comment in comments %} + <li><a href="{{url_for('view_user', user_id=comment.user_id)}}">{{comment.username}}</a> + {{comment.date|format_date}}<br/> + {{comment.content_cache|shortify|safe}} <a href="{{url_for('show_news', news_id=comment.news_id)}}#comments">[…]</a> + </li> + {% else %} + Pas de commentaires." + {% endfor %} +</ul> +</div> + <div class="news"> {% for news in news %} <div class="news_head"> |
