]> git.parisson.com Git - teleforma.git/commitdiff
fix some focus and scroll sizes, fix locale pagination, fix user list order
authoryomguy <yomguy@parisson.com>
Fri, 13 Apr 2012 09:21:04 +0000 (11:21 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 13 Apr 2012 09:21:04 +0000 (11:21 +0200)
example/settings.py
teleforma/htdocs/css/teleforma.css
teleforma/templates/postman/base_folder.html
teleforma/templates/postman/base_write.html
teleforma/templates/postman/view.html
teleforma/templates/telemeta/inc/user_list.html
teleforma/views.py

index d580b2da8d4fd48a3d04f886836592389c3fbc2a..5b56103fdef72896cb63542a1a6f335f5d47c05b 100644 (file)
@@ -34,7 +34,6 @@ DATABASES = {
 # timezone as the operating system.
 # If running in a Windows environment this must be set to the same as your
 # system time zone.
-USE_TZ = True
 TIME_ZONE = 'Europe/Paris'
 
 # Language code for this installation. All choices can be found here:
@@ -151,6 +150,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.request',
     'django.contrib.auth.context_processors.auth',
     'postman.context_processors.inbox',
+    "django.core.context_processors.i18n",
+    "django.core.context_processors.media",
 )
 
 TELEMETA_ORGANIZATION = 'Parisson'
index f20a018ed94576da7f8f23137626f9eedf4c7707..db93e92f820c8d7633743a35a62bb13a477a48c0 100644 (file)
@@ -1373,7 +1373,7 @@ input,textarea{
     width:52%;
     padding: 0em 2em 0em 1em;
     max-height: 550px;
-    overflow-y: scroll;
+    overflow-y: auto;
     }
 
 .desk_large {
@@ -1394,6 +1394,12 @@ input,textarea{
     padding: 0em 0em 0em 1em;
     }
 
+#large_scroll {
+    max-height: 750px;
+    overflow-y: auto;
+    padding: 0em 1em 0em 0em;
+    }
+
 .course {
     margin: 0em 0em 2em 0em;
     background-color: #FFF;
@@ -1479,6 +1485,7 @@ input,textarea{
     -webkit-border-radius: 8px 0px 8px 8px;
     border-radius: 8px 0px 8px 8px;
     padding: 0.5em 0.8em 0.8em 0.8em;
+    margin: 0em 0em 1em 0em;
     }
 
 #pm_messages {
@@ -1499,6 +1506,10 @@ input,textarea{
 
     }
 
+.pm_buttons {
+    margin: 1.5em 0em 1em 0em;
+    }
+
 .module_action {
     text-align: center;
     margin: 0em 0em 3em 0em;
index 64019652f9a00a0b27c7e00a43218ae0a07b3534..2f57032cd8c9ef438b8e3dfaa0c1148a2a92a0e1 100644 (file)
@@ -11,7 +11,7 @@
 <a href="{{ by_message_url }}" class="component_icon button icon_filter">{% trans "by message" %}</a>
 </div>
 {% endblock pm_by_modes %}
-<div class="course_title">{% block pm_folder_title %}{% endblock %}</div>
+<h1>{% block pm_folder_title %}{% endblock %}</h1>
 {% if invalid_page %}
 <p>{% trans "Sorry, this page number is invalid." %}</p>
 {% else %}
index a6331bc2476d8e65820b46e615603b008a81fe37..f7b7d86187c7b4d299ac797e7ff4327dae51b6c8 100644 (file)
@@ -20,4 +20,5 @@
 <a href="#" class="component_icon button icon_next" onclick="f=document.getElementById('_messageForm'); f.submit(); return false;">{% trans "Send" %}</a>
 </form>
 </div>
+<script type="text/javascript">document.getElementById("id_body").focus();</script>
 {% endblock %}
\ No newline at end of file
index 6e2d04546e5938daa777416e2be9c808cb6df4e1..b6525e11162aa08ae247d2621cbaebf3fa84d9b5 100644 (file)
@@ -5,8 +5,12 @@
 
 {% block content %}
 <div id="postman" class="desk_large">
+
 <h1>{% if pm_messages|length > 1 %}{% trans "Conversation" %}{% else %}{% trans "Message" %}{% endif %}</h1>
 <br /><br />
+
+<div id="large_scroll">
+
 {% for message in pm_messages %}
 <div class="pm_message{% if message.is_pending %} pm_pending{% endif %}{% if message.is_rejected %} pm_rejected{% endif %}{% if message.sender == user and message.sender_archived or message.recipient == user and message.recipient_archived %} pm_archived{% endif %}{% if message.sender == user and message.sender_deleted_at or message.recipient == user and message.recipient_deleted_at %} pm_deleted{% endif %}{% if message.recipient == user and not message.read_at %} pm_unread{% endif %}">
  <div class="pm_header">
  <hr />
  <div class="pm_body">{{ message.body|urlize|linebreaksbr }}</div>
 </div>
-<br />
+
 {% if forloop.last %}
 <form id="_messageForm" action="" method="post">{% csrf_token %}
 <input type="hidden" {% if message.thread_id %}name="tpks" value="{{ message.thread_id }}"{% else %}name="pks" value="{{ message.pk }}"{% endif %} />
 
+<div class="pm_buttons">
 <a href="{{ next_url }}" class="component_icon button icon_previous">{% trans "Back" %}</a>
-
 <span id="pm_buttons">
-
 {% block pm_delete_button %}
 <a href="#" class="component_icon button icon_delete" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_delete %}'; f.submit(); return false;">{% trans "Delete" %}</a>
 {% endblock %}
 <form id="_messageReply" action="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
 <div id="pm_reply">{{ form.body }}</div><br />
 <a href="#" class="component_icon button icon_next" onclick="f=document.getElementById('_messageReply'); f.submit(); return false;">{% trans "Reply" %}</a>
-</form>{% endif %}
+</div>
+</form>
+
 {% endif %}
+{% endif %}
+
 {% endfor %}
 </div>
+</div>
+<script type="text/javascript">document.getElementById("id_body").focus();</script>
 {% endblock %}
\ No newline at end of file
index 90e556ede1d089de17303c619e8211b3c88ac219..8e5c322ded5eb8aac140fbe989837f6fc320ab97 100644 (file)
@@ -3,9 +3,7 @@
 {% load teleforma_tags %}
 {% load pagination_tags %}
 
-{% if is_paginated %}
 {% paginate %}
-{% endif %}
 
 <div id="users">
   <table class="listing" width="100%">
index 177a252c282ad7feaf11612ac060bcc0bc023418..e7f3ad46d66b24a411e2c38fa7cc78f173223661 100755 (executable)
@@ -177,9 +177,8 @@ class UsersView(ListView):
 class UsersTrainingView(UsersView):
 
     def get_queryset(self):
-        users = User.objects.all().select_related(depth=2)
         self.trainings = Training.objects.filter(id=self.args[0])
-        return User.objects.filter(student__training__in=self.trainings)
+        return User.objects.filter(student__training__in=self.trainings).order_by('last_name')
 
     def get_context_data(self, **kwargs):
         context = super(UsersTrainingView, self).get_context_data(**kwargs)