negos_app/app/views/admin/offers/_offer.html.haml
2016-02-16 21:09:48 +01:00

19 lines
857 B
Plaintext
Executable File

%tr{:id => offer.id}
%td
= link_to offer.need.title, edit_admin_need_path(offer.need)
%td
=offer.supplier
%td
=number_to_currency(offer.price, locale: :fr)
%td{style:"text-align:center;font-weight:bold;color:#3C763D;"}
=link_to i(:"cog") + " " + offer.customers.count.to_s + " / " + offer.need.wishes.length.to_s, accepted_admin_offer_path(offer)
%td.actions{:style => "width:150px;text-align:right"}
-if @need
= link_to i(:"trash"), [:admin,@need, offer], :data => {:confirm => 'Voulez-vous vraiment supprimer cette offre ?'}, :method => :delete
= link_to i(:pencil), edit_admin_need_offer_path(@need, offer)
-else
= link_to i(:"trash"), [:admin, offer], :data => {:confirm => 'Voulez-vous vraiment supprimer cette offre ?'}, :method => :delete
= link_to i(:pencil), edit_admin_offer_path(offer)