You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

base.html.erb 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html lang="<%= current_language %>">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6. <title><%= html_title %></title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <meta name="description" content="<%= Redmine::Info.app_name %>" />
  9. <meta name="keywords" content="issue,bug,tracker" />
  10. <%= csrf_meta_tag %>
  11. <%= favicon %>
  12. <%= stylesheet_link_tag 'jquery/jquery-ui-1.13.1', 'tribute-5.1.3', 'application', 'responsive', :media => 'all' %>
  13. <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
  14. <%= javascript_heads %>
  15. <%= heads_for_theme %>
  16. <%= heads_for_auto_complete(@project) %>
  17. <%= call_hook :view_layouts_base_html_head %>
  18. <!-- page specific tags -->
  19. <%= yield :header_tags -%>
  20. </head>
  21. <body class="<%= body_css_classes %>">
  22. <%= call_hook :view_layouts_base_body_top %>
  23. <div id="wrapper">
  24. <div class="flyout-menu js-flyout-menu">
  25. <% if User.current.logged? || !Setting.login_required? %>
  26. <div class="flyout-menu__search">
  27. <%= form_tag(search_path(id: @project), :method => :get ) do %>
  28. <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
  29. <%= label_tag 'flyout-search', '&#9906;'.html_safe, :class => 'search-magnifier search-magnifier--flyout' %>
  30. <%= text_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %>
  31. <% end %>
  32. </div>
  33. <% end %>
  34. <% if User.current.logged? %>
  35. <div class="flyout-menu__avatar <% if !Setting.gravatar_enabled? %>flyout-menu__avatar--no-avatar<% end %>">
  36. <% if Setting.gravatar_enabled? %>
  37. <%= link_to(avatar(User.current, :size => "80"), user_path(User.current)) %>
  38. <% end %>
  39. <%= link_to_user(User.current, :format => :username) %>
  40. </div>
  41. <% end %>
  42. <% if display_main_menu?(@project) %>
  43. <h3><%= l(:label_project) %></h3>
  44. <span class="js-project-menu"></span>
  45. <% end %>
  46. <h3><%= l(:label_general) %></h3>
  47. <span class="js-general-menu"></span>
  48. <span class="js-sidebar flyout-menu__sidebar"></span>
  49. <h3><%= l(:label_profile) %></h3>
  50. <span class="js-profile-menu"></span>
  51. </div>
  52. <div id="top-menu">
  53. <div id="account">
  54. <%= render_menu :account_menu -%>
  55. </div>
  56. <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
  57. <%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
  58. </div>
  59. <div id="header">
  60. <a href="#" class="mobile-toggle-button js-flyout-menu-toggle-button"></a>
  61. <% if User.current.logged? || !Setting.login_required? %>
  62. <div id="quick-search">
  63. <%= form_tag(search_path(id: @project), :method => :get ) do %>
  64. <%= hidden_field_tag 'scope', default_search_project_scope, :id => nil %>
  65. <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
  66. <label for='q'>
  67. <%= link_to l(:label_search), search_path(id: @project, :scope => default_search_project_scope), :accesskey => accesskey(:search) %>:
  68. </label>
  69. <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search),
  70. :data => {
  71. :auto_complete => true
  72. } %>
  73. <% end %>
  74. <%= render_project_jump_box %>
  75. </div>
  76. <% end %>
  77. <h1><%= page_header_title %></h1>
  78. <% if display_main_menu?(@project) %>
  79. <div id="main-menu" class="tabs">
  80. <%= render_main_menu(@project) %>
  81. <div class="tabs-buttons" style="display:none;">
  82. <button class="tab-left" onclick="moveTabLeft(this); return false;"></button>
  83. <button class="tab-right" onclick="moveTabRight(this); return false;"></button>
  84. </div>
  85. </div>
  86. <% end %>
  87. </div>
  88. <div id="main" class="<%= sidebar_content? ? '' : 'nosidebar' %>">
  89. <div id="sidebar">
  90. <%= yield :sidebar %>
  91. <%= view_layouts_base_sidebar_hook_response %>
  92. </div>
  93. <div id="content">
  94. <%= render_flash_messages %>
  95. <%= yield %>
  96. <%= call_hook :view_layouts_base_content %>
  97. <div style="clear:both;"></div>
  98. </div>
  99. </div>
  100. <div id="footer">
  101. Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2022 Jean-Philippe Lang
  102. </div>
  103. <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
  104. <div id="ajax-modal" style="display:none;"></div>
  105. </div>
  106. <%= call_hook :view_layouts_base_body_bottom %>
  107. </body>
  108. </html>