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

35 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-05-11 21:38:52 +00:00
- content_for :head do
= include_javascripts :image_picker, :theme_assets
= include_stylesheets :fancybox
2010-05-11 21:38:52 +00:00
= f.hidden_field :performing_plain_text
#file-selector{ :class => "selector #{'hidden' if display_plain_text?(@theme_asset)}" }
2010-05-11 21:38:52 +00:00
= f.inputs :name => :information do
= f.input :source
- if allow_plain_text_editing?(@theme_asset)
2010-05-11 21:38:52 +00:00
%span.alt
!= t('locomotive.theme_assets.form.choose_plain_text')
2010-05-11 21:38:52 +00:00
- 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)}" }
2010-05-11 21:38:52 +00:00
= f.inputs :name => :code, :class => 'inputs code' do
2010-07-21 23:56:42 +00:00
- if @theme_asset.new_record?
2010-10-10 14:37:34 +00:00
= f.input :plain_text_name
2010-07-21 23:56:42 +00:00
= f.custom_input :plain_text_type do
= f.select :plain_text_type, %w(stylesheet javascript)
2010-07-21 23:56:42 +00:00
2010-05-11 21:38:52 +00:00
= f.custom_input :plain_text, :css => 'full', :with_label => false do
%code{ :class => (@theme_asset.size && @theme_asset.size > 40000 ? 'nude' : (@theme_asset.content_type || 'stylesheet')) }
2010-05-11 21:38:52 +00:00
= f.text_area :plain_text
.more
= link_to t('locomotive.image_picker.link'), admin_theme_assets_path, :id => 'image-picker-link', :class => 'picture'
2010-07-21 23:56:42 +00:00
2010-05-11 21:38:52 +00:00
%span.alt
!= t('locomotive.theme_assets.form.choose_file')
2010-07-21 23:56:42 +00:00
2010-10-10 14:37:34 +00:00
= f.foldable_inputs :name => :options do
= f.input :folder