management requests table reorganization
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Mon, 15 Sep 2014 15:51:22 +0000 (17:51 +0200)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Mon, 15 Sep 2014 15:51:22 +0000 (17:51 +0200)
portal/managementtabrequests.py
portal/templates/management-tab-requests.html

index 89e4842..79bb31e 100644 (file)
@@ -159,8 +159,8 @@ class ManagementRequestsView (LoginRequiredView, ThemeView):
         
         context = super(ManagementRequestsView, self).get_context_data(**kwargs)
         print "testing"
-        for s in ctx_my_authorities :
-            print s
+        for s, i in ctx_my_authorities :
+            print s, i
             
         context['my_authorities']   = ctx_my_authorities
         context['sub_authorities']   = ctx_sub_authorities
index f7476c6..2445aab 100644 (file)
        </div>
        <div class="col-md-12">
         <table class="table">
-          <th>
-            <td>Authority</td>
-            <td>Type</td>
-            <td>Id</td>
-            <td>Details</td>
-            <td>Timestamp</td>
-            <td>Status</td>
-          </th>
+          
         {% for request in requests %}
     
          <tr>
-           <td>{{authority}}</td>
-               <td>
-               {% if request.allowed == 'allowed' %}
-               <input class='portal__validate__checkbox' id='portal__validate__checkbox__{{request.type}}__{{request.id}}' type='checkbox'/>
-               {% else %}
-                       {% if request.allowed == 'expired' %}expired{% else %}denied{% endif %}
-               {% endif %}
-               </td>
-               <td>{{ request.type }}</td>
-               <td>{{ request.id }}</td>
+           <td><span class="gray small">{{ request.id }}</span></td>
+           <td>
+            {% if request.allowed == 'allowed' %}
+            <input class='portal__validate__checkbox' id='portal__validate__checkbox__{{request.type}}__{{request.id}}' type='checkbox'/>
+            {% else %}
+                {% if request.allowed == 'expired' %}expired{% else %}denied{% endif %}
+            {% endif %}
+            </td>
+            <td><u>{{ request.type }}</u></td>
+           <td><i>{{authority|default:request.site_name}}</i></td>
                <td>
             {% if request.type == 'user' %}
-                <b>{{request.first_name}} {{request.last_name}}</b> <a href="mailto:{{request.email}}">{{request.email}}</a>
+                <b>{{request.first_name}} {{request.last_name}}</b> &lt;<a href="mailto:{{request.email}}">{{request.email}}</a>&gt;
+            {% elif request.type == 'slice' %}
+            <b>{{request.slice_name}}</b> -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}}
             {% else %}
-                {% if request.type == 'slice' %}
-                <b>{{request.slice_name}}</b> -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}}
-                {% else %} {# authority #}
-                <b>{{request.site_name}}</b> ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}}
-                {% endif %}
+            <b>{{request.site_name}}</b> ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}}
             {% endif %}
                </td>
                <td>{{ request.timestamp }}</td>