Sha256: b5bf89f11b837627585cec8e2d93412066a75ce14bebceede21c8fc2c67f28c4

Contents?: true

Size: 824 Bytes

Versions: 4

Compression:

Stored size: 824 Bytes

Contents

module Cms
  module DynamicViewHelper
    def view_content_button_css_class     
      additional_selector = nil

      case @controller.action_name
      when 'version', 'show'
        additional_selector = ' off'
      else
        additional_selector = ' disabled'
      end

      default_button_selector(additional_selector)
    end
    
    def versions_button_css_class
      additional_selector = nil

      case @controller.action_name
      when 'versions'
        additional_selector = ' off'
      when 'version', 'show'
        additional_selector = ''
      else
        additional_selector = ' disabled'
      end

      default_button_selector(additional_selector)
    end
    
    private
    
      def default_button_selector(additional_selector)
        "button#{additional_selector}"
      end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webficient-browsercms-3.0.1 app/helpers/cms/dynamic_view_helper.rb
webficient-browsercms-3.0.2 app/helpers/cms/dynamic_view_helper.rb
webficient-browsercms-3.0.3 app/helpers/cms/dynamic_view_helper.rb
webficient-browsercms-3.0.4 app/helpers/cms/dynamic_view_helper.rb