5fb5dcf68e15a833f3a770d1619caa58558e7064
[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 <div class="container-fluid home">
9         <div class="">
10                 <div class="col-sm-2"></div>
11                 <div class="col-sm-4 slogan">
12                         <h2>
13                                 Your Easy Access to Computer Networking Testbeds:
14                         </h2>
15                         <h3>
16                                 A wide variety of world class testbeds available through your one account
17                         </h3>
18                 </div>
19                 <div class="col-sm-5 col-sm-offset-1">
20                         {% if person %}
21                         <div class="logged-in">
22                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
23                                 <div>
24                                 {% if person.last_name %}
25                                         {{person.first_name}} {{person.last_name}}<br />
26                                 {% endif %}
27                                 <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
28                         </div>
29                 </div>
30                         {% else %}
31                         <div class="row">
32                                 {% widget '_widget-login-user.html' %}
33                         </div>
34                         {% endif %}
35                         
36                         {% if person %}
37                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
38                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
39                         {% else %}
40                         {% endif %}
41                         
42                                 <!-- <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button> -->
43                 </div>
44                 <div class="col-sm-1"></div>
45         </div>
46 </div>
47
48 <script type="text/javascript">
49         $(document).ready(function() {
50                 $('a.home-tab').click(function() {
51                         $('ul.nav-tabs li').removeClass('active');
52                         $(this).parent().addClass('active');
53                         $('div.home-panel').hide();
54                         $('div#'+$(this).data('panel')).show();
55                 });
56                 $('button#validaterequestbtn').click(function() {
57                         window.location="/portal/validate/";
58                 });
59                 $('button#ticketbtn').click(function() {
60                         window.location="/portal/contact/";
61                 });
62                 $('button#signupbtn').click(function() {
63                         window.location="/portal/register/";
64                 });
65                 $('button#slicerequestbtn').click(function() {
66                         window.location="/portal/slice_request/";
67                 });
68 /*-------
69 List of slices has been moved in 
70 portal/templates/base.html
71 This should go into session
72 --------*/
73 });
74 </script>
75 {% endblock %}