Sha256: 8eabf9bbe4e7707e66df9bb3d8a3c468dfb4ce9126dfe7bdaa71620d342ce8c5
Contents?: true
Size: 1.56 KB
Versions: 2
Compression:
Stored size: 1.56 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 }) - 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 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms-3.0.0 | app/views/locomotive/editable_elements/_form.html.slim |
locomotivecms-3.0.0.rc7 | app/views/locomotive/editable_elements/_form.html.slim |