Feature #14596

Change the week days to month days in Gantt view

Added by Junhua Wang about 4 years ago. Updated about 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Gantt
Target version:-
Resolution:Duplicate

Description

so we can easily find out the date in Gantt view.

选区_022.png (7.78 KB) Junhua Wang, 2013-08-01 11:41


Related issues

Related to Redmine - Feature #3034: Add day numbers to gantt Closed 2009-03-23

History

#1 Updated by Junhua Wang about 4 years ago

Index: /home/tattoo/workspace/redmine/app/views/gantts/show.html.erb
===================================================================
--- /home/tattoo/workspace/redmine/app/views/gantts/show.html.erb    (版本 12072)
+++ /home/tattoo/workspace/redmine/app/views/gantts/show.html.erb    (工作副本)
@@ -237,6 +237,9 @@
     left = 0
     height = g_height + header_height - 1
     wday = @gantt.date_from.cwday
+
+    month_f = @gantt.date_from
+    mday = month_f.day
   %>
   <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
     <%
@@ -251,12 +254,18 @@
       clss << " nwday" if @gantt.non_working_week_days.include?(wday)
     %>
     <%= content_tag(:div, :style => style, :class => clss) do %>
-      <%= day_letter(wday) %>
+      <%= mday %> <!--%= day_letter(wday) % modified by tattoo-->
     <% end %>
     <%
       left = left + width + 1
       wday = wday + 1
       wday = 1 if wday > 7
+      
+      mday += 1
+      if mday > Date.new(month_f.year, month_f.month, -1).day
+        mday = 1 
+        month_f = month_f >> 1
+      end
     %>
   <% end %>
 <% end %>

#2 Updated by Mischa The Evil about 4 years ago

Junhua Wang wrote:

so we can easily find out the date in Gantt view.

I agree, that is currently pretty tough. Nevertheless, some users would probably still want to have the days displayed with the first letter of the day...

#3 Updated by Go MAEDA almost 3 years ago

#4 Updated by Go MAEDA about 2 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Day number in gantt has been implemented by #3034.
Please wait for the release of Redmine 3.2.0.

Also available in: Atom PDF