Sha256: 4471ad1ba21ee203107da524db8ed08b1887546fda3cd767973ca24927779678
Contents?: true
Size: 1.03 KB
Versions: 5
Compression:
Stored size: 1.03 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: schema ||= [] presentation_data ||= {} form ||= nil 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
5 entries across 5 versions & 1 rubygems