Top Menu: grey background when selected, logout icon
[unfold.git] / portal / templates / onelab / onelab__widget-topmenu.html
1 {% insert_str prelude "js/bootstrap.js" %}
2 {% insert_str prelude "css/bootstrap.css" %}
3 {% insert_str prelude "css/topmenu.css" %}
4 {% insert_str prelude "js/logout.js" %}
5 <div id="header">
6         <div class="wrapper">
7                 <div class="logo">
8                         <a href="/"><img src="{{ STATIC_URL }}img/onelab-portal.png" alt="OneLab - Future Internet Testbeds" /></a>
9                 </div>
10                 
11                 <div id="secondary">
12                         <ul>
13                                 <li>News</li>
14                                 <li><a href="/portal/about">About</a></li>
15                                 <li><a target="_blank" href="http://www.onelab.eu">Public Website</a></li>
16                                 <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
17                         </ul>
18                 </div>
19         </div>
20         
21         {% if username %}
22         <div id="navigation">
23                 <div class="wrapper">
24                 <ul>
25                         <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
26                         <li>|</li>
27                         <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
28                         <li>SLICES</li>
29                         <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
30                         <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
31                         <li>|</li>
32                         <li id="nav-logout" style="margin-top: 10px;"><a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> LOGOUT</a></li>
33                 </ul>
34                 </div>
35         </div>
36         {% else %}
37         <div id="navigation">
38                 <div class="wrapper"></div>
39         </div>
40         {% endif %}
41 </div>
42 <script>
43         $(document).ready(function() {
44                 // var slices = localStorage.getItem('slices');
45                 // if (slices.length == 0) {
46                         // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
47                         // var items = [];
48                                 // localStorage.setItem('slices', data[0].slice);
49                         // });
50                 // }
51                 // $.each(slices, function( key, val ) {
52                         // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
53                 // });
54                 // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
55         });
56 </script>