]> git.parisson.com Git - teleforma.git/commitdiff
fix student profile
authoryomguy <yomguy@parisson.com>
Fri, 27 Apr 2012 20:33:08 +0000 (22:33 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 27 Apr 2012 20:33:08 +0000 (22:33 +0200)
teleforma/templates/telemeta/inc/user_list.html
teleforma/templates/telemeta/profile_detail.html

index 11c4902c8a15b82aba678b1650a8eea6ff7c8f1e..d84d8a4a68746a91f7213b5e1cf24bc80eb7d843 100644 (file)
@@ -5,19 +5,14 @@
 
 <div class="pagination">
     {% for p in page.paginator.pages %}
-
       {% if p == page %}
-          <span class="selected">{{ page }}</span>
+       <span class="selected">{{ page }}</span>
       {% else %}
-          <a href="?page={{ p.number }}">
-              {{ p }}
-          </a>
+       <a href="?page={{ p.number }}">{{ p }}</a>
       {% endif %}
-
     {% endfor %}
 </div>
 
-
 <div id="users">
   <table class="listing" width="100%">
    <thead>
index 5cbd8b916ffc00931d0018924ef4c8f548894915..4ff8079dc811511bc052a57dfd457889350806b7 100644 (file)
@@ -9,7 +9,7 @@
 {% endblock %}
 
 {% block content %}
-  <div id="module-set-left" style="width: 25%">
+  <div id="module-set-left" style="width: 20%">
   {% block modules %}
 
     <div class="module">
     <a href="{% url postman_write user.username %}" class="component_icon button" id="action_red">{% trans "Send a message" %}</a>
    </div>
   {%  endif %}
-
  </div>
 
-<div class="desk_media">
+<div class="desk_large">
 <div class="course">
 
     <h1>{% trans "User profile" %} : {{ usr.username }}
      <dl class="listing">
       <dt>{% trans "First Name" %}</dt><dd>{{ usr.first_name }}</dd>
       <dt>{% trans "Last Name" %}</dt><dd>{{ usr.last_name }}</dd>
+
+      {% if usr.student.get %}
+        <dt>{% trans "IEJ" %}</dt><dd>{{ usr.student.get.iej }}</dd>
+        <dt>{% trans "Training" %}</dt><dd>{{ usr.student.get.training }}</dd>
+        <dt>{% trans "Procedure"%}</dt><dd>{{ usr.student.get.procedure.code }}</dd>
+        <dt>{% trans "Oral spe"%}</dt><dd>{{ usr.student.get.oral_speciality.code }}</dd>
+        <dt>{% trans "Written spe"%}</dt><dd>{{ usr.student.get.written_speciality.code }}</dd>
+        <dt>{% trans "Oral 1"%}</dt><dd>{{ usr.student.get.oral_2.code }}</dd>
+        <dt>{% trans "Oral 2"%}</dt><dd>{{ usr.student.get.oral_1.code }}</dd>
+      {% endif %}
+
+      {% if user.is_staff or user.is_superuser %}
       <dt>{% trans "Email" %}</dt><dd>{{ usr.email }}</dd>
+      <dt>{% trans "Address" %}</dt><dd>{{ usr.profile.get.address }} {{ usr.profile.get.postal_code }} {{ usr.profile.get.city }}</dd>
+      <dt>{% trans "Telephone" %}</dt><dd>{{ usr.profile.get.telephone }}</dd>
+      {% endif %}
 
-      <dt>{% trans "Institution" %}</dt><dd>{% if profile %}{{ profile.institution }}{% endif %}</dd>
-      <dt>{% trans "Department" %}</dt><dd>{% if profile %}{{ profile.department }}{% endif %}</dd>
-      <dt>{% trans "Function" %}</dt><dd>{% if profile %}{{ profile.function }}{% endif %}</dd>
-      <dt>{% trans "Attachment" %}</dt><dd>{% if profile %}{{ profile.attachment }}{% endif %}</dd>
-      <dt>{% trans "Address" %}</dt><dd>{% if profile %}{{ profile.address }}{% endif %}</dd>
-      <dt>{% trans "Telephone" %}</dt><dd>{% if profile %}{{ profile.telephone }}{% endif %}</dd>
-      <dt>{% trans "Expiration date" %}</dt><dd>{% if profile %}{{ profile.expiration_date }}{% endif %}</dd>
-
-      <dt>{% trans "Is staff" %}</dt><dd>{{ usr.is_staff }}</dd>
-      <dt>{% trans "Is superuser" %}</dt><dd>{{ usr.is_superuser }}</dd>
-      <dt>{% blocktrans count user.groups.all.count as counter %}Group{% plural %}Groups{% endblocktrans %}</dt><dd>{% for group in usr.groups.all %}{{ group }} {% endfor %}</dd>
+      <dt>{% trans "Join date" %}</dt><dd>{{ usr.date_joined }}</dd>
+      <dt>{% trans "Expiration date" %}</dt><dd>{{ usr.profile.get.expiration_date }}</dd>
       <dt>{% trans "Last login" %}</dt><dd>{{ usr.last_login }}</dd>
+
       {% if user.is_authenticated and user.username == usr.username %}
       <dt>{% trans "Language" %}</dt><dd><form id="setlang" action="/i18n/setlang/" method="post">{% csrf_token %}
         <input name="next" type="hidden" value="" />