negos_app/app/views/admin/needs/_need_to_validate.html.haml

27 lines
1.1 KiB
Plaintext
Executable File

%tr{:id => need.id}
%td
=link_to need.title, edit_admin_need_path(need)
%td
-if need.category
=link_to need.category.name, edit_admin_need_category_path(need.category)
%td
-if need.author
=link_to need.author.organisation, edit_admin_customer_path(need.author)
-else
Administrateur
%td
Il y a #{time_ago_in_words( need.created_at)}
%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.actions{:style => "width:150px;text-align:right"}
-if(need.created?)
= link_to i(:remove), refuse_admin_need_path(need), title: "Refuser", :data => {:confirm => 'Voulez-vous vraiment refuser ce besoin ?'}
= link_to i(:check), validate_admin_need_path(need), title: "Valider", :data => {:confirm => 'Voulez-vous vraiment valider ce besoin ?'}
= link_to i(:"trash-o"), [:admin, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, :method => :delete
= link_to i(:pencil), edit_admin_need_path(need)