fixed GUI
[myslice.git] / portal / templates / management-tab-requests.html
1 <div class="container-fluid">
2 <div class="col-md-12">
3         <h2>From your authorities</h2>
4 </div>
5 {% if my_authorities %}
6 <div class="col-md-12">
7         <table class="table requests">
8             <thead>
9         <tr>
10             <th>ID</th>
11             <th></th>
12             <th>Type</th>
13             <th>Authority</th>
14             <th>Info</th>
15             <th>Date</th>
16             <th>Status</th>
17         </tr>
18         </thead>
19         <tbody>
20         {% for authority, requests in my_authorities.items %}
21         
22         {% for request in requests %}
23         
24         {% if request.type == 'user' %}
25         <tr>
26         {% elif request.type == 'slice' %}
27         <tr class="info">
28         {% else %}
29         <tr class="active">
30         {% endif %}
31             <td><span class="gray small">{{ request.id }}</span></td>
32             <td>
33             {% if request.allowed == 'allowed' %}
34             <input class='portal__validate__checkbox' id='portal__validate__checkbox__{{request.type}}__{{request.id}}' type='checkbox'/>
35             {% else %}
36                 {% if request.allowed == 'expired' %}expired{% else %}denied{% endif %}
37             {% endif %}
38             </td>
39             <td><span class="type">{{ request.type }}</span></td>
40             <td><i>{{authority}}{{request.site_authority}}</i></td>
41                 <td>
42             {% if request.type == 'user' %}
43                 <b>{{request.first_name}} {{request.last_name}}</b> &lt;<a href="mailto:{{request.email}}">{{request.email}}</a>&gt;
44             {% elif request.type == 'slice' %}
45             <b>{{request.slice_name}}</b> -- Number of nodes: {{request.number_of_nodes}} -- Type of nodes: {{request.type_of_nodes}} -- Purpose: {{request.purpose}}
46             {% elif request.type == 'project' %}
47             <b>{{request.project_name}}</b>  -- {{ request.user_hrn }} -- Purpose: {{request.purpose}}
48             {% elif request.type == 'join' %}
49             <b>{{request.user_hrn}}</b> --  to join {{ request.authority_hrn }}
50             {% else %}
51             <b>{{request.site_name}}</b> ({{request.site_authority}}) -- {{request.address_city}}, {{request.address_country}}
52             {% endif %}
53                 </td>
54                 <td>{{ request.timestamp }}</td>
55                 
56                 <td>
57             <span id='portal__status__{{request.type}}__{{request.id}}'></span>
58             <div id='{{request.type}}__{{request.id}}-status-loading' style="display:none;"><img src="{{ STATIC_URL }}img/loading.gif"></div>
59             </td>
60     
61         <!--<div class='portal_validate_request {{request.type}} {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}'> -->
62           </tr>
63     
64         {% endfor %}
65         
66         {% endfor %}
67            </tbody>
68     </table>
69    </div>
70 {% else %}
71         <div class="col-md-12">
72                 <i>There is no pending request waiting for validation.</i>
73         </div>
74 {% endif %}
75 </div>
76 <br />
77 <div class="col-md-12">
78         <button class="btn btn-onelab" type="button" id="portal__validate" onclick="on_click_event();"><span class="glyphicon glyphicon-ok"></span> Validate</button>
79         <button class="btn btn-danger" type="button" id="portal__reject" onclick="on_click_reject();"><span class="glyphicon glyphicon-remove"></span> Reject</button>
80 </div>