Sha256: da6f48639fab1da61b2d7eef88ecb1a47182bd020e4df94fe73a99ee27bcaf52

Contents?: true

Size: 715 Bytes

Versions: 23

Compression:

Stored size: 715 Bytes

Contents

module MyForum
  module PrivateMessagesHelper

    def new_pm_button
      return unless current_user
      content_tag :div, class: 'new_pm_button' do
        link_to t('my_forum.create_new_pm'), new_private_message_path, class: 'btn btn-primary'
      end
    end

    def reply_pm_button(pm)
      return unless current_user
      content_tag :div, class: 'reply_pm_button' do
        link_to t('my_forum.reply_for_pm'), new_private_message_path(reply: true, reply_for_id: pm.id), class: 'btn btn-primary'
      end
    end

    def new_private_messages_count_bage
      return unless current_user
      return if (count = new_pm_count).eql?(0)
      content_tag(:span, count, class: 'badge')
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta25 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta24 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta23 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta22 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta21 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta20 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta19 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta18 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta17 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta16 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta15 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta14 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta13 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta12 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta11 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta10 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta9 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta8 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta7 app/helpers/my_forum/private_messages_helper.rb
my_forum-0.0.1.beta5 app/helpers/my_forum/private_messages_helper.rb