From 1f55907f83aa32c9810eedd61d559a666ac091a8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 29 Oct 2012 10:21:00 +0000 Subject: [PATCH] Display non working days on gantt according to settings (#2161). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10750 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/gantts/show.html.erb | 5 +++-- lib/redmine/helpers/gantt.rb | 1 + public/stylesheets/application.css | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 1c4b40046..0cebd0a65 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -201,9 +201,10 @@ style += "width: #{width}px;" style += "height: #{height}px;" style += "font-size:0.7em;" - style += 'background:#f1f1f1;' if wday > 5 + clss = "gantt_hdr" + clss << " nwday" if @gantt.non_working_week_days.include?(wday) %> - <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %> + <%= content_tag(:div, :style => style, :class => clss) do %> <%= day_letter(wday) %> <% end %> <% diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 398f8233f..27faf0a96 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -21,6 +21,7 @@ module Redmine class Gantt include ERB::Util include Redmine::I18n + include Redmine::Utils::DateCalculation # :nodoc: # Some utility methods for the PDF export diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3e5ead969..f45d408d7 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -879,6 +879,8 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');} overflow: hidden; } +.gantt_hdr.nwday {background-color:#f1f1f1;} + .gantt_subjects { font-size: 0.8em; } .gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; } -- 2.39.5