Sha256: d5b5138b80a76c5683edbde907dffdb3104f659f59deb71e7072431d3506e6d4
Contents?: true
Size: 970 Bytes
Versions: 19
Compression:
Stored size: 970 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
19 entries across 19 versions & 2 rubygems