Sha256: 88c29e2eac03b95ee788d72009ab38d1ebe4636e48bc3154d32e4e43609038ea

Contents?: true

Size: 384 Bytes

Versions: 12

Compression:

Stored size: 384 Bytes

Contents

module Kuhsaft
  module Cms
    module PagesHelper
      def content_tab_active(page)
        :active unless hide_content_tab?(page)
      end

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

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

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
qbrick-2.5.0.pre app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.4.3 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.4.2 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.4.1 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.4.0 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.6 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.5 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.4 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.3 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.2 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.1 app/helpers/kuhsaft/cms/pages_helper.rb
kuhsaft-2.3.0 app/helpers/kuhsaft/cms/pages_helper.rb