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