Merge branch 'refs/heads/feature/3.0.0-pre/accessible-images' into feature/2.4.0/accessibility-master

Reverting img-tag replacement on top navigation

Conflicts:
	app/helpers/application_helper.rb
pull/41/head
Romano Licker 13 years ago
commit 506ec11128
  1. 10
      app/helpers/application_helper.rb
  2. 11
      app/views/layouts/base.rhtml
  3. 3
      lib/redmine.rb
  4. 18
      public/stylesheets/application.css

@ -1057,10 +1057,6 @@ module ApplicationHelper
split_top_menu_into_main_or_more_menus[:more]
end
def home_menu_item
split_top_menu_into_main_or_more_menus[:home]
end
def help_menu_item
split_top_menu_into_main_or_more_menus[:help]
end
@ -1071,14 +1067,11 @@ module ApplicationHelper
items_for_main_level = []
items_for_more_level = []
help_menu = nil
home_menu = nil
menu_items_for(:top_menu) do |item|
if item.name == :my_page
if item.name == :home || item.name == :my_page
items_for_main_level << item
elsif item.name == :help
help_menu = item
elsif item.name == :home
home_menu = item
elsif item.name == :projects
# Remove, present in layout
else
@ -1088,7 +1081,6 @@ module ApplicationHelper
@top_menu_split = {
:main => items_for_main_level,
:more => items_for_more_level,
:home => home_menu,
:help => help_menu
}
end

@ -47,9 +47,6 @@
<h1 class="hidden-for-sighted"><%= l(:label_top_menu) %></h1>
<ul id="account-nav">
<li>
<%= link_to(image_tag('icon_home.png', :alt => home_menu_item.caption, :title => home_menu_item.caption), home_menu_item.url, {:class => "home"}) %>
</li>
<% main_top_menu_items.each do |item| %>
<%= render_menu_node(item) %>
<% end %>
@ -74,9 +71,7 @@
</ul>
</li>
<% end %>
<li>
<%= link_to(image_tag('icon_help.png', :alt => help_menu_item.caption, :title => help_menu_item.caption), help_menu_item.url, {:class => "help"}) %>
</li>
<%= 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' %>
@ -104,7 +99,7 @@
</h1>
</div>
</div>
<% main_menu = render_main_menu(@project) %>
<% if (side_displayed = has_content?(:sidebar) || has_content?(:main_menu) || !main_menu.blank?) %>
<% display_sidebar = true %>
@ -119,7 +114,7 @@
<%= yield :main_menu %>
<% if display_sidebar %>
<!-- Sidebar -->
<div id="sidebar">
<div id="sidebar">
<%= yield :sidebar %>
<%= call_hook :view_layouts_base_sidebar %>
</div>

@ -162,8 +162,7 @@ Redmine::AccessControl.map do |map|
end
Redmine::MenuManager.map :top_menu do |menu|
# For accessibility purposes this menu is partly rebuild in layouts/base.rhtml
menu.push :home, :home
menu.push :home, :home_path
menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural # menu-item projects will be overwritten by base.rhtml
menu.push :administration, { :controller => 'admin', :action => 'projects' }, :if => Proc.new { User.current.admin? }, :last => true

@ -1253,27 +1253,21 @@ a:hover {
font-weight:bold;
color:#FFFFFF;
}
li a.home {
text-indent:-999em;
width:20px;
height:43px;
}
li a.home img {
position:relative;
top: 16px;
left: 3px;
background:url(../images/icon_home.png) no-repeat 50% 50%;
}
li a.help {
text-indent:-999em;
width:20px;
height:43px;
background:url(../images/icon_help.png) no-repeat 50% 50%;
}
li a.help img {
position:relative;
top: 14px;
left: 6px;
li a.help:hover {
background-image:url(../images/icon_help_grey.png);
}
#header li.drop-down.open > a {
background:#FFFFFF url(../images/arrow-down-grey.png) no-repeat right center;

Loading…
Cancel
Save