Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[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                 <div class="col-md-3">
12                         <h3>
13                                 EXPERIMENT
14                         </h3>
15                         <div>
16                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
17                         </div>
18                         <div>
19                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
20                         </div>
21                         <div>
22                         <p title="A slice is a set of testbed resources on which you can conduct an experiment. 
23                         Either ask your colleagues to give you access to an existing slice or request a new slice now.">
24                         <strong>Your slices</strong></p>
25                         </div>
26                         <div>   
27                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
28                         </div>
29                 </div>
30                 {%if 'is_pi'  in pi %}
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                  {%endif%}
41                 <div class="col-md-3">
42                         <h3>
43                                 SUPPORT
44                         </h3>
45                         <div>
46                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
47                         </div>
48                         <div>
49                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
50                         </div>
51                 </div>
52                 
53                 <div class="col-md-3">
54                         <h3>
55                                 ACCOUNT
56                         </h3>
57                         <div>
58                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
59                         </div>
60                         <div>
61                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
62                         </div>
63                         <div>
64                                 {% if person.last_name %}
65                                         {{person.first_name}} {{person.last_name}}<br />
66                                 {% endif %}
67                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
68                 </div>
69                 </div>
70         </div>
71 </div>
72 {% else %}
73 <div class="container-fluid home">
74         <div class="">
75                 <div class="col-sm-2"></div>
76                 <div class="col-sm-4 slogan">
77                         <h2>
78                                 Your Easy Access to Computer Networking Testbeds:
79                         </h2>
80                         <h3>
81                                 A wide variety of world class testbeds available through your one account
82                         </h3>
83                 </div>
84                 <div class="col-sm-5 col-sm-offset-1">
85                         <div class="row">
86                                 {% widget '_widget-login-user.html' %}
87                         </div>
88                 </div>
89                 <div class="col-sm-1"></div>
90         </div>
91 </div>
92 {% endif %}
93
94
95 <script type="text/javascript">
96         $(document).ready(function() {
97                 $('a.home-tab').click(function() {
98                         $('ul.nav-tabs li').removeClass('active');
99                         $(this).parent().addClass('active');
100                         $('div.home-panel').hide();
101                         $('div#'+$(this).data('panel')).show();
102                 });
103                 $('button#validaterequestbtn').click(function() {
104                         window.location="/portal/validate/";
105                 });
106                 $('button#ticketbtn').click(function() {
107                         window.location="/portal/contact/";
108                 });
109                 $('button#signupbtn').click(function() {
110                         window.location="/portal/register/";
111                 });
112                 $('button#slicerequestbtn').click(function() {
113                         window.location="/portal/slice_request/";
114                 });
115 /*-------
116 List of slices has been moved in 
117 portal/templates/base.html
118 This should go into session
119 --------*/
120 });
121 </script>
122 {% endblock %}