Sha256: 23d6adb76a6cf2478d9573675db05ee8c597b39637619b3c227e79c7f9f8cecf
Contents?: true
Size: 969 Bytes
Versions: 12
Compression:
Stored size: 969 Bytes
Contents
# frozen_string_literal: true require 'set' module Thredded module NavHelper 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 ) ) def current_page_preferences? USER_NAV_PREFERENCES_PAGES.include?(content_for(:thredded_page_id)) end def current_page_moderation? USER_NAV_MODERATION_PAGES.include?(content_for(:thredded_page_id)) end def current_page_private_topics? USER_NAV_PRIVATE_TOPICS_PAGES.include?(content_for(:thredded_page_id)) end end end
Version data entries
12 entries across 12 versions & 1 rubygems