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