@@ -341,8 +341,9 class ProjectsController < ApplicationController | |||
|
341 | 341 | :include => [:tracker, :status, :assigned_to, :priority, :project], |
|
342 | 342 | :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] |
|
343 | 343 | ) unless @selected_tracker_ids.empty? |
|
344 | events += Version.find(:all, :include => :project, | |
|
345 | :conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt]) | |
|
344 | 346 | end |
|
345 | events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt]) | |
|
346 | 347 | @calendar.events = events |
|
347 | 348 | |
|
348 | 349 | render :layout => false if request.xhr? |
@@ -386,8 +387,9 class ProjectsController < ApplicationController | |||
|
386 | 387 | :include => [:tracker, :status, :assigned_to, :priority, :project], |
|
387 | 388 | :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] |
|
388 | 389 | ) unless @selected_tracker_ids.empty? |
|
390 | @events += Version.find(:all, :include => :project, | |
|
391 | :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) | |
|
389 | 392 | end |
|
390 | @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) | |
|
391 | 393 | @events.sort! {|x,y| x.start_date <=> y.start_date } |
|
392 | 394 | |
|
393 | 395 | if params[:format]=='pdf' |
@@ -75,12 +75,14 class Project < ActiveRecord::Base | |||
|
75 | 75 | conditions = nil |
|
76 | 76 | if include_subprojects && !active_children.empty? |
|
77 | 77 | ids = [id] + active_children.collect {|c| c.id} |
|
78 |
conditions = ["#{ |
|
|
78 | conditions = ["#{Project.table_name}.id IN (#{ids.join(',')})"] | |
|
79 | 79 | end |
|
80 |
conditions ||= ["#{ |
|
|
80 | conditions ||= ["#{Project.table_name}.id = ?", id] | |
|
81 | 81 | # Quick and dirty fix for Rails 2 compatibility |
|
82 | 82 | Issue.send(:with_scope, :find => { :conditions => conditions }) do |
|
83 | yield | |
|
83 | Version.send(:with_scope, :find => { :conditions => conditions }) do | |
|
84 | yield | |
|
85 | end | |
|
84 | 86 | end |
|
85 | 87 | end |
|
86 | 88 |
@@ -19,12 +19,15 while day <= calendar.enddt %> | |||
|
19 | 19 | elsif day == i.due_date |
|
20 | 20 | image_tag('arrow_to.png') |
|
21 | 21 | end %> |
|
22 |
<%= h("#{i.project |
|
|
22 | <%= h("#{i.project} -") unless @project && @project == i.project %> | |
|
23 | 23 | <%= link_to_issue i %>: <%= h(truncate(i.subject, 30)) %> |
|
24 | 24 | <span class="tip"><%= render_issue_tooltip i %></span> |
|
25 | 25 | </div> |
|
26 | 26 | <% else %> |
|
27 |
< |
|
|
27 | <span class="icon icon-package"> | |
|
28 | <%= h("#{i.project} -") unless @project && @project == i.project %> | |
|
29 | <%= link_to_version i%> | |
|
30 | </span> | |
|
28 | 31 | <% end %> |
|
29 | 32 | <% end %> |
|
30 | 33 | </td> |
@@ -70,10 +70,13 top = headers_height + 8 | |||
|
70 | 70 | @events.each do |i| %> |
|
71 | 71 | <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small> |
|
72 | 72 | <% if i.is_a? Issue %> |
|
73 |
<%= h("#{i.project |
|
|
73 | <%= h("#{i.project} -") unless @project && @project == i.project %> | |
|
74 | 74 | <%= link_to_issue i %>: <%=h i.subject %> |
|
75 | 75 | <% else %> |
|
76 |
|
|
|
76 | <span class="icon icon-package"> | |
|
77 | <%= h("#{i.project} -") unless @project && @project == i.project %> | |
|
78 | <%= link_to_version i %> | |
|
79 | </span> | |
|
77 | 80 | <% end %> |
|
78 | 81 | </small></div> |
|
79 | 82 | <% top = top + 20 |
@@ -197,7 +200,8 top = headers_height + 10 | |||
|
197 | 200 | %> |
|
198 | 201 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:15px;" class="task milestone"> </div> |
|
199 | 202 | <div style="top:<%= top %>px;left:<%= i_left + 12 %>px;background:#fff;" class="task"> |
|
200 | <strong><%= i.name %></strong> | |
|
203 | <%= h("#{i.project} -") unless @project && @project == i.project %> | |
|
204 | <strong><%=h i %></strong> | |
|
201 | 205 | </div> |
|
202 | 206 | <% end %> |
|
203 | 207 | <% top = top + 20 |
General Comments 0
You need to be logged in to leave comments.
Login now