]> git.parisson.com Git - django-postman.git/commitdiff
ajustements for django 1.4 - the test suite doesn't work yet with USE_TZ, and has...
authorPatrick Samson <pk.samson@gmail.com>
Mon, 16 Apr 2012 21:16:02 +0000 (23:16 +0200)
committerPatrick Samson <pk.samson@gmail.com>
Mon, 16 Apr 2012 21:16:02 +0000 (23:16 +0200)
postman/templates/postman/base.html
postman/templates/postman/base_folder.html
postman/templates/postman/base_write.html
postman/templates/postman/view.html

index e1d80bd8b5287ab7060efa8afe94535e04a518db..061cf3d7ccdc5e385f02d88b4f2eb8abef97d60c 100644 (file)
@@ -1,12 +1,13 @@
 {% extends "base.html" %}
+{% load url from future %}
 {% load i18n %}{% load postman_tags %}
 {% block title %}{% trans "Messaging" %}{% endblock %}
 {% block postman_menu %}
 <ul id="postman_menu">{% postman_unread as unread_count %}
- <li><a href="{% url postman_inbox %} ">&raquo;&nbsp;{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
- <li><a href="{% url postman_sent %} ">&raquo;&nbsp;{% trans "Sent Messages" %}</a></li>
- <li><a href="{% url postman_write %} ">&raquo;&nbsp;{% trans "Write" %}</a></li>
- <li><a href="{% url postman_archives %} ">&raquo;&nbsp;{% trans "Archives" %}</a></li>
- <li><a href="{% url postman_trash %} ">&raquo;&nbsp;{% trans "Trash" %}</a></li>
+ <li><a href="{% url 'postman_inbox' %} ">&raquo;&nbsp;{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
+ <li><a href="{% url 'postman_sent' %} ">&raquo;&nbsp;{% trans "Sent Messages" %}</a></li>
+ <li><a href="{% url 'postman_write' %} ">&raquo;&nbsp;{% trans "Write" %}</a></li>
+ <li><a href="{% url 'postman_archives' %} ">&raquo;&nbsp;{% trans "Archives" %}</a></li>
+ <li><a href="{% url 'postman_trash' %} ">&raquo;&nbsp;{% trans "Trash" %}</a></li>
 </ul>
 {% endblock %}
\ No newline at end of file
index 7ca4e1182bc58170cc41b6d245915f4503d627f2..10a2da4a4035929f968a0146766072f246ba8e80 100644 (file)
@@ -1,4 +1,5 @@
 {% extends "postman/base.html" %}
+{% load url from future %}
 {% load i18n postman_tags %}{% load pagination_tags %}
 {% block content %}
 <div id="postman">
@@ -14,9 +15,9 @@
 </div>{% endblock pm_by_modes %}
 <form action="{% block pm_form_action %}{% endblock %}" method="post">{% csrf_token %}
 {% block pm_form_buttons %}<span id="pm_buttons">
-{% block pm_delete_button %}<button type="submit" onclick="this.form.action='{% url postman_delete %}'">{% trans "Delete" %}</button>{% endblock %}
-{% block pm_archive_button %}<button type="submit" onclick="this.form.action='{% url postman_archive %}'">{% trans "Archive" %}</button>{% endblock %}
-{% block pm_undelete_button %}<button type="submit" onclick="this.form.action='{% url postman_undelete %}'">{% trans "Undelete" %}</button>{% endblock %}
+{% block pm_delete_button %}<button type="submit" onclick="this.form.action='{% url 'postman_delete' %}'">{% trans "Delete" %}</button>{% endblock %}
+{% block pm_archive_button %}<button type="submit" onclick="this.form.action='{% url 'postman_archive' %}'">{% trans "Archive" %}</button>{% endblock %}
+{% block pm_undelete_button %}<button type="submit" onclick="this.form.action='{% url 'postman_undelete' %}'">{% trans "Undelete" %}</button>{% endblock %}
 </span>{% endblock %}
 <table id="pm_messages">
  <thead>
@@ -35,7 +36,7 @@
 {% block pm_recipient_cell %}   <td>{{ message.obfuscated_recipient|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}</td>{% endblock %}
    <td>{% if message.is_new %}<strong>{% endif %}{% if message.is_replied %}<em>{% endif %}
 {% block pm_subject %}
-    <a href="{% if by_conversation and message.thread_id %}{% url postman_view_conversation message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}">
+    <a href="{% if by_conversation and message.thread_id %}{% url 'postman_view_conversation' message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}">
     {% include "postman/inc_subject_ex.html" %}
     </a>
 {% endblock %}
index d454e9e1621e6de44cca192f6b4fdac3a646ea1e..e188e4821d2c13d5be8e638e5e47fa0907737ba4 100644 (file)
@@ -3,7 +3,8 @@
 {% block extrahead %}{{ block.super }}
 {% if is_autocompleted %}
 {# using the available admin jQuery is enough #}
-<script type="text/javascript" src="{% load adminmedia %}{% admin_media_prefix %}js/jquery.min.js"></script>
+{# dj v1.4 #}{% load static %}<script type="text/javascript" src="{% static 'admin/js/jquery.min.js' %}"></script>
+{# dj v1.3 #}{# <script type="text/javascript" src="{% load adminmedia %}{% admin_media_prefix %}js/jquery.min.js"></script> #}
 {# <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.min.js"></script> #}
 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.autocomplete.min.js"></script>
 <link href="{{ MEDIA_URL }}css/jquery.autocomplete.css" type="text/css" media="all" rel="stylesheet" />
index 54362081bcf6a953b349b90ca24793ba09358315..c1edef4f699c4879b7569a95b61a9d8e64600c87 100644 (file)
@@ -1,4 +1,5 @@
 {% extends "postman/base.html" %}
+{% load url from future %}
 {% load i18n %}{% load postman_tags %}
 {% block content %}
 <div id="postman">
 <input type="hidden" {% if message.thread_id %}name="tpks" value="{{ message.thread_id }}"{% else %}name="pks" value="{{ message.pk }}"{% endif %} />
 <a href="{{ next_url }}">{% trans "Back" %}</a>
 <span id="pm_buttons">
-<button type="submit" onclick="this.form.action='{% url postman_delete %}?next={{ next_url|urlencode }}'">{% trans "Delete" %}</button>
-{% if not archived %}<button type="submit" onclick="this.form.action='{% url postman_archive %}?next={{ next_url|urlencode }}'">{% trans "Archive" %}</button>{% endif %}
+<button type="submit" onclick="this.form.action='{% url 'postman_delete' %}?next={{ next_url|urlencode }}'">{% trans "Delete" %}</button>
+{% if not archived %}<button type="submit" onclick="this.form.action='{% url 'postman_archive' %}?next={{ next_url|urlencode }}'">{% trans "Archive" %}</button>{% endif %}
 </span>
-{% if reply_to_pk %}<a href="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}">{% trans "Reply" %}</a>{% endif %}
+{% if reply_to_pk %}<a href="{% url 'postman_reply' reply_to_pk %}?next={{ next_url|urlencode }}">{% trans "Reply" %}</a>{% endif %}
 </form>
 {% if reply_to_pk %}<hr />
 <h2>{% trans 'Reply' %}</h2>
-<form action="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
+<form action="{% url 'postman_reply' reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
 <div id="pm_reply">{{ form.body }}</div>
 <button type="submit">{% trans 'Reply' %}</button>
 </form>{% endif %}