%h1 = "Gestion des offres par client pour le besoin " = @offer.need.title %h4 = "Personnes intéressées: " =pluralize(@offer.need.wishes.length, "Personne") %h4 = "Offres acceptées: " =pluralize(@offer.accepted_offers.length, "Personne") %h4 = "Prix proposé: " =number_to_currency(@offer.price, locale: :fr) %h4 = "Fournisseur: " =@offer.supplier %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"} Offres acceptée? %th{style:"text-align:center"} Documents %th{style:"text-align:center"} État %tbody.rows -@offer.need.wishes.each do |wish| -accepted_offer = @offer.accepted_offers.where(customer_id: wish.customer.id).first -if accepted_offer && accepted_offer.documents_completed? -class_name = "success" %tr{class: class_name} %td -if wish.customer.organisation =wish.customer.organisation %td =wish.customer.firstname + " " + wish.customer.name %td -if wish.customer.phone = ic("phone") + " #{wish.customer.phone}" %td -if wish.customer.email = link_to ic("envelope-o") + " #{wish.customer.email}", 'mailto:' + wish.customer.email %td{style:"text-align:center"} -if accepted_offer =ic(:"check") + " Acceptée" -else \- %td{style:"text-align:center"} -if accepted_offer =link_to ic(:file) + " #{accepted_offer.documents.where(state: :document_verified).count} / #{accepted_offer.documents.count}", admin_offer_accepted_offer_path(@offer, accepted_offer), style:"display:inline-block", class: "btn btn-primary btn-xs" %td{style:"text-align:center"} -if accepted_offer =accepted_offer.human_admin_state -else Pas encore acceptée =link_to ic(:"chevron-circle-left") + " Gestion des offres", admin_offers_path, class: "btn btn-default" :javascript