Module: Redmine::QuoteReply::Helper

Included in:
JournalsHelper, MessagesHelper
Defined in:
lib/redmine/quote_reply.rb

Instance Method Summary collapse

Instance Method Details

#quote_reply_button(url:, icon_only: false) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/redmine/quote_reply.rb', line 23

def quote_reply_button(url:, icon_only: false)
  button_params = {
    data: {
      action: 'quote-reply#quote',
      quote_reply_url_param: url,
      quote_reply_text_formatting_param: Setting.text_formatting
    },
    class: "#{icon_only ? "icon-only" : "icon"} icon-quote"
  }
  button_params[:title] = l(:button_quote) if icon_only

  link_to sprite_icon('quote-filled', l(:button_quote), icon_only: icon_only, style: :filled), '#', button_params
end