From 5f0722d5143044c1c573cdcf0e5f35075bd59444 Mon Sep 17 00:00:00 2001 From: Ciro Scognamiglio Date: Mon, 15 Sep 2014 17:51:22 +0200 Subject: [PATCH] management requests table reorganization --- portal/managementtabrequests.py | 4 +- portal/templates/management-tab-requests.html | 39 +++++++------------ 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/portal/managementtabrequests.py b/portal/managementtabrequests.py index 89e48425..79bb31e3 100644 --- a/portal/managementtabrequests.py +++ b/portal/managementtabrequests.py @@ -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 diff --git a/portal/templates/management-tab-requests.html b/portal/templates/management-tab-requests.html index f7476c64..2445aabc 100644 --- a/portal/templates/management-tab-requests.html +++ b/portal/templates/management-tab-requests.html @@ -94,36 +94,27 @@
- - - - - - - + {% for request in requests %} - - - - + + + + -- 2.43.0
- AuthorityTypeIdDetailsTimestampStatus
{{authority}} - {% if request.allowed == 'allowed' %} - - {% else %} - {% if request.allowed == 'expired' %}expired{% else %}denied{% endif %} - {% endif %} - {{ request.type }}{{ request.id }}{{ request.id }} + {% if request.allowed == 'allowed' %} + + {% else %} + {% if request.allowed == 'expired' %}expired{% else %}denied{% endif %} + {% endif %} + {{ request.type }}{{authority|default:request.site_name}} {% if request.type == 'user' %} - {{request.first_name}} {{request.last_name}} {{request.email}} + {{request.first_name}} {{request.last_name}} <{{request.email}}> + {% elif request.type == 'slice' %} + {{request.slice_name}} -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}} {% else %} - {% if request.type == 'slice' %} - {{request.slice_name}} -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}} - {% else %} {# authority #} - {{request.site_name}} ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}} - {% endif %} + {{request.site_name}} ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}} {% endif %} {{ request.timestamp }}