Sha256: 7dca2d436c77b9e6ec75d8d4bfffcb42afcabb477dc41f2d9361723e9a74534f

Contents?: true

Size: 429 Bytes

Versions: 9

Compression:

Stored size: 429 Bytes

Contents

module Kuhsaft
  module Cms
    module PagesHelper

      def content_tab_active(page)
        unless hide_content_tab?(page)
          :active
        end
      end

      def metadata_tab_active(page)
        if hide_content_tab?(page)
          :active
        end
      end

      def hide_content_tab?(page)
        page.redirect? || !page.translated? || !page.persisted? || page.errors.present?
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kuhsaft-2.2.6 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.5 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.4 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.3 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.2 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.1 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.2.0 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.1.2 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.1.1 app/helpers/kuhsaft/cms/pages_helper.rb