]> source.dussan.org Git - redmine.git/commitdiff
Display non working days on gantt according to settings (#2161).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 29 Oct 2012 10:21:00 +0000 (10:21 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 29 Oct 2012 10:21:00 +0000 (10:21 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10750 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/gantts/show.html.erb
lib/redmine/helpers/gantt.rb
public/stylesheets/application.css

index 1c4b40046b395a345df3b6b0a442ccbf235d57d5..0cebd0a652807a369edc94a64883d09ea454d44e 100644 (file)
       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 %>
     <%
index 398f8233fc99c058248fd7dede11e0ffb6bdd7ac..27faf0a9687c775fbce16ad274716548334c95e6 100644 (file)
@@ -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
index 3e5ead969b434d8b7267ee6b373fd772b2e572a1..f45d408d743f3a19324b269937b4dd89bdaf2691 100644 (file)
@@ -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; }