Mercurial > hg > soundsoftware-site
comparison app/helpers/.svn/text-base/issues_helper.rb.svn-base @ 22:40f7cfd4df19
* Update to SVN trunk rev 4173
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 24 Sep 2010 14:06:04 +0100 |
parents | 1d32c0a0efbf |
children | 94944d00e43c |
comparison
equal
deleted
inserted
replaced
14:1d32c0a0efbf | 22:40f7cfd4df19 |
---|---|
26 end | 26 end |
27 yield issue, ancestors.size | 27 yield issue, ancestors.size |
28 ancestors << issue unless issue.leaf? | 28 ancestors << issue unless issue.leaf? |
29 end | 29 end |
30 end | 30 end |
31 | 31 |
32 # Renders a HTML/CSS tooltip | |
33 # | |
34 # To use, a trigger div is needed. This is a div with the class of "tooltip" | |
35 # that contains this method wrapped in a span with the class of "tip" | |
36 # | |
37 # <div class="tooltip"><%= link_to_issue(issue) %> | |
38 # <span class="tip"><%= render_issue_tooltip(issue) %></span> | |
39 # </div> | |
40 # | |
32 def render_issue_tooltip(issue) | 41 def render_issue_tooltip(issue) |
33 @cached_label_status ||= l(:field_status) | 42 @cached_label_status ||= l(:field_status) |
34 @cached_label_start_date ||= l(:field_start_date) | 43 @cached_label_start_date ||= l(:field_start_date) |
35 @cached_label_due_date ||= l(:field_due_date) | 44 @cached_label_due_date ||= l(:field_due_date) |
36 @cached_label_assigned_to ||= l(:field_assigned_to) | 45 @cached_label_assigned_to ||= l(:field_assigned_to) |
37 @cached_label_priority ||= l(:field_priority) | 46 @cached_label_priority ||= l(:field_priority) |
38 | 47 @cached_label_project ||= l(:field_project) |
48 | |
39 link_to_issue(issue) + "<br /><br />" + | 49 link_to_issue(issue) + "<br /><br />" + |
50 "<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />" + | |
40 "<strong>#{@cached_label_status}</strong>: #{issue.status.name}<br />" + | 51 "<strong>#{@cached_label_status}</strong>: #{issue.status.name}<br />" + |
41 "<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />" + | 52 "<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />" + |
42 "<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />" + | 53 "<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />" + |
43 "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" + | 54 "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" + |
44 "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}" | 55 "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}" |
241 | 252 |
242 case in_or_out | 253 case in_or_out |
243 when :in | 254 when :in |
244 if gantt.zoom < 4 | 255 if gantt.zoom < 4 |
245 link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))), | 256 link_to_remote(l(:text_zoom_in) + image_tag('zoom_in.png', img_attributes.merge(:alt => l(:text_zoom_in))), |
246 {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :update => 'content'}, | 257 {:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :method => :get, :update => 'content'}, |
247 {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))}) | 258 {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1)))}) |
248 else | 259 else |
249 l(:text_zoom_in) + | 260 l(:text_zoom_in) + |
250 image_tag('zoom_in_g.png', img_attributes.merge(:alt => l(:text_zoom_in))) | 261 image_tag('zoom_in_g.png', img_attributes.merge(:alt => l(:text_zoom_in))) |
251 end | 262 end |
252 | 263 |
253 when :out | 264 when :out |
254 if gantt.zoom > 1 | 265 if gantt.zoom > 1 |
255 link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))), | 266 link_to_remote(l(:text_zoom_out) + image_tag('zoom_out.png', img_attributes.merge(:alt => l(:text_zoom_out))), |
256 {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :update => 'content'}, | 267 {:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :method => :get, :update => 'content'}, |
257 {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))}) | 268 {:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1)))}) |
258 else | 269 else |
259 l(:text_zoom_out) + | 270 l(:text_zoom_out) + |
260 image_tag('zoom_out_g.png', img_attributes.merge(:alt => l(:text_zoom_out))) | 271 image_tag('zoom_out_g.png', img_attributes.merge(:alt => l(:text_zoom_out))) |
261 end | 272 end |