-css_class = "warning" if need.negociating? -css_class = "danger" if need.failed? -css_class = "success" if need.negociated? %tr{:id => need.id, class: css_class} %td =link_to need.title, edit_admin_need_path(need) %td -if need.image_file =link_to "Oui", need.image_file.file.url, target: "_blank" -else Non %td -if need.category =link_to need.category.name, edit_admin_need_category_path(need.category) %td{style: 'text-align:center' } =link_to i(:"hand-paper-o") + " " + need.wishes.length.to_s, admin_need_wishes_path(need)    =link_to i(:"comment-o") + " " + need.messages.length.to_s, admin_need_messages_path(need) %td{style: 'text-align:center' } =link_to i(:"gift") + " " + need.offers.length.to_s, admin_need_offers_path(need) %td =need.human_state %td.actions{:style => "width:150px;text-align:right"} -if(need.verified?) = link_to i(:"comments"), negociate_admin_need_path(need), title: "Passer en négociation", :data => {:confirm => 'Voulez-vous vraiment passer ce besoin en négociation'} -if(need.negociating?) = link_to i(:"thumbs-up"), accept_admin_need_path(need), title: "Passer en négocié et créer une proposition", :data => {:confirm => 'Voulez-vous vraiment passer ce besoin en négocié ?'} = link_to i(:"thumbs-down"), reject_admin_need_path(need), title: "Passer en négociation échouée", :data => {:confirm => 'Voulez-vous vraiment passer ce besoin en négociation échouée'} = link_to i(:"trash"), [:admin, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, :method => :delete = link_to i(:pencil), edit_admin_need_path(need)