engine/app/views/locomotive/theme_assets/_form.html.haml

30 lines
1.1 KiB
Plaintext

- content_for :head do
/ = include_javascripts :image_picker, :theme_assets
/ = include_stylesheets :fancybox
= 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)
%span.alt
!= 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)
= f.input :plain_text, :as => :'Locomotive::Code', :type => plain_text_type(@theme_asset)
%span.alt
!= t('locomotive.theme_assets.form.choose_file')
= f.inputs :name => :options, :class => "inputs foldable #{'folded' if inputs_folded?(@asset)}" do
= f.input :folder