:include => [:tracker, :status, :assigned_to, :priority, :project],
:conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?)) AND #{Issue.table_name}.tracker_id IN (#{@selected_tracker_ids.join(',')})", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt]
) unless @selected_tracker_ids.empty?
+ events += Version.find(:all, :include => :project,
+ :conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt])
end
- events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt])
@calendar.events = events
render :layout => false if request.xhr?
:include => [:tracker, :status, :assigned_to, :priority, :project],
:conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')}))", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to]
) unless @selected_tracker_ids.empty?
+ @events += Version.find(:all, :include => :project,
+ :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to])
end
- @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to])
@events.sort! {|x,y| x.start_date <=> y.start_date }
if params[:format]=='pdf'
conditions = nil
if include_subprojects && !active_children.empty?
ids = [id] + active_children.collect {|c| c.id}
- conditions = ["#{Issue.table_name}.project_id IN (#{ids.join(',')})"]
+ conditions = ["#{Project.table_name}.id IN (#{ids.join(',')})"]
end
- conditions ||= ["#{Issue.table_name}.project_id = ?", id]
+ conditions ||= ["#{Project.table_name}.id = ?", id]
# Quick and dirty fix for Rails 2 compatibility
Issue.send(:with_scope, :find => { :conditions => conditions }) do
- yield
+ Version.send(:with_scope, :find => { :conditions => conditions }) do
+ yield
+ end
end
end
elsif day == i.due_date
image_tag('arrow_to.png')
end %>
- <%= h("#{i.project.name} -") unless @project && @project == i.project %>
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_issue i %>: <%= h(truncate(i.subject, 30)) %>
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>
- <%= link_to_version i, :class => "icon icon-package" %>
+ <span class="icon icon-package">
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
+ <%= link_to_version i%>
+ </span>
<% end %>
<% end %>
</td>
@events.each do |i| %>
<div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small>
<% if i.is_a? Issue %>
- <%= h("#{i.project.name} -") unless @project && @project == i.project %>
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_issue i %>: <%=h i.subject %>
<% else %>
- <%= link_to_version i, :class => "icon icon-package" %>
+ <span class="icon icon-package">
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
+ <%= link_to_version i %>
+ </span>
<% end %>
</small></div>
<% top = top + 20
%>
<div style="top:<%= top %>px;left:<%= i_left %>px;width:15px;" class="task milestone"> </div>
<div style="top:<%= top %>px;left:<%= i_left + 12 %>px;background:#fff;" class="task">
- <strong><%= i.name %></strong>
+ <%= h("#{i.project} -") unless @project && @project == i.project %>
+ <strong><%=h i %></strong>
</div>
<% end %>
<% top = top + 20