@@ -34,6 +34,7 class ProjectsController < ApplicationController | |||||
34 | include CustomFieldsHelper |
|
34 | include CustomFieldsHelper | |
35 | helper :ifpdf |
|
35 | helper :ifpdf | |
36 | include IfpdfHelper |
|
36 | include IfpdfHelper | |
|
37 | helper :issues | |||
37 | helper IssuesHelper |
|
38 | helper IssuesHelper | |
38 | helper :queries |
|
39 | helper :queries | |
39 | include QueriesHelper |
|
40 | include QueriesHelper |
@@ -21,6 +21,7 class TimelogController < ApplicationController | |||||
21 |
|
21 | |||
22 | helper :sort |
|
22 | helper :sort | |
23 | include SortHelper |
|
23 | include SortHelper | |
|
24 | helper :issues | |||
24 |
|
25 | |||
25 | def report |
|
26 | def report | |
26 | @available_criterias = { 'version' => {:sql => "#{Issue.table_name}.fixed_version_id", |
|
27 | @available_criterias = { 'version' => {:sql => "#{Issue.table_name}.fixed_version_id", |
@@ -70,8 +70,8 module ApplicationHelper | |||||
70 |
|
70 | |||
71 | def format_date(date) |
|
71 | def format_date(date) | |
72 | return nil unless date |
|
72 | return nil unless date | |
73 | @date_format_setting ||= Setting.date_format.to_i |
|
73 | @date_format ||= (Setting.date_format.to_i == 0 ? l(:general_fmt_date) : date.strftime("%Y-%m-%d")) | |
74 | @date_format_setting == 0 ? l_date(date) : date.strftime("%Y-%m-%d") |
|
74 | date.strftime(@date_format) | |
75 | end |
|
75 | end | |
76 |
|
76 | |||
77 | def format_time(time) |
|
77 | def format_time(time) |
@@ -17,6 +17,19 | |||||
17 |
|
17 | |||
18 | module IssuesHelper |
|
18 | module IssuesHelper | |
19 |
|
19 | |||
|
20 | def render_issue_tooltip(issue) | |||
|
21 | @cached_label_start_date ||= l(:field_start_date) | |||
|
22 | @cached_label_due_date ||= l(:field_due_date) | |||
|
23 | @cached_label_assigned_to ||= l(:field_assigned_to) | |||
|
24 | @cached_label_priority ||= l(:field_priority) | |||
|
25 | ||||
|
26 | link_to_issue(issue) + ": #{h(issue.subject)}<br /><br />" + | |||
|
27 | "<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />" + | |||
|
28 | "<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />" + | |||
|
29 | "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" + | |||
|
30 | "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}" | |||
|
31 | end | |||
|
32 | ||||
20 | def show_detail(detail, no_html=false) |
|
33 | def show_detail(detail, no_html=false) | |
21 | case detail.property |
|
34 | case detail.property | |
22 | when 'attr' |
|
35 | when 'attr' |
@@ -49,7 +49,7 while day <= @date_to | |||||
49 | <%= h(truncate(i.subject, 30)) %> |
|
49 | <%= h(truncate(i.subject, 30)) %> | |
50 | </small> |
|
50 | </small> | |
51 | <span class="tip"> |
|
51 | <span class="tip"> | |
52 |
<%= render |
|
52 | <%= render_issue_tooltip i %> | |
53 | </span> |
|
53 | </span> | |
54 | </div> |
|
54 | </div> | |
55 | <% else %> |
|
55 | <% else %> |
@@ -192,7 +192,7 top = headers_height + 10 | |||||
192 | <% # === tooltip === %> |
|
192 | <% # === tooltip === %> | |
193 | <div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;"> |
|
193 | <div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;"> | |
194 | <span class="tip"> |
|
194 | <span class="tip"> | |
195 | <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> |
|
195 | <%= render_issue_tooltip i %> | |
196 | </span></div> |
|
196 | </span></div> | |
197 | <% else |
|
197 | <% else | |
198 | i_left = ((i.start_date - @date_from)*zoom).floor |
|
198 | i_left = ((i.start_date - @date_from)*zoom).floor |
@@ -29,9 +29,9 | |||||
29 | <td align="center"> |
|
29 | <td align="center"> | |
30 | <% if entry.issue %> |
|
30 | <% if entry.issue %> | |
31 | <div class="tooltip"> |
|
31 | <div class="tooltip"> | |
32 | <%= link_to "#{entry.issue.tracker.name} ##{entry.issue.id}", {:action => 'details', :issue_id => entry.issue } %> |
|
32 | <%= link_to_issue entry.issue %> | |
33 | <span class="tip"> |
|
33 | <span class="tip"> | |
34 |
<%= render |
|
34 | <%= render_issue_tooltip entry.issue %> | |
35 | </span> |
|
35 | </span> | |
36 | </div> |
|
36 | </div> | |
37 | <% end %> |
|
37 | <% end %> |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now