forked from OpenNeo/impress
18 lines
974 B
Text
18 lines
974 B
Text
- show_controls ||= false # we could do user check here, but may as well do it once
|
|
%div{'class' => closet_hanger_partial_class(closet_hanger), 'data-item-id' => closet_hanger.item_id, 'data-quantity' => closet_hanger.quantity}
|
|
= render :partial => 'items/item_link', :locals => {:item => closet_hanger.item}
|
|
.quantity{:class => "quantity-#{closet_hanger.quantity}"}
|
|
%span= closet_hanger.quantity
|
|
- if show_controls
|
|
= form_for [current_user, closet_hanger], :html => {:class => 'closet-hanger-update'} do |f|
|
|
= return_to_field_tag
|
|
= f.hidden_field :list_id
|
|
= f.hidden_field :owned
|
|
= f.number_field :quantity, :min => 0, :required => true
|
|
= f.submit t('.submit')
|
|
- if show_controls
|
|
= form_tag [current_user, closet_hanger], :method => :delete, :class => 'closet-hanger-destroy' do
|
|
= return_to_field_tag
|
|
= hidden_field_tag 'closet_hanger[owned]', closet_hanger.owned
|
|
= submit_tag t('.delete')
|
|
|