1 {% extends "layout.html" %}
2 {% load portal_filters %}
5 <div class="row" id="home-dashboard">
6 <ul class="nav nav-tabs">
7 <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
8 <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
10 <div class="home-panel" id="user">
18 <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
19 <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
20 <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
24 <td class="logged-in">
25 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
27 {% if person.last_name %}
28 {{person.first_name}} {{person.last_name}}<br />
30 <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
34 {% widget '_widget-login-user.html' %}
39 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
40 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
45 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
47 <a href="/portal/contact">Contact</a> <br />
48 <a href="/portal/support/documentation">Documentation</a>
54 <div class="home-panel" id="manager">
62 <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
63 <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
64 <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
68 <td class="logged-in">
69 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
72 {% widget '_widget-login-manager.html' %}
77 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
82 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
90 $(document).ready(function() {
91 $('a.home-tab').click(function() {
92 $('ul.nav-tabs li').removeClass('active');
93 $(this).parent().addClass('active');
94 $('div.home-panel').hide();
95 $('div#'+$(this).data('panel')).show();
97 $('button#validaterequestbtn').click(function() {
98 window.location="/portal/validate/";
100 $('button#ticketbtn').click(function() {
101 window.location="/portal/contact/";
103 $('button#slicerequestbtn').click(function() {
104 window.location="/portal/slice_request/";
108 $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
110 $.each( data[0].slices, function(i, val) {
111 items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
114 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));