Generic footer
[unfold.git] / portal / templates / smartfire / smartfire_home-view.html
1 {% extends "layout_base.html" %}
2 {% load portal_filters %}
3
4 {% block content %}
5 <!-- <div class="row">
6 {% widget '_widget-news.html' %}
7 </div> -->
8 {% if username %}
9 {% widget "_widget-no_credentials.html" %}
10 <div class="container dashboard">
11         {%if 'no_creds'  in user_cred %}
12         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
13     {%endif%}
14         {%if 'creds_expired'  in user_cred %}
15         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">EXPIRED CREDENTIALS</a> Please delegate again your credentials to the portal!</p>
16     {%endif%}
17
18         <div class="row">
19                 {% if pi %}
20                 <div class="col-md-3">
21                         <h3>
22                                 EXPERIMENT
23                         </h3>
24                         <div>
25                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
26                         </div>
27                         <div>
28                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
29                         </div>
30                         <div>
31                                 <p><strong>Your slices </strong>
32                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
33                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'." 
34                                         class="glyphicon glyphicon-info-sign">
35                                 </span>
36
37                                 </p>
38                         </div>
39                         <div>   
40                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
41                         </div>
42                 </div>
43                 <div class="col-md-3">
44                         <h3>MANAGEMENT</h3>
45                         <div>
46                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
47                         </div>
48                         <div>
49                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
50                         </div>
51                 </div>
52                 <div class="col-md-3">
53                         <h3>
54                                 SUPPORT
55                         </h3>
56                         <div>
57                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
58                         </div>
59                         <div>
60                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
61                         </div>
62                 </div>
63                 
64                 <div class="col-md-3">
65                         <h3>
66                                 ACCOUNT
67                         </h3>
68                         <div>
69                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
70                         </div>
71                         <div>
72                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
73                         </div>
74                         <div>
75                                 {% if person.last_name %}
76                                         {{person.first_name}} {{person.last_name}}<br />
77                                 {% endif %}
78                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
79                 </div>
80                 </div>
81         </div>
82         {%else%}
83         <div class="row">
84                 <div class="col-md-4">
85                         <h3>
86                                 EXPERIMENT
87                         </h3>
88                         <div>
89                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
90                         </div>
91                         <div>
92                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
93                         </div>
94                         <div>
95                                 <p><strong>Your slices </strong>
96                                 <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
97                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'."
98                                         class="glyphicon glyphicon-info-sign">
99                                 </span>
100                                 </p>
101                         </div>
102                         <div>   
103                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
104                         </div>
105                         {% if pending_slices %}
106                         <p><strong>Pending slices</strong>
107                         <span title="Slices that you have requested and are pending for validation by the contact person of your organization."
108                                 class="glyphicon glyphicon-info-sign">
109                         <ul>
110                         {% for slices in pending_slices %}
111                         <li>{{slices}}</li>
112                         {% endfor %}
113                         </ul>
114                         </span>
115                         </p>
116                         {%endif%}       
117                 </div>
118                 <div class="col-md-4">
119                         <h3>
120                                 SUPPORT
121                         </h3>
122                         <div>
123                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
124                         </div>
125                         <div>
126                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
127                         </div>
128                 </div>
129                 
130                 <div class="col-md-4">
131                         <h3>
132                                 ACCOUNT
133                         </h3>
134                         <div>
135                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
136                         </div>
137                         <div>
138                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
139                         </div>
140                         <div>
141                                 {% if person.last_name %}
142                                         {{person.first_name}} {{person.last_name}}<br />
143                                 {% endif %}
144                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
145                 </div>
146                 </div>
147         </div>
148         {%endif%}
149
150 </div>
151 {% else %}
152 <div class="container-fluid home">
153         <div class="">
154                 <div class="col-sm-2"></div>
155                 <div class="col-sm-4 slogan">
156                         <h2>
157                                 Your Easy Access to Computer Networking Testbeds:
158                         </h2>
159                         <h3>
160                                 A wide variety of world class testbeds available through your one account
161                         </h3>
162                 </div>
163                 <div class="col-sm-5 col-sm-offset-1">
164                         <div class="row">
165                                 {% widget '_widget-login-user.html' %}
166                         </div>
167                 </div>
168                 <div class="col-sm-1"></div>
169         </div>
170 </div>
171 {% endif %}
172
173
174 <script type="text/javascript">
175         $(document).ready(function() {
176                 $('a.home-tab').click(function() {
177                         $('ul.nav-tabs li').removeClass('active');
178                         $(this).parent().addClass('active');
179                         $('div.home-panel').hide();
180                         $('div#'+$(this).data('panel')).show();
181                 });
182                 $('button#validaterequestbtn').click(function() {
183                         window.location="/portal/institution#requests";
184                 });
185                 $('button#ticketbtn').click(function() {
186                         window.location="/portal/contact/";
187                 });
188                 $('button#signupbtn').click(function() {
189                         window.location="/portal/register/";
190                 });
191                 $('button#slicerequestbtn').click(function() {
192                         window.location="/portal/slice_request/";
193                 });
194
195         myslice.loadSlices();
196         
197 });
198 </script>
199
200 {% endblock %}