8236fc5c4c875d0526c7418484a46d72cbc74319
[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 <div class="container dashboard">
10         <div class="row">
11                 {%if 'is_pi'  in pi %}
12                 <div class="col-md-3">
13                         <h3>
14                                 EXPERIMENT
15                         </h3>
16                         <div>
17                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
18                         </div>
19                         <div>
20                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
21                         </div>
22                         <div>
23                                 <p><strong>Your slices </strong>
24                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
25                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
26                                         However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
27                                         such as on the PlanetLab Europe portal, those slices will not appear here."
28                                         class="glyphicon glyphicon-info-sign">
29                                 </span>
30
31                                 </p>
32                         </div>
33                         <div>   
34                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
35                         </div>
36                 </div>
37                 <div class="col-md-3">
38                         <h3>MANAGEMENT</h3>
39                         <div>
40                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
41                         </div>
42                         <div>
43                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
44                         </div>
45                 </div>
46                 <div class="col-md-3">
47                         <h3>
48                                 SUPPORT
49                         </h3>
50                         <div>
51                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
52                         </div>
53                         <div>
54                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
55                         </div>
56                 </div>
57                 
58                 <div class="col-md-3">
59                         <h3>
60                                 ACCOUNT
61                         </h3>
62                         <div>
63                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
64                         </div>
65                         <div>
66                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
67                         </div>
68                         <div>
69                                 {% if person.last_name %}
70                                         {{person.first_name}} {{person.last_name}}<br />
71                                 {% endif %}
72                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
73                 </div>
74                 </div>
75         </div>
76         {%else%}
77         <div class="row">
78                 <div class="col-md-4">
79                         <h3>
80                                 EXPERIMENT
81                         </h3>
82                         <div>
83                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
84                         </div>
85                         <div>
86                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
87                         </div>
88                         <div>
89                                 <p><strong>Your slices </strong>
90                                 <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
91                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
92                                         However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
93                                         such as on the PlanetLab Europe portal, those slices will not appear here."
94                                         class="glyphicon glyphicon-info-sign">
95                                 </span>
96                                 </p>
97                         </div>
98                         <div>   
99                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
100                         </div>
101                 </div>
102                 <div class="col-md-4">
103                         <h3>
104                                 SUPPORT
105                         </h3>
106                         <div>
107                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
108                         </div>
109                         <div>
110                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
111                         </div>
112                 </div>
113                 
114                 <div class="col-md-4">
115                         <h3>
116                                 ACCOUNT
117                         </h3>
118                         <div>
119                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
120                         </div>
121                         <div>
122                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
123                         </div>
124                         <div>
125                                 {% if person.last_name %}
126                                         {{person.first_name}} {{person.last_name}}<br />
127                                 {% endif %}
128                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
129                 </div>
130                 </div>
131         </div>
132         {%endif%}
133
134 </div>
135 {% else %}
136 <div class="container-fluid home">
137         <div class="">
138                 <div class="col-sm-2"></div>
139                 <div class="col-sm-4 slogan">
140                         <h2>
141                                 SmartFIRE
142                         </h2>
143                         <h3>
144                                 EU-South Korea Cooperation<br>
145                                 On Future Internet Infrastructure
146                         </h3>
147                 </div>
148                 <div class="col-sm-5 col-sm-offset-1">
149                         <div class="row">
150                                 {% widget '_widget-login-user.html' %}
151                         </div>
152                 </div>
153                 <div class="col-sm-1"></div>
154         </div>
155 </div>
156 {% endif %}
157
158
159 <script type="text/javascript">
160         $(document).ready(function() {
161                 $('a.home-tab').click(function() {
162                         $('ul.nav-tabs li').removeClass('active');
163                         $(this).parent().addClass('active');
164                         $('div.home-panel').hide();
165                         $('div#'+$(this).data('panel')).show();
166                 });
167                 $('button#validaterequestbtn').click(function() {
168                         window.location="/portal/institution#requests";
169                 });
170                 $('button#ticketbtn').click(function() {
171                         window.location="/portal/contact/";
172                 });
173                 $('button#signupbtn').click(function() {
174                         window.location="/portal/register/";
175                 });
176                 $('button#slicerequestbtn').click(function() {
177                         window.location="/portal/slice_request/";
178                 });
179 /*-------
180 List of slices has been moved in 
181 portal/templates/base.html
182 This should go into session
183 --------*/
184 });
185 </script>
186 {# widget "_widget-monitor.html" #}
187 {# widget "_widget-stats-top-slices.html" #}
188
189 {% endblock %}