mirror of
https://github.com/redmine/redmine.git
synced 2024-09-09 22:25:56 +02:00
Added versions due dates on calendar.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@429 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
708c3c9ec6
commit
ef71edd331
@ -556,16 +556,17 @@ class ProjectsController < ApplicationController
|
||||
# finish on sunday
|
||||
@date_to = @date_to + (7-@date_to.cwday)
|
||||
|
||||
@events = []
|
||||
@project.issues_with_subprojects(params[:with_subprojects]) do
|
||||
@issues = Issue.find(:all,
|
||||
@events += Issue.find(:all,
|
||||
:include => [:tracker, :status, :assigned_to, :priority],
|
||||
:conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)) and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", @date_from, @date_to, @date_from, @date_to]
|
||||
) unless @selected_tracker_ids.empty?
|
||||
end
|
||||
@issues ||=[]
|
||||
@events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to])
|
||||
|
||||
@ending_issues_by_days = @issues.group_by {|issue| issue.due_date}
|
||||
@starting_issues_by_days = @issues.group_by {|issue| issue.start_date}
|
||||
@ending_events_by_days = @events.group_by {|event| event.due_date}
|
||||
@starting_events_by_days = @events.group_by {|event| event.start_date}
|
||||
|
||||
render :layout => false if request.xhr?
|
||||
end
|
||||
|
@ -57,7 +57,8 @@ while day <= @date_to
|
||||
<% end %>
|
||||
<td valign="top" class="<%= day.month==@month ? "even" : "odd" %>" style="width:14%; <%= Date.today == day ? 'background:#FDFED0;' : '' %>">
|
||||
<p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p>
|
||||
<% ((@ending_issues_by_days[day] || []) + (@starting_issues_by_days[day] || [])).uniq.each do |i| %>
|
||||
<% ((@ending_events_by_days[day] || []) + (@starting_events_by_days[day] || [])).uniq.each do |i| %>
|
||||
<% if i.is_a? Issue %>
|
||||
<div class="tooltip">
|
||||
<%= if day == i.start_date and day == i.due_date
|
||||
image_tag('arrow_bw.png')
|
||||
@ -71,6 +72,9 @@ while day <= @date_to
|
||||
<%= render :partial => "issues/tooltip", :locals => { :issue => i }%>
|
||||
</span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= image_tag('milestone.png') %> <small><%= "#{l(:label_version)}: #{i.name}" %></small>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<%= '</tr><tr style="height:100px">' if day.cwday >= 7 and day!=@date_to %>
|
||||
|
Loading…
Reference in New Issue
Block a user