FIBRE: updated to the new version, wip on institution page
[unfold.git] / portal / templates / _widget-topmenu.html
1
2 <div id="header">
3         <div class="wrapper">
4                 <div class="logo">
5                         <a href="/"><img src="{{ STATIC_URL }}img/fibre-logo.gif" alt="FIBRE - Future Internet Testbeds Experimentation Between Brazil and Europe" width="150px" height="75px" /></a>
6                 </div>
7                 
8                 <div id="secondary">
9                         <ul>
10                                 <li><a href="/portal/about">About</a></li>
11                                 <li><a target="_blank" href="http://www.fibre-ict.eu/">Public Website</a></li>
12                         </ul>
13                 </div>
14         </div>
15         
16         {% if username %}
17         <div id="navigation">
18                 <div class="wrapper">
19                 <ul>
20                         <li id="nav-account"><a href="/portal/account/">{{ username }}</a></li>
21                         <li>|</li>
22                         <li id="nav-institution" class=""><a href="/portal/institution">INSTITUTION</a></li>
23                         <li class="slices">
24                                 <a class="dropdown-toggle" data-toggle="dropdown" href="#">
25                                 SLICES <span class="caret"></span>
26                         </a>
27                                 
28                                 <div class="dropdown-menu" style="z-index:99;">
29                                                 <ul id="dropdown-slice-list">
30                                                         <li><a href="/portal/slice_request/">Request Slice</a></li>
31                                                 </ul>
32                                 </div>
33                                 </li>
34                         <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
35                         <li id="nav-support"><a href="/portal/support/">SUPPORT</a></li>
36                         <li>|</li>
37                         <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>
38                 </ul>
39                 </div>
40         </div>
41         {% else %}
42         <div id="navigation">
43                 <div class="wrapper"></div>
44         </div>
45         {% endif %}
46 </div>
47 <script>
48         $(document).ready(function() {
49                 $('li.slices').mouseenter(function() {
50                         $('div#menu-slice-list').fadeIn(100);
51                 });
52                 $('div#menu-slice-list').mouseleave(function(e) {
53                         if (!$('li.slices').is(":hover")) {
54                                 $(this).fadeOut(100);
55                         }
56                 });
57                 // var slices = localStorage.getItem('slices');
58                 // if (slices.length == 0) {
59                         // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
60                         // var items = [];
61                                 // localStorage.setItem('slices', data[0].slice);
62                         // });
63                 // }
64                 // $.each(slices, function( key, val ) {
65                         // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
66                 // });
67                 // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
68         });
69 </script>