##// END OF EJS Templates
Adds a helper for issue heading (#7647)....
Jean-Philippe Lang -
r5327:1cd4f5b353f0
parent child
Show More
@@ -54,6 +54,10 module IssuesHelper
54 "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" +
54 "<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" +
55 "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
55 "<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
56 end
56 end
57
58 def issue_heading(issue)
59 h("#{issue.tracker} ##{issue.id}")
60 end
57
61
58 def render_issue_subject_with_tree(issue)
62 def render_issue_subject_with_tree(issue)
59 s = ''
63 s = ''
@@ -1,6 +1,6
1 <%= render :partial => 'action_menu' %>
1 <%= render :partial => 'action_menu' %>
2
2
3 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
3 <h2><%= issue_heading(@issue) %></h2>
4
4
5 <div class="<%= @issue.css_classes %> details">
5 <div class="<%= @issue.css_classes %> details">
6 <%= avatar(@issue.author, :size => "50") %>
6 <%= avatar(@issue.author, :size => "50") %>
@@ -1,5 +1,5
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2010 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
@@ -43,6 +43,10 class IssuesHelperTest < HelperTestCase
43 def request
43 def request
44 @request ||= ActionController::TestRequest.new
44 @request ||= ActionController::TestRequest.new
45 end
45 end
46
47 def test_issue_heading
48 assert_equal "Bug #1", issue_heading(Issue.find(1))
49 end
46
50
47 context "IssuesHelper#show_detail" do
51 context "IssuesHelper#show_detail" do
48 context "with no_html" do
52 context "with no_html" do
General Comments 0
You need to be logged in to leave comments. Login now