Project

General

Profile

Actions

Feature #14596

closed

Change the week days to month days in Gantt view

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Gantt
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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

Related to Redmine - Feature #3034: Add day numbers to ganttClosedJean-Philippe Lang2009-03-23

Actions
Actions #1

Updated by Junhua Wang over 11 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 %>
Actions #2

Updated by Mischa The Evil over 11 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...

Actions #3

Updated by Go MAEDA about 10 years ago

Actions #4

Updated by Go MAEDA about 9 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.

Actions

Also available in: Atom PDF