Remove #view_tab
[rails.git] / app / views / layouts / _header.html.erb
1 <header class="closed">
2   <h1>
3     <a href="<%= root_path %>" class="geolink layers">
4       <%= image_tag "osm_logo.png", :alt => t('layouts.logo.alt_text'), :class => 'logo' %>
5       <%= t 'layouts.project_name.h1' %>
6     </a>
7   </h1>
8   <a href="#" id="menu-icon"></a>
9   <nav class='primary'>
10     <ul>
11       <li id="edit_tab" class="mobile-hide dropdown <%= current_page_class(edit_path) %>">
12         <%= link_to t('layouts.edit'), edit_path, :class => "tab geolink object",
13                     :id => 'editanchor',
14                     :data => { :editor => preferred_editor }
15         %><a class='dropdown-toggle' data-toggle='dropdown' href='#'><b class="caret"></b></a>
16         <ul class='dropdown-menu'>
17           <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
18             <li>
19               <%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")),
20                           edit_path(:editor => editor),
21                           :data => { :editor => editor },
22                           :class => "geolink object" %>
23             </li>
24           <% end %>
25         </ul>
26       </li>
27       <li id="history_tab" class="<%= current_page_class(history_path) %>">
28         <%= link_to t('layouts.history'), history_path, :class => 'tab geolink' %>
29       </li>
30       <li id="export_tab" class="mobile-hide <%= current_page_class(export_path) %>">
31         <%= link_to t('layouts.export'), export_path, :class => 'tab geolink' %>
32       </li>
33     </ul>
34   </nav>
35   <nav class='secondary'>
36     <ul>
37       <li class="compact-hide <%= current_page_class(traces_path) %>"><%= link_to t('layouts.gps_traces'), traces_path %></li>
38       <li class="compact-hide <%= current_page_class(diary_path) %>"><%= link_to t('layouts.user_diaries'), diary_path %></li>
39       <li class="compact-hide <%= current_page_class(help_path) %>"><%= link_to t('layouts.help'), help_path %></li>
40       <li class="compact-hide <%= current_page_class(about_path) %>"><%= link_to t('layouts.about'), about_path %></li>
41       <li id="compact-secondary-nav" class="dropdown">
42         <a class="dropdown-toggle" data-toggle="dropdown" href="#">More <b class="caret"></b></a>
43         <ul class="dropdown-menu">
44           <li class="<%= current_page_class(traces_path) %>"><%= link_to t('layouts.gps_traces'), traces_path %></li>
45           <li class="<%= current_page_class(diary_path) %>"><%= link_to t('layouts.user_diaries'), diary_path %></li>
46           <li class="<%= current_page_class(help_path) %>"><%= link_to t('layouts.help'), help_path %></li>
47           <li class="<%= current_page_class(about_path) %>"><%= link_to t('layouts.about'), about_path %></li>
48         </ul>
49       </li>
50     </ul>
51     <% if @user %>
52       <div class='dropdown user-menu logged-in'>
53         <a class='dropdown-toggle' data-toggle='dropdown' href="#">
54           <%= user_thumbnail_tiny(@user, :size => 25, :width => 25, :height => 25)
55           %><%= render :partial => 'layouts/inbox'
56         %><span class="user-button"><span class='username'><%= @user.display_name %></span>
57           <b class="caret"></b></span>
58         </a>
59         <ul class='dropdown-menu'>
60           <li>
61             <%= link_to inbox_path(:display_name => @user.display_name) do %>
62               <span class='count-number'><%= number_with_delimiter(@user.new_messages.size) %></span>
63               <%= t('message.inbox.my_inbox') %>
64             <% end %>
65           </li>
66           <li>
67             <%= link_to t('user.view.my profile'), user_path(:display_name => @user.display_name) %>
68           </li>
69           <li>
70             <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
71           </li>
72           <li class="divider"></li>
73           <li>
74             <%= yield :greeting %>
75           </li>
76           <li>
77             <%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath) %>
78           </li>
79         </ul>
80       </div>
81     <% else %>
82       <ul class="user-menu clearfix">
83         <li><%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath) %></li>
84         <li><%= link_to t('layouts.sign_up'), user_new_path %></li>
85       </ul>
86     <% end %>
87   </nav>
88 </header>