@@ -260,9 +260,9 module Redmine | |||||
260 | def subject_for_project(project, options) |
|
260 | def subject_for_project(project, options) | |
261 | case options[:format] |
|
261 | case options[:format] | |
262 | when :html |
|
262 | when :html | |
263 | subject = "<span class='icon icon-projects #{project.overdue? ? 'project-overdue' : ''}'>" |
|
263 | subject = "<span class='icon icon-projects #{project.overdue? ? 'project-overdue' : ''}'>".html_safe | |
264 | subject << view.link_to_project(project) |
|
264 | subject << view.link_to_project(project).html_safe | |
265 | subject << '</span>' |
|
265 | subject << '</span>'.html_safe | |
266 | html_subject(options, subject, :css => "project-name") |
|
266 | html_subject(options, subject, :css => "project-name") | |
267 | when :image |
|
267 | when :image | |
268 | image_subject(options, project.name) |
|
268 | image_subject(options, project.name) | |
@@ -298,9 +298,9 module Redmine | |||||
298 | def subject_for_version(version, options) |
|
298 | def subject_for_version(version, options) | |
299 | case options[:format] |
|
299 | case options[:format] | |
300 | when :html |
|
300 | when :html | |
301 | subject = "<span class='icon icon-package #{version.behind_schedule? ? 'version-behind-schedule' : ''} #{version.overdue? ? 'version-overdue' : ''}'>" |
|
301 | subject = "<span class='icon icon-package #{version.behind_schedule? ? 'version-behind-schedule' : ''} #{version.overdue? ? 'version-overdue' : ''}'>".html_safe | |
302 | subject << view.link_to_version(version) |
|
302 | subject << view.link_to_version(version).html_safe | |
303 | subject << '</span>' |
|
303 | subject << '</span>'.html_safe | |
304 | html_subject(options, subject, :css => "version-name") |
|
304 | html_subject(options, subject, :css => "version-name") | |
305 | when :image |
|
305 | when :image | |
306 | image_subject(options, version.to_s_with_project) |
|
306 | image_subject(options, version.to_s_with_project) | |
@@ -347,13 +347,13 module Redmine | |||||
347 | css_classes << ' issue-behind-schedule' if issue.behind_schedule? |
|
347 | css_classes << ' issue-behind-schedule' if issue.behind_schedule? | |
348 | css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to |
|
348 | css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to | |
349 |
|
349 | |||
350 | subject = "<span class='#{css_classes}'>" |
|
350 | subject = "<span class='#{css_classes}'>".html_safe | |
351 | if issue.assigned_to.present? |
|
351 | if issue.assigned_to.present? | |
352 | assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name |
|
352 | assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name | |
353 | subject << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string).to_s |
|
353 | subject << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string).to_s.html_safe | |
354 | end |
|
354 | end | |
355 | subject << view.link_to_issue(issue) |
|
355 | subject << view.link_to_issue(issue).html_safe | |
356 | subject << '</span>' |
|
356 | subject << '</span>'.html_safe | |
357 | html_subject(options, subject, :css => "issue-subject", :title => issue.subject) + "\n" |
|
357 | html_subject(options, subject, :css => "issue-subject", :title => issue.subject) + "\n" | |
358 | when :image |
|
358 | when :image | |
359 | image_subject(options, issue.subject) |
|
359 | image_subject(options, issue.subject) | |
@@ -737,36 +737,36 module Redmine | |||||
737 | output = '' |
|
737 | output = '' | |
738 | # Renders the task bar, with progress and late |
|
738 | # Renders the task bar, with progress and late | |
739 | if coords[:bar_start] && coords[:bar_end] |
|
739 | if coords[:bar_start] && coords[:bar_end] | |
740 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_todo'> </div>" |
|
740 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_todo'> </div>".html_safe | |
741 |
|
741 | |||
742 | if coords[:bar_late_end] |
|
742 | if coords[:bar_late_end] | |
743 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_late_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_late'> </div>" |
|
743 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_late_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_late'> </div>".html_safe | |
744 | end |
|
744 | end | |
745 | if coords[:bar_progress_end] |
|
745 | if coords[:bar_progress_end] | |
746 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_progress_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_done'> </div>" |
|
746 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_progress_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_done'> </div>".html_safe | |
747 | end |
|
747 | end | |
748 | end |
|
748 | end | |
749 | # Renders the markers |
|
749 | # Renders the markers | |
750 | if options[:markers] |
|
750 | if options[:markers] | |
751 | if coords[:start] |
|
751 | if coords[:start] | |
752 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:start] }px;width:15px;' class='#{options[:css]} marker starting'> </div>" |
|
752 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:start] }px;width:15px;' class='#{options[:css]} marker starting'> </div>".html_safe | |
753 | end |
|
753 | end | |
754 | if coords[:end] |
|
754 | if coords[:end] | |
755 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:end] + params[:zoom] }px;width:15px;' class='#{options[:css]} marker ending'> </div>" |
|
755 | output << "<div style='top:#{ params[:top] }px;left:#{ coords[:end] + params[:zoom] }px;width:15px;' class='#{options[:css]} marker ending'> </div>".html_safe | |
756 | end |
|
756 | end | |
757 | end |
|
757 | end | |
758 | # Renders the label on the right |
|
758 | # Renders the label on the right | |
759 | if options[:label] |
|
759 | if options[:label] | |
760 | output << "<div style='top:#{ params[:top] }px;left:#{ (coords[:bar_end] || 0) + 8 }px;' class='#{options[:css]} label'>" |
|
760 | output << "<div style='top:#{ params[:top] }px;left:#{ (coords[:bar_end] || 0) + 8 }px;' class='#{options[:css]} label'>".html_safe | |
761 | output << options[:label] |
|
761 | output << options[:label] | |
762 | output << "</div>" |
|
762 | output << "</div>".html_safe | |
763 | end |
|
763 | end | |
764 | # Renders the tooltip |
|
764 | # Renders the tooltip | |
765 | if options[:issue] && coords[:bar_start] && coords[:bar_end] |
|
765 | if options[:issue] && coords[:bar_start] && coords[:bar_end] | |
766 | output << "<div class='tooltip' style='position: absolute;top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] }px;height:12px;'>" |
|
766 | output << "<div class='tooltip' style='position: absolute;top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] }px;height:12px;'>".html_safe | |
767 | output << '<span class="tip">' |
|
767 | output << '<span class="tip">'.html_safe | |
768 | output << view.render_issue_tooltip(options[:issue]) |
|
768 | output << view.render_issue_tooltip(options[:issue]).html_safe | |
769 | output << "</span></div>" |
|
769 | output << "</span></div>".html_safe | |
770 | end |
|
770 | end | |
771 | @lines << output |
|
771 | @lines << output | |
772 | output |
|
772 | output |
General Comments 0
You need to be logged in to leave comments.
Login now