Merge pull request #357 from opf/feature/rails3_remove_issue_links

pull/356/merge
Hagen Schink 11 years ago
commit 0a1a1186f8
  1. 6
      app/helpers/application_helper.rb
  2. 2
      app/helpers/issues_helper.rb
  3. 2
      app/helpers/timelog_helper.rb
  4. 2
      app/views/common/_calendar.html.erb
  5. 2
      app/views/issues/_relation.html.erb
  6. 2
      app/views/my/blocks/_timelog.html.erb
  7. 2
      app/views/timelog/_list.html.erb
  8. 2
      app/views/work_packages/_relation.html.erb

@ -114,12 +114,6 @@ module ApplicationHelper
l(('status_' + user.status_name).to_sym)
end
def link_to_issue(issue, options={})
warn "[DEPRECATION] link_to_issue will be removed - use link_to_work_package instead.\n" +
"Called from: #{caller[0]}"
link_to_work_package(issue, options)
end
# Generates a link to an attachment.
# Options:
# * :text - Link text (default to attachment filename)

@ -41,7 +41,7 @@ module IssuesHelper
@cached_label_priority ||= Issue.human_attribute_name(:priority)
@cached_label_project ||= Issue.human_attribute_name(:project)
(link_to_issue(issue) + "<br /><br />
(link_to_work_package(issue) + "<br /><br />
<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />
<strong>#{@cached_label_status}</strong>: #{h(issue.status.name)}<br />
<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />

@ -19,7 +19,7 @@ module TimelogHelper
links << link_to(h(@project), {:project_id => @project, :work_package_id => nil}) if @project
if @issue
if @issue.visible?
links << link_to_issue(@issue, :subject => false)
links << link_to_work_package(@issue, :subject => false)
else
links << "##{@issue.id}".html_safe
end

@ -37,7 +37,7 @@ while day <= calendar.enddt %>
:class => "imgtag-icon") %>
<% end %>
<%= link_to_issue i, :truncate => 30, :before_text => date_img %>
<%= link_to_work_package i, :truncate => 30, :before_text => date_img %>
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>

@ -14,7 +14,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td>
<%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
<%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>
<%= link_to_issue(relation.other_issue(@issue), :truncate => 60) %>
<%= link_to_work_package(relation.other_issue(@issue), :truncate => 60) %>
</td>
<% if not relation.other_issue(@issue).kind.nil? %>
<td>

@ -43,7 +43,7 @@ entries_by_day = entries.group_by(&:spent_on)
<% entries_by_day[day].each do |entry| -%>
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
<td class="activity"><%=h entry.activity %></td>
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_issue(entry.work_package, :truncate => 50) if entry.work_package%></td>
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, :truncate => 50) if entry.work_package%></td>
<td class="comments"><%=h entry.comments %></td>
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
<td align="center">

@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td class="project"><%= link_to_project(entry.project) %></td>
<td class="subject">
<% if entry.work_package -%>
<%= entry.work_package.visible? ? link_to_issue(entry.work_package, :truncate => 50) : "##{entry.work_package.id}" -%>
<%= entry.work_package.visible? ? link_to_work_package(entry.work_package, :truncate => 50) : "##{entry.work_package.id}" -%>
<% end -%>
</td>
<td class="comments"><%=h entry.comments %></td>

@ -14,7 +14,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td>
<%= l(relation.label_for(work_package)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
<%= h(relation.other_issue(work_package).project) + ' - ' if Setting.cross_project_issue_relations? %>
<%= link_to_issue(relation.other_issue(work_package), :truncate => 60) %>
<%= link_to_work_package(relation.other_issue(work_package), :truncate => 60) %>
</td>
<% unless relation.other_issue(work_package).type.is_standard %>
<td>

Loading…
Cancel
Save