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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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.12.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({:controller => 'search', :action => 'index', :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="wrapper2">
  53. <div id="wrapper3">
  54. <div id="top-menu">
  55. <div id="account">
  56. <%= render_menu :account_menu -%>
  57. </div>
  58. <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
  59. <%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
  60. </div>
  61. <div id="header">
  62. <a href="#" class="mobile-toggle-button js-flyout-menu-toggle-button"></a>
  63. <% if User.current.logged? || !Setting.login_required? %>
  64. <div id="quick-search">
  65. <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %>
  66. <%= hidden_field_tag 'scope', default_search_project_scope, :id => nil %>
  67. <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
  68. <label for='q'>
  69. <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project, :scope => default_search_project_scope}, :accesskey => accesskey(:search) %>:
  70. </label>
  71. <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search),
  72. :data => {
  73. :auto_complete => true
  74. } %>
  75. <% end %>
  76. <%= render_project_jump_box %>
  77. </div>
  78. <% end %>
  79. <h1><%= page_header_title %></h1>
  80. <% if display_main_menu?(@project) %>
  81. <div id="main-menu" class="tabs">
  82. <%= render_main_menu(@project) %>
  83. <div class="tabs-buttons" style="display:none;">
  84. <button class="tab-left" onclick="moveTabLeft(this); return false;"></button>
  85. <button class="tab-right" onclick="moveTabRight(this); return false;"></button>
  86. </div>
  87. </div>
  88. <% end %>
  89. </div>
  90. <div id="main" class="<%= sidebar_content? ? '' : 'nosidebar' %>">
  91. <div id="sidebar">
  92. <%= yield :sidebar %>
  93. <%= view_layouts_base_sidebar_hook_response %>
  94. </div>
  95. <div id="content">
  96. <%= render_flash_messages %>
  97. <%= yield %>
  98. <%= call_hook :view_layouts_base_content %>
  99. <div style="clear:both;"></div>
  100. </div>
  101. </div>
  102. <div id="footer">
  103. Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2020 Jean-Philippe Lang
  104. </div>
  105. </div>
  106. <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
  107. <div id="ajax-modal" style="display:none;"></div>
  108. </div>
  109. </div>
  110. <%= call_hook :view_layouts_base_body_bottom %>
  111. </body>
  112. </html>