Version 2.0.0, August 2012
--------------------------
* Add an API.
+* Add a CSS example, for view.html.
* Rename the extra context variables passed to the notifier app to avoid name clash:
pm_message and pm_action
* More adjustments for Django 1.4.
* content: in <html><body>, to put the page contents\r
* postman_menu: in <html><body>, to put a navigation menu\r
\r
+.. _static files:\r
+\r
Static Files\r
~~~~~~~~~~~~\r
+\r
A CSS file is provided with the application, for the Admin site: :file:`postman/css/admin.css`.\r
It is not obligatory but makes the display more confortable.\r
\r
-The file is provided under :file:`postman/static/`.\r
+A basic CSS file is provided to style the views: :file:`postman/css/postman.css`.\r
+You may use it as a starting point to make your own design.\r
+\r
+These files are provided under :file:`postman/static/`.\r
+\r
+See also :ref:`styles` for the stylesheets of views.\r
\r
For Django 1.3+, just follow the instructions related to the staticfiles app.\r
\r
For Django 1.2:\r
- It's up to you to make it visible to the URL resolver.\r
+ It's up to you to make the files visible to the URL resolver.\r
\r
For example:\r
\r
('^' + settings.MEDIA_URL.strip('/') + r'/(?P<path>postman/.*)$', 'django.views.static.serve',\r
{'document_root': os.path.join(imp.find_module('postman')[1], 'medias')}),\r
\r
-See also :ref:`styles` for the stylesheets of views.\r
-\r
Examples\r
--------\r
\r
.pm_message.pm_pending .pm_header { background-color: #FFC; }\r
.pm_message.pm_rejected .pm_header { background-color: #FDD; }\r
\r
+These rules are provided with the application, as an example, in a static file (See :ref:`static files`).\r
+\r
forms\r
-----\r
\r
--- /dev/null
+/*
+ This is a basic stylesheet for the django-postman application.
+ Called from templates/postman/base.html.
+ Make your own design in <settings.STATIC_ROOT>/postman/css/postman.css
+*/
+.pm_message.pm_deleted {
+ text-decoration: line-through;
+}
+.pm_message.pm_deleted .pm_body{
+ display: none;
+}
+.pm_message.pm_archived {
+ font-style: italic;
+ color: grey;
+}
+.pm_message.pm_unread .pm_subject {
+ font-weight: bolder;
+}
+.pm_message.pm_pending .pm_header {
+ background-color: #FFC;
+}
+.pm_message.pm_rejected .pm_header {
+ background-color: #FDD;
+}
{% load url from future %}
{% load i18n %}{% load postman_tags %}
{% block title %}{% trans "Messaging" %}{% endblock %}
+{% block extrahead %}{{ block.super }}
+<link type="text/css" media="all" rel="stylesheet" href="
+{# dj v1.4 #}{% load static %}{% static 'postman/css/postman.css' %}
+{# dj v1.3 #}{# {{ STATIC_URL }}postman/css/postman.css #}
+{# dj v1.2 #}{# {{ MEDIA_URL }}postman/css/postman.css #}
+" />{% endblock %}
{% block postman_menu %}
<ul id="postman_menu">{% postman_unread as unread_count %}
- <li><a href="{% url 'postman_inbox' %} ">» {% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
- <li><a href="{% url 'postman_sent' %} ">» {% trans "Sent Messages" %}</a></li>
- <li><a href="{% url 'postman_write' %} ">» {% trans "Write" %}</a></li>
- <li><a href="{% url 'postman_archives' %} ">» {% trans "Archives" %}</a></li>
- <li><a href="{% url 'postman_trash' %} ">» {% trans "Trash" %}</a></li>
+ <li><a href="{% url 'postman_inbox' %}">» {% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
+ <li><a href="{% url 'postman_sent' %}">» {% trans "Sent Messages" %}</a></li>
+ <li><a href="{% url 'postman_write' %}">» {% trans "Write" %}</a></li>
+ <li><a href="{% url 'postman_archives' %}">» {% trans "Archives" %}</a></li>
+ <li><a href="{% url 'postman_trash' %}">» {% trans "Trash" %}</a></li>
</ul>
{% endblock %}
\ No newline at end of file