Sha256: 198e5f753b37c173c4f098924b4636608afb97f10f804db24d1143bbb2a9dc06

Contents?: true

Size: 589 Bytes

Versions: 47

Compression:

Stored size: 589 Bytes

Contents

module Pageflow
  module NavigationBarHelper
    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

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

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
pageflow-17.0.4 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-17.0.3 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-17.0.2 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-17.0.1 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-17.0.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-16.2.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-16.1.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-16.0.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.8.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-14.5.2 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.7.1 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.7.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.6.1 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.6.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.5.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.4.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.3.0 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.2.2 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.2.1 app/helpers/pageflow/navigation_bar_helper.rb
pageflow-15.2.0 app/helpers/pageflow/navigation_bar_helper.rb