Module: MyForum::PrivateMessagesHelper
- Defined in:
- app/helpers/my_forum/private_messages_helper.rb
Instance Method Summary collapse
Instance Method Details
#new_pm_button ⇒ Object
4 5 6 7 8 9 |
# File 'app/helpers/my_forum/private_messages_helper.rb', line 4 def return unless current_user content_tag :div, class: 'new_pm_button' do link_to t('my_forum.create_new_pm'), , class: 'btn btn-primary' end end |
#new_private_messages_count_bage ⇒ Object
18 19 20 21 22 |
# File 'app/helpers/my_forum/private_messages_helper.rb', line 18 def return unless current_user return if (count = new_pm_count).eql?(0) content_tag(:span, count, class: 'new-pm badge') end |
#reply_pm_button(pm) ⇒ Object
11 12 13 14 15 16 |
# File 'app/helpers/my_forum/private_messages_helper.rb', line 11 def (pm) return unless current_user content_tag :div, class: 'reply_pm_button' do link_to t('my_forum.reply_for_pm'), (reply: true, reply_for_id: pm.id), class: 'btn btn-primary' end end |