Module: Pageflow::NavigationBarHelper

Defined in:
app/helpers/pageflow/navigation_bar_helper.rb

Instance Method Summary collapse

Instance Method Details

#mobile_share_providers_only?(entry) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/helpers/pageflow/navigation_bar_helper.rb', line 13

def mobile_share_providers_only?(entry)
  entry.active_share_providers.sort.eql?(%w[telegram whats_app].sort)
end


3
4
5
6
7
8
9
10
11
# File 'app/helpers/pageflow/navigation_bar_helper.rb', line 3

def navigation_bar_css_class(entry, options = {})
  [
    options[:class],
    entry.home_button.enabled? ? 'with_home_button' : nil,
    entry.overview_button.enabled? ? 'with_overview_button' : nil,
    entry.active_share_providers.empty? ? 'without_sharing_button' : nil,
    mobile_share_providers_only?(entry) ? 'mobile_sharing_only' : nil
  ].compact.join(' ')
end