Mercurial > public > sg101
changeset 815:95462f4adb94
Private messages refactor: various cosmetic tweaks.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 09 Sep 2014 20:37:05 -0500 |
parents | 999a71b81111 |
children | 97f8fab9b1a3 |
files | messages/static/css/messages.css sg101/templates/messages/message.html sg101/templates/messages/messages_base.html sg101/templates/messages/view_message.html |
diffstat | 4 files changed, 27 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/messages/static/css/messages.css Tue Sep 09 20:07:55 2014 -0500 +++ b/messages/static/css/messages.css Tue Sep 09 20:37:05 2014 -0500 @@ -13,6 +13,7 @@ border-collapse: collapse; margin: 1em auto; width: 96%; + background-color: #EDF7F6; } table.messages th { @@ -96,3 +97,11 @@ margin-right: auto; height: 10em; } +#messages_menu { + padding: 0; +} +#messages_menu li { + display: inline; + margin: 0.5em 1.0em 0.5em 1.5em; + font-size: larger; +}
--- a/sg101/templates/messages/message.html Tue Sep 09 20:07:55 2014 -0500 +++ b/sg101/templates/messages/message.html Tue Sep 09 20:37:05 2014 -0500 @@ -2,8 +2,8 @@ <table class="pm"> <tr><th>From:</th><td>{% profile_link msg.sender.username %}</td></tr> <tr><th>To:</th><td>{% profile_link msg.receiver.username %}</td></tr> - <tr><th>Send Date:</th><td>{{ msg.send_date }}</td></tr> - <tr><th>Read Date:</th><td>{{ msg.read_date }}</td></tr> + <tr><th>Send Date:</th><td>{{ msg.send_date|date:"M j, Y g:i A" }}</td></tr> + <tr><th>Read Date:</th><td>{{ msg.read_date|date:"M j, Y g:i A" }}</td></tr> <tr><th>Reply Date:</th><td>{{ msg.reply_date }}</td></tr> <tr><th>Subject:</th><td>{{ msg.subject }}</td></tr> <tr><td colspan="2">{{ msg.html|safe }}</td></tr>
--- a/sg101/templates/messages/messages_base.html Tue Sep 09 20:07:55 2014 -0500 +++ b/sg101/templates/messages/messages_base.html Tue Sep 09 20:37:05 2014 -0500 @@ -14,8 +14,8 @@ </ul> {% endif %} -<p>Private messages menu:</p> -<ul> +<div> +<ul id="messages_menu"> <li>{% if tab != 'inbox' %}<a href="{% url 'messages-inbox' %}">{% endif %}Inbox{% if tab != 'inbox' %}</a>{% endif %} {% if inbox_pct %}({{ inbox_pct }}% used){% endif %}</li> <li>{% if tab != 'compose' %}<a href="{% url 'messages-compose' %}">{% endif %}Compose new message{% if tab != 'compose' %}</a>{% endif %}</li> @@ -24,6 +24,8 @@ <li>{% if tab != 'trash' %}<a href="{% url 'messages-trash' %}">{% endif %}Trash{% if tab != 'trash' %}</a>{% endif %}</li> <li>{% if tab != 'options' %}<a href="{% url 'messages-options' %}">{% endif %}Options{% if tab != 'options' %}</a>{% endif %}</li> </ul> +</div> +<hr /> {% block messages_content %}{% endblock %}
--- a/sg101/templates/messages/view_message.html Tue Sep 09 20:07:55 2014 -0500 +++ b/sg101/templates/messages/view_message.html Tue Sep 09 20:37:05 2014 -0500 @@ -11,17 +11,6 @@ <h3>View Private Message</h3> {% include "messages/message.html" %} -{% if msg_flag %} -<div class="error"> - You reported this message to the admin on {{ msg_flag.flag_date|date:"F d, Y" }}. -</div> -{% else %} -<div class="notice"> - <img src="{{ STATIC_URL }}icons/flag_red.png" alt="Report this message" /> - <a href="{% url "messages-report" msg.id %}">Report this message for spam or abuse</a>. -</div> -{% endif %} - {% if form %} <form action="." method="post" id="msg_compose_form">{% csrf_token %} <fieldset> @@ -39,4 +28,16 @@ </fieldset> </form> {% endif %} + +{% if msg_flag %} +<div class="error"> + You reported this message to the admin on {{ msg_flag.flag_date|date:"F d, Y" }}. +</div> +{% else %} +<div class="notice"> + <img src="{{ STATIC_URL }}icons/flag_red.png" alt="Report this message" /> + <a href="{% url "messages-report" msg.id %}">Report this message for spam or abuse</a>. +</div> +{% endif %} + {% endblock %}