1 <header class="closed clearfix">
 
   3     <a href="<%= root_path %>" class="geolink">
 
   5         <source srcset="<%= image_path "osm_logo.svg" %>" type="image/svg+xml" />
 
   6         <%= image_tag "osm_logo.png", :srcset => image_path("osm_logo.svg"), :alt => t("layouts.logo.alt_text"), :class => "logo" %>
 
   8       <%= t "layouts.project_name.h1" %>
 
  11   <a href="#" id="menu-icon"></a>
 
  13     <%= content_for :header %>
 
  14     <div class="btn-group">
 
  15       <div id="edit_tab" class="btn-group <%= current_page_class(edit_path) %>">
 
  16         <%= link_to t("layouts.edit"),
 
  18                     :class => "btn btn-outline-primary geolink editlink",
 
  20                     :data => { :editor => preferred_editor } %>
 
  21         <button class='btn btn-outline-primary dropdown-toggle dropdown-toggle-split' type='button' data-bs-toggle='dropdown'></button>
 
  22         <ul class='dropdown-menu'>
 
  23           <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
 
  25               <%= link_to t("layouts.edit_with", :editor => t("editor.#{editor}.description")),
 
  26                           edit_path(:editor => editor),
 
  27                           :data => { :editor => editor },
 
  28                           :class => "geolink editlink dropdown-item" %>
 
  33       <%= link_to t("layouts.history"), history_path, :class => "btn btn-outline-primary geolink flex-grow-1 current_page_class(history_path)", :id => "history_tab" %>
 
  34       <%= link_to t("layouts.export"), export_path, :class => "btn btn-outline-primary geolink current_page_class(export_path)", :id => "export_tab" %>
 
  37   <nav class='secondary'>
 
  38     <ul class='mx-1 px-0'>
 
  39       <% if Settings.status != "database_offline" && can?(:index, Issue) %>
 
  40         <li class="compact-hide nav-item <%= current_page_class(issues_path) %>">
 
  41           <%= link_to issues_path(:status => "open"), :class => "nav-link" do %>
 
  42             <%= t("layouts.issues") %>
 
  43             <%= open_issues_count %>
 
  47       <li class="compact-hide nav-item <%= current_page_class(traces_path) %>">
 
  48         <%= link_to t("layouts.gps_traces"), traces_path, :class => "nav-link" %>
 
  50       <li class="compact-hide nav-item <%= current_page_class(diary_entries_path) %>">
 
  51         <%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "nav-link" %>
 
  53       <li class="compact-hide nav-item <%= current_page_class(communities_path) %>">
 
  54         <%= link_to t("layouts.communities"), communities_path, :class => "nav-link" %>
 
  56       <li class="compact-hide nav-item <%= current_page_class(copyright_path) %>">
 
  57         <%= link_to t("layouts.copyright"), copyright_path, :class => "nav-link" %>
 
  59       <li class="compact-hide nav-item <%= current_page_class(help_path) %>">
 
  60         <%= link_to t("layouts.help"), help_path, :class => "nav-link" %>
 
  62       <li class="compact-hide nav-item <%= current_page_class(about_path) %>">
 
  63         <%= link_to t("layouts.about"), about_path, :class => "nav-link" %>
 
  65       <li id="compact-secondary-nav" class="dropdown nav-item">
 
  66         <button class="dropdown-toggle nav-link btn" type="button" data-bs-toggle="dropdown"><%= t "layouts.more" %></button>
 
  67         <ul class="dropdown-menu">
 
  68           <% if Settings.status != "database_offline" && can?(:index, Issue) %>
 
  69             <li class="<%= current_page_class(issues_path) %>">
 
  70               <%= link_to issues_path(:status => "open"), :class => "dropdown-item" do %>
 
  71                 <%= t("layouts.issues") %>
 
  72                 <%= open_issues_count %>
 
  76           <li class="<%= current_page_class(traces_path) %>"><%= link_to t("layouts.gps_traces"), traces_path, :class => "dropdown-item" %></li>
 
  77           <li class="<%= current_page_class(diary_entries_path) %>"><%= link_to t("layouts.user_diaries"), diary_entries_path, :class => "dropdown-item" %></li>
 
  78           <li class="<%= current_page_class(communities_path) %>"><%= link_to t("layouts.communities"), communities_path, :class => "dropdown-item" %></li>
 
  79           <li class="<%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
 
  80           <li class="<%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
 
  81           <li class="<%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
 
  85     <% if current_user && current_user.id %>
 
  86       <div class='d-inline-flex dropdown user-menu logged-in clearfix'>
 
  87         <button class='dropdown-toggle btn btn-outline-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
 
  88           <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1") %>
 
  89           <%= render :partial => "layouts/inbox" %>
 
  90           <span class="user-button">
 
  91             <span class='username'>
 
  92               <%= current_user.display_name %>
 
  96         <div class='dropdown-menu dropdown-menu-end'>
 
  97           <%= link_to t("users.show.my_dashboard"), dashboard_path, :class => "dropdown-item" %>
 
  98           <%= link_to inbox_messages_path, :class => "dropdown-item" do %>
 
  99             <%= t("users.show.my messages") %>
 
 100             <span class='count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
 
 102           <%= link_to t("users.show.my profile"), user_path(current_user), :class => "dropdown-item" %>
 
 103           <%= link_to t("users.show.my settings"), edit_account_path, :class => "dropdown-item" %>
 
 104           <%= link_to t("users.show.my_preferences"), preferences_path, :class => "dropdown-item" %>
 
 105           <div class="dropdown-divider"></div>
 
 106           <%= yield :greeting %>
 
 107           <%= link_to t("layouts.logout"), logout_path(:referer => request.fullpath), :method => "post", :class => "geolink dropdown-item" %>
 
 111       <div class="d-inline-flex btn-group login-menu" role="">
 
 112         <%= link_to t("layouts.log_in"), login_path(:referer => request.fullpath), :class => "geolink btn btn-outline-secondary" %>
 
 113         <%= link_to t("layouts.sign_up"), user_new_path, :class => "btn btn-outline-secondary" %>