-css_class = 'warning' if need.created?
-css_class = 'danger' if need.refused?
-css_class = 'success' if need.verified? or need.negociated? or need.negociating? or need.failed?
-state = 'Validé' if need.verified? or need.negociated? or need.negociating? or need.failed?
-state = 'En attente de validation' if need.created?
-state = 'Refusée' if need.refused?

%tr{:id => need.id, class: css_class}
  %td
    =link_to need.title, public_need_path(need)
  %td
    -if need.category
      = i(:"tag") + " " + need.category.name
  %td
    =state
  %td.actions{:style => "width:150px;text-align:right"}
    -if need.created? or need.refused?
      = link_to i(:"trash-o btn btn-default"), [:public, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, method: :delete
      = link_to i(:"pencil btn btn-primary"), edit_public_need_path(need)
