Adds a helper for issue heading (#7647).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5447 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6968d0da19
commit
1cd4f5b353
|
@ -54,6 +54,10 @@ module IssuesHelper
|
|||
"<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" +
|
||||
"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
|
||||
end
|
||||
|
||||
def issue_heading(issue)
|
||||
h("#{issue.tracker} ##{issue.id}")
|
||||
end
|
||||
|
||||
def render_issue_subject_with_tree(issue)
|
||||
s = ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
|
||||
<h2><%= issue_heading(@issue) %></h2>
|
||||
|
||||
<div class="<%= @issue.css_classes %> details">
|
||||
<%= avatar(@issue.author, :size => "50") %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2010 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -43,6 +43,10 @@ class IssuesHelperTest < HelperTestCase
|
|||
def request
|
||||
@request ||= ActionController::TestRequest.new
|
||||
end
|
||||
|
||||
def test_issue_heading
|
||||
assert_equal "Bug #1", issue_heading(Issue.find(1))
|
||||
end
|
||||
|
||||
context "IssuesHelper#show_detail" do
|
||||
context "with no_html" do
|
||||
|
|
Loading…
Reference in New Issue