15038cac7ba508965984b3ae754ec33bae2456fb
[unfold.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                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
23                         </div>
24                 </div>
25                 {%if 'is_pi'  in pi %}
26                 <div class="col-md-3">
27                         <h3>MANAGEMENT</h3>
28                         <div>
29                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
30                         </div>
31                         <div>
32                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
33                         </div>
34                 </div>
35                  {%endif%}
36                 <div class="col-md-3">
37                         <h3>
38                                 SUPPORT
39                         </h3>
40                         <div>
41                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
42                         </div>
43                         <div>
44                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
45                         </div>
46                 </div>
47                 
48                 <div class="col-md-3">
49                         <h3>
50                                 ACCOUNT
51                         </h3>
52                         <div>
53                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
54                         </div>
55                         <div>
56                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
57                         </div>
58                         <div>
59                                 {% if person.last_name %}
60                                         {{person.first_name}} {{person.last_name}}<br />
61                                 {% endif %}
62                         <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
63                 </div>
64                 </div>
65         </div>
66 </div>
67 {% else %}
68 <div class="container-fluid home">
69         <div class="">
70                 <div class="col-sm-2"></div>
71                 <div class="col-sm-4 slogan">
72                         <h2>
73                                 Your Easy Access to Computer Networking Testbeds:
74                         </h2>
75                         <h3>
76                                 A wide variety of world class testbeds available through your one account
77                         </h3>
78                 </div>
79                 <div class="col-sm-5 col-sm-offset-1">
80                         <div class="row">
81                                 {% widget '_widget-login-user.html' %}
82                         </div>
83                 </div>
84                 <div class="col-sm-1"></div>
85         </div>
86 </div>
87 {% endif %}
88
89
90 <script type="text/javascript">
91         $(document).ready(function() {
92                 $('a.home-tab').click(function() {
93                         $('ul.nav-tabs li').removeClass('active');
94                         $(this).parent().addClass('active');
95                         $('div.home-panel').hide();
96                         $('div#'+$(this).data('panel')).show();
97                 });
98                 $('button#validaterequestbtn').click(function() {
99                         window.location="/portal/validate/";
100                 });
101                 $('button#ticketbtn').click(function() {
102                         window.location="/portal/contact/";
103                 });
104                 $('button#signupbtn').click(function() {
105                         window.location="/portal/register/";
106                 });
107                 $('button#slicerequestbtn').click(function() {
108                         window.location="/portal/slice_request/";
109                 });
110 /*-------
111 List of slices has been moved in 
112 portal/templates/base.html
113 This should go into session
114 --------*/
115 });
116 </script>
117 {% endblock %}