]> git.parisson.com Git - teleforma.git/commitdiff
fix mess style
authoryomguy <yomguy@parisson.com>
Wed, 20 Jun 2012 09:06:31 +0000 (11:06 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 20 Jun 2012 09:06:31 +0000 (11:06 +0200)
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/postman/base_write.html
teleforma/templatetags/teleforma_tags.py

index a25922b09159829d387eb14708ce77abd4630f6a..d0daff6f66f3770a26b96b1959a29cff8604a503 100644 (file)
@@ -1515,7 +1515,6 @@ input,textarea{
 
 .pm_body {
     padding: 0em 0em 0em 0em;
-    border: 1px solid #dfdfdf;
     }
 
 .pm_message {
@@ -1547,6 +1546,10 @@ input,textarea{
 
     }
 
+#id_body {
+    font-size: 1.1em;
+    }
+
 .pm_buttons {
     margin: 1.5em 0em 1em 0em;
     }
index 5b0e269006010af33e1d8b36abb6c566769b53d6..5d575d6e9aedd493e0b63a54d358c1fca4d6ba18 100644 (file)
 <div id="postman" class="desk_messages">
 <h1>{% block pm_write_title %}{% endblock %}</h1>
 
-{% if user.student.all %}
+{% if user.student.all or user.is_staff %}
 <div style="padding-top: 0.5em;">
 
+<select id="_adminSelect" name="admins" onchange="update_recipients();">
+<option>{% trans "to an administrator" %}</option>
+{% get_all_admins as admins %}
+{% for a in admins %}
+<option value="{{ a.username }}">{{a.first_name}} {{a.last_name}}</option>
+{% endfor %}
+</select>
+
 <select id="_professorSelect" name="professors" onchange="update_recipients();">
-<option>{% trans "Choose a professor" %}</option>
-{% get_professors as professors %}
+<option>{% trans "to a professor" %}</option>
+{% get_all_professors as professors %}
 {% for p in professors %}
 <option value="{{ p.user.username }}">{{p.user.first_name}} {{p.user.last_name}}</option>
 {% endfor %}
 </select>
 
-<select id="_adminSelect" name="admins" onchange="update_recipients();">
-<option>{% trans "Choose an administrator" %}</option>
-{% get_admins as admins %}
-{% for a in admins %}
-<option value="{{ a.username }}">{{a.first_name}} {{a.last_name}}</option>
+<select id="_iejSelect" name="iejs" onchange="update_recipients();">
+<option>{% trans "to an IEJ" %}</option>
+{% get_all_iejs as iejs %}
+{% for i in iejs %}
+<option value="{{ i.name }}">{{i.name}}</option>
 {% endfor %}
 </select>
 
+
 </div>
 {% endif %}
 
@@ -59,10 +68,13 @@ $("#_adminSelect").click(function () {
       var htmlStr = $(this).val();
       $("#id_recipients").val(htmlStr);
     });
+$("#_iejSelect").click(function () {
+      var htmlStr = $(this).val();
+      $("#id_recipients").val(htmlStr);
+    });
 
 }
 
-
 $('#send_button').click(function() {
   $('#_messageForm').submit();
 });
index 981a4d5583ff74a1204877b0b097c831e111ab59..5132776b167b9da303db8916988e1301bfef85f3 100644 (file)
@@ -141,11 +141,11 @@ def from_doc_type(docs, type):
     return docs.filter(type=type)
 
 @register.assignment_tag
-def get_professors():
+def get_all_professors():
     return Professor.objects.all()
 
 @register.assignment_tag
-def get_admins():
+def get_all_admins():
     return User.objects.filter(is_staff=True)
 
 @register.assignment_tag