
%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;"}
    = ic(:"hand-paper-o") + " " + offer.need.wishes.length.to_s

  %td{style:"text-align:center;font-weight:bold;"}
    = ic(:"check") +  " " + offer.customers.count.to_s

  %td.actions{:style => "width:150px;text-align:right"}
    -if @need
      = link_to i(:"cog"), accepted_admin_offer_path(offer), title: "Gérer les offres par client"
      = 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(:"cog"), accepted_admin_offer_path(offer), title: "Gérer les offres par client"
      = 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)
