Sha256: d7818f7c4794dc8a62a4f3667b2249061e0c7b1fe6b0a51d17a8ae55464eff1d

Contents?: true

Size: 1.1 KB

Versions: 11

Compression:

Stored size: 1.1 KB

Contents

%li.asset-manager-row
  = form.label "Asset Manager"
  %ul.asset-store
    = form.fields_for :assets do |builder|
      %li.asset-item
        - if not builder.object.new_record?
          .asset
            .asset-container
              = image_tag builder.object.asset.url
            / = builder.hidden_field :title, :class=>"asset-title-hidden"
            = builder.hidden_field :id, :class=>"asset-id-hidden"
            .asset-check-container
              %input{:type=>"checkbox", :id=>"asset-item-#{builder.object.id}", :class=>"asset-check", :checked=>true}
            .asset-text-container
              / %p.asset-text= if builder.object.title.length > 0 then builder.object.title else "[Click to add title]" end
            .asset-url= builder.object.asset.url

        - else
          %span.asset-blank
            - @assetField = builder.file_field :asset
            - @errorField = builder.error :asset
            / - @titleField = builder.input_field :title, :placeholder => "Enter image title"
%li
  = form.label "Add new asset"
  .input-push.asset-add
    = @assetField
    / = @titleField
  = @errorField

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ems-0.1.12 app/views/ems/globals/_asset.html.haml
ems-0.1.11 app/views/ems/globals/_asset.html.haml
ems-0.1.10 app/views/ems/globals/_asset.html.haml
ems-0.1.9 app/views/ems/globals/_asset.html.haml
ems-0.1.8 app/views/ems/globals/_asset.html.haml
ems-0.1.7 app/views/ems/globals/_asset.html.haml
ems-0.1.6 app/views/ems/globals/_asset.html.haml
ems-0.1.5 app/views/ems/globals/_asset.html.haml
ems-0.1.4 app/views/ems/globals/_asset.html.haml
ems-0.1.3 app/views/ems/globals/_asset.html.haml
ems-0.1.2 app/views/ems/globals/_asset.html.haml