diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-04-23 01:45:46 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-04-23 01:45:46 +0800 |
commit | a998ad94f454d3a145650671ba1a8731f1bfaea4 (patch) | |
tree | 3e4c2dd79e843a8865fd0f4568b605b57b21fd12 /notice/templates | |
parent | 05e9bd166404ba3306cbcec335c4ad88dd44ddc2 (diff) | |
download | django-skaschool-a998ad94f454d3a145650671ba1a8731f1bfaea4.tar.bz2 |
* implemented 'ListNoticeView' based on ListView
* added list_notice template, css, urls
* updated models and admin of app notice
* updated navbar.html
Diffstat (limited to 'notice/templates')
-rw-r--r-- | notice/templates/notice/list_notice.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/notice/templates/notice/list_notice.html b/notice/templates/notice/list_notice.html new file mode 100644 index 0000000..77d194c --- /dev/null +++ b/notice/templates/notice/list_notice.html @@ -0,0 +1,50 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load i18n %} +{% load bootstrap3 %} + +{# template to show notice list #} + +{% block title %} +全部通知 | 2014 SKA Summer School +{% endblock %} + +{% block css_extra %} + <link href="{% static 'css/list_notice.css' %}" rel="stylesheet"> +{% endblock %} + +{% block content %} + <div class="container"> + <h2>全部通知</h2> + <br> + {% for notice in object_list %} + <div class="notice-title"> + <h3>{{ notice.title }} {% if notice.is_important %}<span class="label label-primary">重要</span>{% endif %}</h3> + <p>{{ notice.show_pubtime }}, {{ notice.category.category_name }}</p> + </div> + <div class="notice-content"> + {{ notice.contents }} + </div> + {% if notice.attachments %} + <div class="notice-attachment"> + <ul class="list-unstyled"> + {% for attachment in notice.get_attachment_list %} + <li> + 附件{{ forloop.counter }}: + <a href="{{ attachment.attachment.url }}">{{ attachment.title }}</a> + </li> + {% endfor %} + </ul> + </div> + {% endif %} + <br> + {% empty %} + <div class="alert alert-info"> + 暂时没有通知,多谢您的关注…… + </div> + {% endfor %} + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} |