Sha256: e461a9da16add4125d29e61d913e6a6630f8927ac18cf3f3dec64156554d794a

Contents?: true

Size: 1.29 KB

Versions: 26

Compression:

Stored size: 1.29 KB

Contents

- content_for :head do
  = render '/locomotive/theme_assets/picker'

- content_for :backbone_view_data do
  :plain
    theme_asset: #{escape_json @theme_asset.persisted? ? @theme_asset.to_json.html_safe : 'null'}

= f.hidden_field :performing_plain_text

#file-selector{ class: "selector #{'hidden' if display_plain_text?(@theme_asset)}" }
  = f.inputs name: :information do
    = f.input :source

  - if allow_plain_text_editing?(@theme_asset)
    = link_to '#', class: 'alt' do
      %i.icon-share
      = t('locomotive.theme_assets.form.choose_plain_text')

- if allow_plain_text_editing?(@theme_asset)
  #text-selector{ class: "selector #{'hidden' unless display_plain_text?(@theme_asset)}", style: "#{'display: none' unless display_plain_text?(@theme_asset)}" }
    = f.inputs name: :code, class: 'inputs code' do

      - if @theme_asset.new_record?
        = f.input :plain_text_name

        = f.input :plain_text_type, as: 'select', collection: %w(stylesheet javascript), include_blank: false

      = f.input :plain_text, as: :'Locomotive::Code', type: plain_text_type(@theme_asset)

    = link_to '#', class: 'alt' do
      %i.icon-share
      = t('locomotive.theme_assets.form.choose_file')

= f.inputs name: :options, class: "inputs foldable #{'folded' if inputs_folded?(@theme_asset)}" do
  = f.input :folder

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.2.0 app/views/locomotive/theme_assets/_form.html.haml
locomotive_cms-2.1.4 app/views/locomotive/theme_assets/_form.html.haml
locomotive_cms-2.1.3 app/views/locomotive/theme_assets/_form.html.haml
locomotive_cms-2.1.2 app/views/locomotive/theme_assets/_form.html.haml
locomotive_cms-2.1.1 app/views/locomotive/theme_assets/_form.html.haml
locomotive_cms-2.1.0 app/views/locomotive/theme_assets/_form.html.haml