Sha256: 6b982f943151e8267e345d014b00edeee1a648342b8904aac33073c6999cb90d

Contents?: true

Size: 1.67 KB

Versions: 28

Compression:

Stored size: 1.67 KB

Contents

.editable-elements

  - each_editable_element(@blocks, @editable_elements_by_block) do |page, editable_element, index|

    = f.inputs :editable_element do

      = f.simple_fields_for :editable_elements, editable_element, child_index: index do |g|

        = g.hidden_field :_id

        = g.hidden_field :page_id

        - case editable_element.type.to_sym

        - when :editable_text
          = g.input :content, editable_element_input_options(editable_element, index, as: editable_text_format_to_input_type(editable_element), input_html: { rows: editable_element.rows, data: { inline: editable_element.inline? } })

        - when :editable_file
          = g.input :source, editable_element_input_options(editable_element, index, as: :file, select_content_asset: true, resize_format: editable_element.resize_format, hidden_fields: [:content, :default_source_url])

        - when :editable_control
          = g.input :content, editable_element_input_options(editable_element, index, as: :select, collection: (editable_element.options || []).map { |attributes| [attributes['text'], attributes['value']] })

        - when :editable_model
          - if editable_element.content_type?
            fieldset.inputs
              .form-group.input.link.optional data-block=editable_element.block
                label.link.control-label.optional= editable_element_label(editable_element)
                - if editable_element.hint.present?
                  span class="help-inline"= editable_element.hint
                span.form_wrapper
                  = link_to t('.model.buttons.list'), content_entries_path(current_site, editable_element.content_type.slug), class: 'btn btn-primary btn-sm'

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.2.0.alpha1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.1.1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.1.0 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.1.0.rc1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.3 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.2 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.0 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.0.rc0 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.0.alpha3 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.4.1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.0.alpha2 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-4.0.0.alpha1 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.4.0 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.3.0 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.3.0.rc3 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.3.0.rc2 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.1.2 app/views/locomotive/editable_elements/_form.html.slim
locomotivecms-3.2.1 app/views/locomotive/editable_elements/_form.html.slim