1 {% extends "layout.html" %}
4 <div class="row" id="home-dashboard">
5 <ul class="nav nav-tabs">
6 <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
7 <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
9 <div class="home-panel" id="user">
17 <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
18 <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
19 <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
23 <td class="logged-in">
24 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
26 {% if person.last_name %}
27 {{person.first_name}} {{person.last_name}}<br />
29 <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
33 {% include 'onelab__widget-login-user.html' %}
38 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request a Slice</button>
39 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
44 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
46 <a href="/portal/contact">Contact</a> <br />
47 <a href="/portal/support/documentation">Documentation</a>
53 <div class="home-panel" id="manager">
61 <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
62 <td><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></td>
63 <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
67 <td class="logged-in">
68 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
71 {% include 'onelab__widget-login-manager.html' %}
76 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create a Slice</button>
81 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
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();
96 $('button#validaterequestbtn').click(function() {
97 window.location="/portal/validate/";
99 $('button#ticketbtn').click(function() {
100 window.location="/portal/contact/";
102 $('button#slicerequestbtn').click(function() {
103 window.location="/portal/slice_request/";
107 $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
109 $.each( data[0].slice, function( key, val ) {
110 items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
113 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));