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:
Jean-Philippe Lang 2011-04-12 19:53:14 +00:00
parent 6968d0da19
commit 1cd4f5b353
3 changed files with 10 additions and 2 deletions

View File

@ -55,6 +55,10 @@ module IssuesHelper
"<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 = ''
ancestors = issue.root? ? [] : issue.ancestors.all

View File

@ -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") %>

View File

@ -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
@ -44,6 +44,10 @@ class IssuesHelperTest < HelperTestCase
@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
should 'show a changing attribute' do