Sha256: eedb8d284877c4f81a8b05759e3b1e32e10c37ab4446e310f672e029a70975f8

Contents?: true

Size: 1.65 KB

Versions: 13

Compression:

Stored size: 1.65 KB

Contents

- content_for :head do
  = javascript_include_tag 'admin/plugins/json2', 'admin/plugins/scrollTo', 'admin/plugins/codemirror/codemirror', 'admin/plugins/fancybox', 'admin/plugins/plupload/plupload.full.js', 'admin/theme_assets.js'
  = stylesheet_link_tag 'admin/plugins/fancybox', 'admin/box'

= f.hidden_field :performing_plain_text

#file-selector{ :class => "selector #{'hidden' if @asset.performing_plain_text?}" }
  = f.inputs :name => :information do
    = f.input :source

  - if @asset.new_record? || !@asset.image?
    %span.alt
      = t('admin.theme_assets.form.choose_plain_text')

- if allow_plain_text_editing?(@asset)
  #text-selector{ :class => "selector #{'hidden' if !@asset.performing_plain_text?}", :style => "#{'display: none' if !@asset.performing_plain_text?}" }
    = f.inputs :name => :code, :class => 'inputs code' do
      
      - if @asset.new_record?
        = f.input :slug
        
        = f.custom_input :content_type do
          = f.select :content_type, ["stylesheet", "javascript"]
          
      = f.custom_input :plain_text, :css => 'full', :with_label => false do
        %code{ :class => (@asset.size && @asset.size > 40000 ? 'nude' : (@asset.content_type || 'stylesheet')) }
          = f.text_area :plain_text
          %li.more
            = link_to t('.picker_link'), admin_theme_assets_path, :id => 'asset-picker-link'
            
    %span.alt
      = t('admin.theme_assets.form.choose_file')
      
- if @asset.image?
  = f.foldable_inputs :name => "#{t('formtastic.titles.preview')} #{image_dimensions_and_size(@asset)}", :class => 'preview' do
    %li
      .image
        .inside
          = image_tag(@asset.source.url(:preview))

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
locomotive_cms-0.0.2.7 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.6 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.5 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.4 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.3 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.2 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2.1 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.2 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.1.4 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.1.3 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.1.2 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.1.1 app/views/admin/theme_assets/_form.html.haml
locomotive_cms-0.0.1 app/views/admin/theme_assets/_form.html.haml