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
</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> <<a href="mailto:{{request.email}}">{{request.email}}</a>>
+ {% 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>