FIBRE: updated to the new version, wip on institution page
[myslice.git] / portal / templates / fibre / fibre__widget-topmenu.html
1 {% load portal_filters %}
2 <div class="header">
3 <div class="container">
4         <div class="row">
5                 <div class="col-sm-3 col-md-3 logo">
6                         <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>
7                 </div>
8                 {% if username %}
9                 <div class="col-sm-4 col-md-4 navigation">
10                         <ul>
11                                 <li>
12                                         <a class="dropdown-toggle" data-toggle="dropdown" href="#">
13                                         EXPERIMENT <span class="caret"></span>
14                                 </a>
15                                         
16                                         <div class="dropdown-menu" style="z-index:99;">
17                                                         <ul id="dropdown-slice-list">
18                                                                 <li class="title"><a href="/portal/slice_request/">Request Slice</a></li>
19                                                         </ul>
20                                         </div>
21                                 </li>
22                                 {%if 'is_pi'  in pi %}  
23                                 <li id="nav-institution" class=""><a href="/portal/institution">MANAGEMENT</a></li>
24                                  {%endif%}
25                                 <li><a href="/portal/support/">SUPPORT</a></li>
26                         </ul>
27                 </div>
28                 {% else %}
29                 <div class="col-sm-4 col-md-4 navigation">
30                 </div>
31                 {% endif %}
32                 <div class="col-sm-5 col-md-5 secondary">
33                         <ul>
34                                 <li><a href="/portal/about">About</a></li>
35                                 <li><a target="_blank" href="http://www.fibre-ict.eu/">Public Website</a></li>
36                         </ul>
37                         {% if username %}
38                         <div class="account">You are logged in as &nbsp;<a href="/portal/account/">{{ username }}</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a id="logout" style="cursor:pointer;" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</a></div>
39                         {% endif %}
40                 </div>
41         </div>
42 </div>
43 </div>
44
45 <div class="row">
46 {% widget '_widget-message.html' %}
47 </div>
48 <script>
49         $(document).ready(function() {
50                 $('li.slices').mouseenter(function() {
51                         $('div#menu-slice-list').fadeIn(100);
52                 });
53                 $('div#menu-slice-list').mouseleave(function(e) {
54                         if (!$('li.slices').is(":hover")) {
55                                 $(this).fadeOut(100);
56                         }
57                 });
58                 // var slices = localStorage.getItem('slices');
59                 // if (slices.length == 0) {
60                         // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
61                         // var items = [];
62                                 // localStorage.setItem('slices', data[0].slice);
63                         // });
64                 // }
65                 // $.each(slices, function( key, val ) {
66                         // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
67                 // });
68                 // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
69         });
70 </script>