Project

General

Profile

Actions

Feature #14596

closed

Change the week days to month days in Gantt view

Feature #14596: Change the week days to month days in Gantt view

Added by Junhua Wang over 13 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Gantt
Target version:
-
Resolution:
Duplicate

Description

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


Files

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

Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #3034: Add day numbers to ganttClosedJean-Philippe LangActions

Updated by Junhua Wang over 13 years ago Actions #1

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 %>

Updated by Mischa The Evil over 13 years ago Actions #2

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...

Updated by Go MAEDA about 12 years ago Actions #3

Updated by Go MAEDA about 11 years ago Actions #4

  • 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.

Actions

Also available in: PDF Atom