- reasons for asking an account; rnp as a catch-all island; changing email messages...
[myslice.git] / portal / templates / management-tab-requests.html
index d534915..f148759 100644 (file)
 {% if my_authorities %}
        
        {% for authority, requests in my_authorities.items %}
+               {% if authority == auth_hrn or "fibre" %}
+               <div class="col-md-12">
+                       <h2>{{authority}}</h2>
+               </div>
        
-       <div class="col-md-12">
-               <h2>{{authority}}</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}}
-            {% 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>
-       </div>
-       {% endfor %}
-
-{% else %}
-       <div class="col-md-12">
-               <i>There is no pending request waiting for validation.</i>
-       </div>
-{% endif %}
-<br />
-<div class="col-md-12">
-       <h2>Sub-Authorities</h2>
-</div>
-{% if sub_authorities %}
-       
-       {% for authority, requests in sub_authorities.items %}
-       <div class="col-md-12">
-       <h3>{{authority}}</h3>
            <table class="table">
              <th>
                <td>Type</td>
                <td>Status</td>
              </th>
            {% for request in requests %}
+
                  <tr>
                        <td>
                        {% if request.allowed == 'allowed' %}
                {% 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 %}'> -->
+
+    <!--<div class='portal_validate_request {{request.type}} {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}'> -->
                  </tr>
+
            {% endfor %}
-           </table>
-       </div>
+               </table>
+               </div>
+               {% endif %}
        {% endfor %}
+
 {% else %}
-<div class="col-md-12">
-       <i>There is no pending request waiting for validation.</i>
-</div>
+       <div class="col-md-12">
+               <i>There is no pending request waiting for validation.</i>
+       </div>
 {% endif %}
 <br />
 <div class="col-md-12">
-       <h2>Authorities with delegation</h2>
+       <h2>Sub-Authorities</h2>
 </div>
-
-{% if delegation_authorities %}
+{% if sub_authorities %}
        
-       {% for authority, requests in delegation_authorities.items %}
-       <div class="col-md-12">
+       {% for authority, requests in sub_authorities.items %}
+               {% if authority == auth_hrn or "fibre" %}
+               <div class="col-md-12">
                <h3>{{authority}}</h3>
                    <table class="table">
                      <th>
                                                denied
                                        {% endif %}
                                {% endif %}
-                               </td>
+                               </td>           
                                <td>{{ request.type }}</td>
                                <td>{{ request.id }}</td>
                                <td>
                            {% else %} {# authority #}
                        Authority name: {{request.site_name}} -- authority_hrn: {{request.site_authority}} -- City: {{request.address_city}} -- Country: {{request.address_country}}
                            {% 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 %}'> -->
+           <!--<div class='portal_validate_request {{request.type}} {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}'> -->
                          </tr>
                    {% endfor %}
                    </table>
                </div>
+               {% endif %}
+       {% endfor %}
+{% else %}
+<div class="col-md-12">
+       <i>There is no pending request waiting for validation.</i>
+</div>
+{% endif %}
+<br />
+<div class="col-md-12">
+       <h2>Authorities with delegation</h2>
+</div>
+
+{% if delegation_authorities %}
+       
+       {% for authority, requests in delegation_authorities.items %}
+       <div class="col-md-12">
+               {% if authority == "fibre" or auth_hrn %}
+                       <h3>{{authority}}</h3>
+                           <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}} -- user_hrn: {{ request.user_hrn }} -- Purpose: {{request.purpose}}
+                                   {% else %} {# authority #}
+                               Authority name: {{request.site_name}} -- authority_hrn: {{request.site_authority}} -- City: {{request.address_city}} -- Country: {{request.address_country}}
+                                   {% 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>
+               {% endif %}
+               </div>
                {% endfor %}
 {% else %}
 <div class="col-md-12">