Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.git] / portal / templates / onelab / onelab_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/onelab-portal.png" alt="OneLab Portal - Future Internet Testbeds" /></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="/institution">MANAGEMENT</a></li>
24                                  {%endif%}
25                                 <li><a href="/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="/news">News</a></li>
35                                 <li><a href="/about">About</a></li>
36                                 <li><a target="_blank" href="https://www.onelab.eu">Public Website</a></li>
37                                 <li><a target="_blank" href="http://intranet.onelab.eu">Intranet</a></li>
38                         </ul>
39                         {% if username %}
40                         <div class="account">You are logged in as &nbsp;<a href="/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>
41                         {% endif %}
42                 </div>
43         </div>
44 </div>
45 </div>
46
47 <div class="row">
48 {% widget '_widget-message.html' %}
49 </div>
50 <script>
51         $(document).ready(function() {
52                 $('li.slices').mouseenter(function() {
53                         $('div#menu-slice-list').fadeIn(100);
54                 });
55                 $('div#menu-slice-list').mouseleave(function(e) {
56                         if (!$('li.slices').is(":hover")) {
57                                 $(this).fadeOut(100);
58                         }
59                 });
60                 // var slices = localStorage.getItem('slices');
61                 // if (slices.length == 0) {
62                         // $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
63                         // var items = [];
64                                 // localStorage.setItem('slices', data[0].slice);
65                         // });
66                 // }
67                 // $.each(slices, function( key, val ) {
68                         // items.push( "<li><a href=\"/slice/"+val.slice_hrn+"\">" + val.slice_hrn + "</a></li>" );
69                 // });
70                 // $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
71         });
72 </script>