Sha256: 549828ba94bc0746b8113cd63cf7a88093167078d26c885e34def3722953421d

Contents?: true

Size: 646 Bytes

Versions: 15

Compression:

Stored size: 646 Bytes

Contents

module Locomotive
  module Liquid
    module Tags
      module Editable
        class Control < Base

          protected

          def default_element_attributes
            if @nodelist.first.is_a?(String)
              super.merge(:content => @nodelist.first.try(:to_s), :options => @options[:options])
            else
              super
            end
          end

          def render_element(context, element)
            element.content
          end

          def document_type
            EditableControl
          end

        end

        ::Liquid::Template.register_tag('editable_control', Control)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
locomotive_cms-2.0.3 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.2 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.1 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0 lib/locomotive/liquid/tags/editable/control.rb
tribeca_cms-0.1.1 lib/locomotive/liquid/tags/editable/control.rb
tribeca_cms-2.0.0.rc12 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc12 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc11 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc10 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc9 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc8 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc7 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc6 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc5 lib/locomotive/liquid/tags/editable/control.rb
locomotive_cms-2.0.0.rc4 lib/locomotive/liquid/tags/editable/control.rb