1 {% extends "layout-unfold1.html" %}
3 {% block unfold_main %}
4 <div class="wrapper" 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='mailto:{{person.email}}'>{{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 {% if person.last_name %}
69 <div><span id='username'>{{person.first_name}} {{person.last_name}}</span></div> {% endif %}
70 <div><b>Email: </b><a href='mailto:{{person.email}}'>{{person.email}}</a></div>
73 {% include 'onelab__widget-login-manager.html' %}
80 <div><a href=""></a></div>
81 <div><a href=""></a></div>
88 $(document).ready(function() {
89 $('a.home-tab').click(function() {
90 $('ul.nav-tabs li').removeClass('active');
91 $(this).parent().addClass('active');
92 $('div.home-panel').hide();
93 $('div#'+$(this).data('panel')).show();
95 $('button#ticketbtn').click(function() {
96 window.location="/portal/contact/";
98 $('button#slicerequestbtn').click(function() {
99 window.location="/portal/slice_request/";
103 $.getJSON("rest/user", function( data ) {
105 $.each( data[0].slice, function( key, val ) {
106 items.push( "<li><a href=\"portal/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
109 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
115 {% endblock unfold_main %}