rosa-build/app/views/shared/_members_table.html.haml

40 lines
1.7 KiB
Plaintext
Raw Normal View History

2012-09-11 17:02:09 +01:00
= form_tag remove_members_path, :id => 'members_form', :method => :post do
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
%thead
%tr
- if can? :remove_members, editable_object
%th
\ 
%th
= t("layout.collaborators.members")
- if can? :remove_member, editable_object
%th.buttons
= t("layout.remove")
%tbody
- members.each_with_index do |user, num|
%tr{:id => "admin-table-members-row#{num}", :class => cycle(:odd, :even)}
- if can? :remove_members, editable_object
%td
%span.niceCheck-main{:id => "niceCheckbox#{num}", :style => "background-position: 0px 0px; "}
= check_box_tag "user_remove[#{user.id}][]"
%td
.img
= image_tag avatar_url(user)
.forimg= link_to user.fullname, user_path(user)
- if can? :remove_member, editable_object
%td.buttons
= link_to "#{remove_member_path}?member_id=#{user.id}", :method => :delete, :confirm => t("layout.confirm") do
%span.delete  
2013-07-24 21:31:49 +01:00
- if can? :remove_members, editable_object
2013-07-24 21:29:28 +01:00
= submit_tag t("layout.delete"), :class => 'button', :data => {'disable-with' => t('layout.processing')}
2012-09-11 17:02:09 +01:00
.both
- if can? :add_member, editable_object
.hr.top
= form_tag add_member_path do
.admin-search
= autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_autocompletes_path, :id_element => '#member_id_field'
2012-09-11 17:02:09 +01:00
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
2013-07-24 21:29:28 +01:00
= submit_tag t('layout.add'), :class => 'button', :data => {'disable-with' => t('layout.processing')}
2012-09-11 17:02:09 +01:00
.both