# 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:
'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'
width:52%;
padding: 0em 2em 0em 1em;
max-height: 550px;
- overflow-y: scroll;
+ overflow-y: auto;
}
.desk_large {
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;
-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 {
}
+.pm_buttons {
+ margin: 1.5em 0em 1em 0em;
+ }
+
.module_action {
text-align: center;
margin: 0em 0em 3em 0em;
<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 %}
<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
{% 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
{% load teleforma_tags %}
{% load pagination_tags %}
-{% if is_paginated %}
{% paginate %}
-{% endif %}
<div id="users">
<table class="listing" width="100%">
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)