status_str += ' -- ';
if (result.status) {
- status_str += '<font color="green">OK</font>';
+ status_str += '<font color="green">Rejected</font>';
$('#portal__validate__checkbox__' + request_type__id).hide();
} else {
status_str += '<font color="red">ERROR: ' + result.description + '</font>';
{% for authority, requests in my_authorities.items %}
<div class="col-md-12">
- <h2>{{authority}}</h2>
+ <h2>{{authority|default:"Authorities"}}</h2>
</div>
-
- <table class="table">
- <th>
- <td>Type</td>
- <td>Id</td>
- <td>Details</td>
- <td>Timestamp</td>
- <td>Status</td>
- </th>
- {% for request in requests %}
-
- <tr>
- <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 #}
- denied
- {% endif %}
- {% endif %}
- </td>
- <td>{{ request.type }}</td>
- <td>{{ request.id }}</td>
- <td>
- {% if request.type == 'user' %}
- Login: {{request.login}} -- First name: {{request.first_name}} -- Last name: {{request.last_name}} -- Email: {{request.email}}
- {% else %}
- {% if request.type == 'slice' %}
- Slice name: {{request.slice_name}} -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}}
- {% else %} {# authority #}
- Authority name: {{request.site_name}} -- authority_hrn: {{request.site_authority}} -- City: {{request.address_city}} -- Country: {{request.address_country}}
+ <div class="col-md-12">
+ <table class="table">
+
+ {% for request in requests %}
+
+ <tr>
+ <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 %}
- {% endif %}
- </td>
- <td>{{ request.timestamp }}</td>
-
- <td><span id='portal__status__{{request.type}}__{{request.id}}'></span></td>
-
- <!--<div class='portal_validate_request {{request.type}} {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}'> -->
- </tr>
-
- {% endfor %}
- </table>
+ </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>>
+ {% 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 %}
+ <b>{{request.site_name}}</b> ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}}
+ {% endif %}
+ </td>
+ <td>{{ request.timestamp }}</td>
+
+ <td><span id='portal__status__{{request.type}}__{{request.id}}'></span></td>
+
+ <!--<div class='portal_validate_request {{request.type}} {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}'> -->
+ </tr>
+
+ {% endfor %}
+ </table>
</div>
{% endfor %}
<br />
<div class="col-md-12">
<button class="btn btn-onelab" type="button" id="portal__validate" onclick="on_click_event();"><span class="glyphicon glyphicon-ok"></span> Validate</button>
- <button class="btn btn-onelab" type="button" id="portal__reject" onclick="on_click_reject();"><span class="glyphicon glyphicon-remove"></span> Reject</button>
+ <button class="btn btn-danger" type="button" id="portal__reject" onclick="on_click_reject();"><span class="glyphicon glyphicon-remove"></span> Reject</button>
</div>