summaryrefslogtreecommitdiffstats
path: root/app/helpers/journals_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-30 17:42:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-30 17:42:25 +0000
commit5d2abb84bdcb8724e5d24a5299bb90f0770f6c23 (patch)
tree9c0616c2916434d808a461fe0bbef2f7e29ce6f5 /app/helpers/journals_helper.rb
parent88dea1a06d833067e5a6d9668c4b6829e027a9f5 (diff)
downloadredmine-5d2abb84bdcb8724e5d24a5299bb90f0770f6c23.tar.gz
redmine-5d2abb84bdcb8724e5d24a5299bb90f0770f6c23.zip
Adds a Reply link to each issue note (#739). Reply is pre-filled with the quoted note.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1480 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/journals_helper.rb')
-rw-r--r--app/helpers/journals_helper.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb
index 234bfabc0..92d6e5593 100644
--- a/app/helpers/journals_helper.rb
+++ b/app/helpers/journals_helper.rb
@@ -19,13 +19,16 @@ module JournalsHelper
def render_notes(journal, options={})
content = ''
editable = journal.editable_by?(User.current)
- if editable && !journal.notes.blank?
- links = []
+ links = []
+ if !journal.notes.blank?
links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
{ :controller => 'journals', :action => 'edit', :id => journal },
- :title => l(:button_edit))
- content << content_tag('div', links.join(' '), :class => 'contextual')
+ :title => l(:button_edit)) if editable
+ links << link_to_remote(image_tag('comment.png'),
+ { :url => {:controller => 'issues', :action => 'reply', :id => journal.journalized, :journal_id => journal} },
+ :title => l(:button_reply)) if options[:reply_links]
end
+ content << content_tag('div', links.join(' '), :class => 'contextual') unless links.empty?
content << textilizable(journal, :notes)
content_tag('div', content, :id => "journal-#{journal.id}-notes", :class => (editable ? 'wiki editable' : 'wiki'))
end