fix: topmenu for pi and non pi
[myslice.git] / portal / templates / onelab / onelab_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 title="A slice is a set of testbed resources on which you can conduct an experiment. 
24                         Either ask your colleagues to give you access to an existing slice or request a new slice now.">
25                         <strong>Your slices</strong></p>
26                         </div>
27                         <div>   
28                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
29                         </div>
30                 </div>
31                 <div class="col-md-3">
32                         <h3>MANAGEMENT</h3>
33                         <div>
34                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
35                         </div>
36                         <div>
37                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
38                         </div>
39                 </div>
40                 <div class="col-md-3">
41                         <h3>
42                                 SUPPORT
43                         </h3>
44                         <div>
45                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
46                         </div>
47                         <div>
48                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
49                         </div>
50                 </div>
51                 
52                 <div class="col-md-3">
53                         <h3>
54                                 ACCOUNT
55                         </h3>
56                         <div>
57                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
58                         </div>
59                         <div>
60                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
61                         </div>
62                         <div>
63                                 {% if person.last_name %}
64                                         {{person.first_name}} {{person.last_name}}<br />
65                                 {% endif %}
66                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
67                 </div>
68                 </div>
69         </div>
70         {%else%}
71         <div class="row">
72                 <div class="col-md-4">
73                         <h3>
74                                 EXPERIMENT
75                         </h3>
76                         <div>
77                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
78                         </div>
79                         <div>
80                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
81                         </div>
82                         <div>
83                         <p title="A slice is a set of testbed resources on which you can conduct an experiment. 
84                         Either ask your colleagues to give you access to an existing slice or request a new slice now.">
85                         <strong>Your slices</strong></p>
86                         </div>
87                         <div>   
88                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
89                         </div>
90                 </div>
91                 <div class="col-md-4">
92                         <h3>
93                                 SUPPORT
94                         </h3>
95                         <div>
96                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
97                         </div>
98                         <div>
99                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
100                         </div>
101                 </div>
102                 
103                 <div class="col-md-4">
104                         <h3>
105                                 ACCOUNT
106                         </h3>
107                         <div>
108                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
109                         </div>
110                         <div>
111                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
112                         </div>
113                         <div>
114                                 {% if person.last_name %}
115                                         {{person.first_name}} {{person.last_name}}<br />
116                                 {% endif %}
117                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
118                 </div>
119                 </div>
120         </div>
121         {%endif%}
122
123 </div>
124 {% else %}
125 <div class="container-fluid home">
126         <div class="">
127                 <div class="col-sm-2"></div>
128                 <div class="col-sm-4 slogan">
129                         <h2>
130                                 Your Easy Access to Computer Networking Testbeds:
131                         </h2>
132                         <h3>
133                                 A wide variety of world class testbeds available through your one account
134                         </h3>
135                 </div>
136                 <div class="col-sm-5 col-sm-offset-1">
137                         <div class="row">
138                                 {% widget '_widget-login-user.html' %}
139                         </div>
140                 </div>
141                 <div class="col-sm-1"></div>
142         </div>
143 </div>
144 {% endif %}
145
146
147 <script type="text/javascript">
148         $(document).ready(function() {
149                 $('a.home-tab').click(function() {
150                         $('ul.nav-tabs li').removeClass('active');
151                         $(this).parent().addClass('active');
152                         $('div.home-panel').hide();
153                         $('div#'+$(this).data('panel')).show();
154                 });
155                 $('button#validaterequestbtn').click(function() {
156                         window.location="/portal/validate/";
157                 });
158                 $('button#ticketbtn').click(function() {
159                         window.location="/portal/contact/";
160                 });
161                 $('button#signupbtn').click(function() {
162                         window.location="/portal/register/";
163                 });
164                 $('button#slicerequestbtn').click(function() {
165                         window.location="/portal/slice_request/";
166                 });
167 /*-------
168 List of slices has been moved in 
169 portal/templates/base.html
170 This should go into session
171 --------*/
172 });
173 </script>
174 {% endblock %}