]> git.parisson.com Git - telemeta.git/commitdiff
fix user and enumeration listing in admin
authoryomguy <yomguy@parisson.com>
Wed, 27 Apr 2011 14:20:09 +0000 (16:20 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 27 Apr 2011 14:20:09 +0000 (16:20 +0200)
telemeta/__init__.py
telemeta/templates/telemeta_default/admin_enumerations.html
telemeta/templates/telemeta_default/admin_users.html
telemeta/templates/telemeta_default/instrument_edit.html

index 7b7acd78f794ea0190dca375c425530dc15b75d2..487997a218baf36e5074bf0d4753dc7ba2e20ccd 100644 (file)
@@ -12,7 +12,7 @@ U{http://telemeta.org}
 """
 
 __docformat__ = 'epytext en'
-__version__ = '0.7.0'
+__version__ = '0.7.1'
 __url__ = 'http://telemeta.org'
 __copyright__ = '(C) 2007-2011 Parisson'
 __license__ = 'CeCILL-2'
index 238f5b81640bfdd48360f3e94f82c26baabf446f..9c68d74fde37f6799bae3d8fab87cdb36c4b66e6 100644 (file)
@@ -1,20 +1,27 @@
 {% extends "telemeta/admin.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
 
-{% block tab %}
-<div class="tabs">
+{% block tabcontents %}
+ <h4>{% trans "Enumerations" %}</h4>
 {% if enumerations %}
-    <ul>
+
+  <table class="listing">
+   <thead>
+    <tr><th>{% trans "Title"%}</th></tr>
+   </thead><tbody>
     {% for enum in enumerations %}
-        {%ifequal enum.id enumeration_id %}
-            <li class="active">{{ enum.name|capfirst }}</li>
-        {%else%}
-            <li><a href="{% url telemeta-enumeration-edit enum.id %}">
-                {{ enum.name|capfirst }}</a></li>
-        {%endifequal%}
+         <tr><td><a href="{% url telemeta-enumeration-edit enum.id %}">
+                {{ enum.name|capfirst }}</a></td></tr>    
     {% endfor %}
-    </ul>
-{% endif %}
-</div>
-{% endblock tab %}
+    </tbody>
+  </table>
+  {% else %}
+    <p class="help">{% trans "No enumerations" %}</p>
+ {% endif %}
+
+{% endblock %}
 
 
index 9e6b3719eb476290ae2e4aad52310247364d80c6..c4a0aa78eac52a07eab98570216aea70b360c80b 100644 (file)
@@ -4,11 +4,28 @@
 
 {% block tabcontents %}
  <h4>{% trans "Users" %}</h4>
-
  {% if users %}
+  <table class="listing">
+   <thead>
+    <tr><th>{% trans "User"%}</th>
+    <th>{% trans "First Name"%}</th>
+    <th>{% trans "Last Name"%}</th>
+    <th>{% trans "E-mail"%}</th>
+    </tr>
+   </thead><tbody>
     {% for user in users %}
-     <li><a href="{% url telemeta-profile-detail user.username %}">{{user.username}}</a></li>
+    <tr>
+     <td><a href="{% url telemeta-profile-detail user.username %}">{{user.username}}</a></td>
+     <td>{{ user.first_name }}</td>
+     <td>{{ user.last_name }}</td>
+     <td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
+    </tr>
     {% endfor %}
+    </tbody>
+  </table>
+
  {% else %}
     <p class="help">{% trans "No users" %}</p>
  {% endif %}
index dce8389d97b07f53240e4e46e44babd9d6018941..e9bd6ff94115664b84daeb140d99ae8ac5e98aba 100644 (file)
@@ -25,9 +25,7 @@
  <form id="_updateinstru" method="POST" action="{% url telemeta-instrument-update %}">{% csrf_token %}
   <table class="listing">
    <thead>
-    <tr><th class="sel">&nbsp;</th><th>{% trans "Name"%}</th>
-
-    </tr>
+    <tr><th class="sel">&nbsp;</th><th>{% trans "Name"%}</th></tr>
    </thead><tbody>
     {% for record in instruments %}
     <tr>