kaps_app/app/views/public/p_friends/index.html.haml
2020-01-12 20:41:57 +01:00

58 lines
1.5 KiB
Plaintext

.qi_header
.right= link_to 'Ajouter un ami', new_public_p_friend_path(), :class => "btn btn-primary", :remote => true
%h1
Mes amis
=current_p_customer.email
.qi_row
.qi_pannel.qi_plain.padding
%h3 Invitations
%table.table
%tbody#kaps_rows
-PFriend.where(:enabled => false, :p_friend_customer_id => current_p_customer.id, :initiator => true).each do |p_friend|
%tr#p_friend{:id => p_friend.id}
%td= p_friend.p_customer.email
%td.actions
= link_to i(:check)+" Valider cette demande", confirm_public_p_friend_path(p_friend), :remote => false, :class => "btn btn-primary"
%h3 Demandes en cours
%table.table
%tbody#kaps_rows_in_process
=render current_p_customer.p_friends.where(:enabled => false, :initiator => true)
%h3
Demandes validées
%table.table
%tbody#kaps_rows
-current_p_customer.p_friends.where(:enabled => true).each do |p_friend|
%tr#p_friend_row{:id => p_friend.id}
%td= p_friend.p_friend_customer.email
%td
=#.actions
= link_to i(:pencil)+" Droits", edit_public_p_friend_path(p_friend), :remote => true, :class => "btn btn-primary"
= link_to i(:eye)+" Voir", public_p_friend_path(p_friend), :remote => false, :class => "btn btn-primary"