Module: Thredded::NavHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/thredded/nav_helper.rb
Constant Summary collapse
- USER_NAV_MODERATION_PAGES =
Set.new( %w[ thredded--pending-moderation thredded--moderation-activity thredded--moderation-history thredded--moderation-users thredded--moderation-user ] )
- USER_NAV_PREFERENCES_PAGES =
Set.new( %w[ thredded--preferences ] )
- USER_NAV_PRIVATE_TOPICS_PAGES =
Set.new( %w[ thredded--new-private-topic thredded--private-topics-index thredded--private-topic-show ] )
- USER_NAV_UNREAD_TOPICS =
Set.new( %w[thredded--unread-topics] )
Instance Method Summary collapse
- #current_page_moderation? ⇒ Boolean
- #current_page_preferences? ⇒ Boolean
- #current_page_private_topics? ⇒ Boolean
- #current_page_unread_topics? ⇒ Boolean
- #nav_back_path(messageboard = nil) ⇒ Object
Instance Method Details
#current_page_moderation? ⇒ Boolean
42 43 44 |
# File 'app/helpers/thredded/nav_helper.rb', line 42 def current_page_moderation? USER_NAV_MODERATION_PAGES.include?(content_for(:thredded_page_id)) end |
#current_page_preferences? ⇒ Boolean
38 39 40 |
# File 'app/helpers/thredded/nav_helper.rb', line 38 def current_page_preferences? USER_NAV_PREFERENCES_PAGES.include?(content_for(:thredded_page_id)) end |
#current_page_private_topics? ⇒ Boolean
46 47 48 |
# File 'app/helpers/thredded/nav_helper.rb', line 46 def current_page_private_topics? USER_NAV_PRIVATE_TOPICS_PAGES.include?(content_for(:thredded_page_id)) end |
#current_page_unread_topics? ⇒ Boolean
34 35 36 |
# File 'app/helpers/thredded/nav_helper.rb', line 34 def current_page_unread_topics? USER_NAV_UNREAD_TOPICS.include?(content_for(:thredded_page_id)) end |
#nav_back_path(messageboard = nil) ⇒ Object
50 51 52 |
# File 'app/helpers/thredded/nav_helper.rb', line 50 def nav_back_path( = nil) ? () : end |