Sha256: e0b37546b7315b14b1d3e006c598bce2862df94e6528c9c9e13f1bc4fad1a78c
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
/ Example: / = wcms_component "forms/presentation_data_editor", / form: f, / schema: @generic_object.presentation_data_template.schema, / presentation_data: @generic_object.presentation_data / ruby: if form ||= nil schema ||= form.object.presentation_data_template.try(:schema) presentation_data ||= form.object.presentation_data end schema ||= [] presentation_data ||= {} embedded_image_url ||= wcms_components_embedded_images_url = wcms_component "shared/embedded_image_uploader", embedded_image_url: embedded_image_url / Link to toggle between simple and advanced editors - if current_user.try(:admin?) - if params[:edit_raw_data] == 'true' = link_to('Simple Editor', params.merge(edit_raw_data: nil), class: 'pull-right') - else = link_to('Edit Raw Data', params.merge(edit_raw_data: true), class: 'pull-right') .clearfix - if params[:edit_raw_data] == 'true' && current_user.try(:admin?) / Render JSON editor = wcms_component 'forms/json_editor', form: form, attribute: :presentation_data_json - else / Render HTML for presentation data editor = PresentationDataEditor.new(self, presentation_data, schema, form).render
Version data entries
16 entries across 16 versions & 1 rubygems