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

68 lines
1.7 KiB
Plaintext
Executable File

%h1
= "Liste des clients intéressés par le besoin "
<strong>
= @offer.need.title
</strong>
%h4
= "Personnes intéressées: "
<strong>
=pluralize(@offer.need.wishes.length, "Personne")
</strong>
%h4
= "Offres acceptées: "
<strong>
=pluralize(@offer.accepted_offers.length, "Personne")
</strong>
%h4
= "Prix de l'offre: "
<strong>
=number_to_currency(@offer.price, locale: :fr)
</strong>
%h4
= "Fournisseur: "
<strong>
=@offer.supplier
</strong>
%br
%table.table.admin-table.table-hover.table-striped
%thead.rows_header
%tr
%th
Société
%th
Nom/Prénom
%th
Téléphone
%th
Email
%th{style:"text-align:center"}
Offre acceptée?
%th{style:"text-align:center"}
État
%tbody.rows
-@offer.need.wishes.each do |wish|
%tr
%td
-if wish.customer.organisation
=wish.customer.organisation
%td
=wish.customer.firstname + " " + wish.customer.name
%td
-if wish.customer.phone
= i("phone") + " #{wish.customer.phone}"
%td
-if wish.customer.email
= link_to i("envelope-o") + " #{wish.customer.email}", 'mailto:' + wish.customer.email
%td{style:"text-align:center"}
-accepted_offer = @offer.accepted_offers.where(customer_id: wish.customer.id).first
-if accepted_offer
=i(:"check") + " Acceptée"
-else
\-
%td{style:"text-align:center"}
-if accepted_offer
=accepted_offer.human_state
-else
Pas encore acceptée