OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/app/views/layouts/base.rhtml

166 lines
6.8 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<%= I18n.locale.to_s %>" xml:lang="<%= I18n.locale.to_s %>">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'reset', :media => 'all' %>
<%= stylesheet_link_tag 'smoothness/jquery-ui', :media => 'all' %>
<%= stylesheet_link_tag 'application', :media => 'all' %>
<%= stylesheet_link_tag 'print', :media => 'print' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<!--[if lte IE 6]><%= stylesheet_link_tag 'ie6', :media => 'all' %><![endif]-->
<!--[if lte IE 7]><%= stylesheet_link_tag 'ie7', :media => 'all' %><![endif]-->
<!--[if gte IE 8]><![endif]-->
<%= javascript_include_tag 'jquery.min.js' %>
<%= javascript_include_tag 'jquery-ui.min.js' %>
<%= javascript_include_tag 'jquery.menu_expand.js' %>
<%= javascript_include_tag 'chosen.js'%>
<%= stylesheet_link_tag 'chosen'%>
<%= javascript_tag('jQuery.noConflict();') %>
<%= javascript_heads %>
<%= stylesheet_link_tag 'jstoolbar' %>
<%= heads_for_theme %>
<% heads_for_wiki_formatter %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<noscript><%=l(:description_noscript)%></noscript>
<body class="<%=h body_css_classes %>">
<div id="wrapper">
<div id="top-menu">
<div id="header">
<div id="logo"></div>
<div id="top-menu-items">
<div id="search">
<%= label_tag("q", l(:label_search), :class => "hidden-for-sighted") %>
<% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get) do %>
<%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %>
<div id='search_wrap'>
<%= text_field_tag 'q', @question, :size => 20, :class => 'search_field', :placeholder => l(:search_input_placeholder), :accesskey => accesskey(:quick_search) %>
</div>
<% end %>
</div>
<h1 class="hidden-for-sighted"><%= l(:label_top_menu) %></h1>
<ul id="account-nav" class="menu_root">
<% main_top_menu_items.each do |item| %>
<%= render_menu_node(item) %>
<% end %>
<% if !Project.visible.empty? and (User.current.logged? or !Setting.login_required?) %>
<li class="<%= User.current.impaired? ? "" : "drop-down" %>">
<%= link_to l(:label_project_plural), {:controller => 'projects', :action => 'index'}, :title => l(:label_project_plural) %>
<% unless User.current.impaired? %>
<ul style="display:none;" class="limit-width-topmenu">
<li><%= link_to l(:label_project_view_all), :controller => 'projects', :action => 'index' %></li>
<li><%= render_project_jump_box Project.visible, :id => "project-search", :class => "chzn-select", :'data-placeholder' => "Enter Project Name..." %></li>
</ul>
<% end %>
</li>
<% end %>
<% unless (items = more_top_menu_items).empty? %>
<li class="drop-down" id="more-menu">
<a class="more" href="#" title="<%= l(:label_modules) %>"><%= l(:label_modules) %></a>
<ul style="display:none;" class="limit-width-topmenu">
<% items.each do |item| %>
<%= render_menu_node(item) %>
<% end %>
</ul>
</li>
<% end %>
<%= render_menu_node(help_menu_item) %>
<li class="drop-down last-child">
<% unless User.current.logged? %>
<%= link_to l(:label_login), {:controller => 'account', :action => 'login'}, :class => 'login' %>
<!-- IE7 Fix - extra div needed for slideToggle animation -->
<ul>
<%= render :partial => 'account/login' %>
</ul>
<% else %>
<%= link_to_user(User.current,:title => User.current.to_s) %>
<ul style="display:none;" class="limit-width-topmenu">
<% menu_items_for(:account_menu) do |item| %>
<%= render_menu_node(item) %>
<% end %>
</ul>
<% end %>
</li>
</ul>
</div>
</div>
<div id="breadcrumb" class="<%= @project.nil? ? 'noproject' : ' ' %>">
<h1>
<span class = 'hidden-for-sighted'><%=l(:description_current_position)%></span>
<%= breadcrumb_list(link_to('Home', home_path),
link_to_project_ancestors(@project),
*breadcrumb_paths) %>
</h1>
<h1 id="project-title"><%= @project %></h1>
</div>
</div>
<% main_menu = render_main_menu(@project) %>
<% side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank? %>
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %>">
<% if (side_displayed) %>
<div id="main-menu">
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1>
<div id="toggle-project-menu">
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>" class="navigation-toggler"></a>
</div>
<div id="menu-sidebar">
<%= main_menu %>
<%= yield :main_menu %>
<!-- Sidebar -->
<div id="sidebar">
<%= yield :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>
</div>
</div>
<%= expand_current_menu %>
<% end %>
<div class="<%= side_displayed ? '' : "nosidebar" %>" id="content">
<h1 class="hidden-for-sighted"><%= l(:label_content) %></h1>
<%= render_flash_messages %>
<!-- Action menu -->
<% if @content_for_action_menu_main %>
<ul class="action_menu_main">
<%= yield :action_menu_main %>
<% if @content_for_action_menu_more %>
<li class="drop-down">
<a href="javascript:" class="icon icon-more"><%= l(:more_actions) %></a>
<ul class="action_menu_more" style="display:none;">
<%= yield :action_menu_more %>
</ul>
</li>
<% end %>
</ul>
<% end %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;">&nbsp;</div>
</div>
</div>
<div id="footer">
<div class="bgl"><div class="bgr">
<%= l(:text_powered_by, :link => link_to(Redmine::Info.app_name, Redmine::Info.url)) %>
</div></div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>