summaryrefslogtreecommitdiffstats
path: root/app/helpers/journals_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 17:14:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 17:14:47 +0000
commit0e2931fff20021515b1900a52b994eff630ed8a2 (patch)
tree3e7d03475444bda1ba5f389877f536ce6ce0e8ea /app/helpers/journals_helper.rb
parentccba924df9eb4b2bb0582ea97a0bbdc075443092 (diff)
downloadredmine-0e2931fff20021515b1900a52b994eff630ed8a2.tar.gz
redmine-0e2931fff20021515b1900a52b994eff630ed8a2.zip
Move journal action links above the notes.
git-svn-id: http://svn.redmine.org/redmine/trunk@16900 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/journals_helper.rb')
-rw-r--r--app/helpers/journals_helper.rb31
1 files changed, 16 insertions, 15 deletions
diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb
index b1d8774c4..5e817e862 100644
--- a/app/helpers/journals_helper.rb
+++ b/app/helpers/journals_helper.rb
@@ -25,19 +25,19 @@ module JournalsHelper
ids.any? ? Attachment.where(:id => ids).select(&:thumbnailable?) : []
end
- def render_notes(issue, journal, options={})
- content = ''
- css_classes = "wiki"
+ # Returns the action links for an issue journal
+ def render_journal_actions(issue, journal, options={})
links = []
if journal.notes.present?
- links << link_to(l(:button_quote),
- quoted_issue_path(issue, :journal_id => journal),
- :remote => true,
- :method => 'post',
- :title => l(:button_quote),
- :class => 'icon-only icon-comment'
- ) if options[:reply_links]
-
+ if options[:reply_links]
+ links << link_to(l(:button_quote),
+ quoted_issue_path(issue, :journal_id => journal),
+ :remote => true,
+ :method => 'post',
+ :title => l(:button_quote),
+ :class => 'icon-only icon-comment'
+ )
+ end
if journal.editable_by?(User.current)
links << link_to(l(:button_edit),
edit_journal_path(journal),
@@ -53,12 +53,13 @@ module JournalsHelper
:title => l(:button_delete),
:class => 'icon-only icon-del'
)
- css_classes << " editable"
end
end
- content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
- content << textilizable(journal, :notes)
- content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes)
+ safe_join(links, ' ')
+ end
+
+ def render_notes(issue, journal, options={})
+ content_tag('div', textilizable(journal, :notes), :id => "journal-#{journal.id}-notes", :class => "wiki")
end
def render_private_notes_indicator(journal)