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
@ -55,6 +55,10 @@ module IssuesHelper
|
|||||||
"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
|
"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def issue_heading(issue)
|
||||||
|
h("#{issue.tracker} ##{issue.id}")
|
||||||
|
end
|
||||||
|
|
||||||
def render_issue_subject_with_tree(issue)
|
def render_issue_subject_with_tree(issue)
|
||||||
s = ''
|
s = ''
|
||||||
ancestors = issue.root? ? [] : issue.ancestors.all
|
ancestors = issue.root? ? [] : issue.ancestors.all
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<%= render :partial => 'action_menu' %>
|
<%= render :partial => 'action_menu' %>
|
||||||
|
|
||||||
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
|
<h2><%= issue_heading(@issue) %></h2>
|
||||||
|
|
||||||
<div class="<%= @issue.css_classes %> details">
|
<div class="<%= @issue.css_classes %> details">
|
||||||
<%= avatar(@issue.author, :size => "50") %>
|
<%= avatar(@issue.author, :size => "50") %>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Redmine - project management software
|
# 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
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@ -44,6 +44,10 @@ class IssuesHelperTest < HelperTestCase
|
|||||||
@request ||= ActionController::TestRequest.new
|
@request ||= ActionController::TestRequest.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_issue_heading
|
||||||
|
assert_equal "Bug #1", issue_heading(Issue.find(1))
|
||||||
|
end
|
||||||
|
|
||||||
context "IssuesHelper#show_detail" do
|
context "IssuesHelper#show_detail" do
|
||||||
context "with no_html" do
|
context "with no_html" do
|
||||||
should 'show a changing attribute' do
|
should 'show a changing attribute' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user