40 lines
1.6 KiB
Plaintext
40 lines
1.6 KiB
Plaintext
|
= 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
|
|||
|
- if can? :remove_memvers, editable_object
|
|||
|
= submit_tag t("layout.delete"), :class => 'button'
|
|||
|
.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_users_path, :id_element => '#member_id_field'
|
|||
|
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
|
|||
|
= submit_tag t("layout.add"), :class => 'button'
|
|||
|
.both
|