2012-03-30 15:54:30 +01:00
|
|
|
|
-set_meta_tags :title => [title_object(@group), t('layout.groups.members')]
|
2012-03-01 14:23:26 +00:00
|
|
|
|
= form_tag group_members_path(@group), :id => 'members_form', :delete_url => remove_group_members_path(@group) do
|
|
|
|
|
= hidden_field_tag "_method", "post"
|
|
|
|
|
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
|
|
|
|
|
%thead
|
|
|
|
|
%tr
|
|
|
|
|
%th
|
|
|
|
|
\
|
2012-05-02 10:18:07 +01:00
|
|
|
|
%th= t("layout.collaborators.members")
|
|
|
|
|
%th{:colspan => "3"}= t("layout.collaborators.roles")
|
2012-03-01 14:23:26 +00:00
|
|
|
|
%tbody
|
2012-05-03 13:34:30 +01:00
|
|
|
|
- (parent.members - [parent.owner]).each do |user|
|
2012-03-01 15:41:40 +00:00
|
|
|
|
%tr
|
2012-03-01 14:23:26 +00:00
|
|
|
|
%td
|
2012-05-02 10:18:07 +01:00
|
|
|
|
%span#niceCheckbox1.niceCheck-main= check_box_tag "user_remove[#{user.id}][]"
|
2012-03-01 14:23:26 +00:00
|
|
|
|
%td
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.img= image_tag avatar_url(user)
|
2012-07-04 16:53:18 +01:00
|
|
|
|
.forimg= link_to user.fullname, user_path(user)
|
2012-03-01 14:23:26 +00:00
|
|
|
|
- Relation::ROLES.each_with_index do |role, i|
|
|
|
|
|
%td
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.radio= radio_button_tag "user[#{user.id}]", role, ((parent.actors.exists? :actor_id => user.id, :actor_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio'
|
2012-03-01 14:23:26 +00:00
|
|
|
|
.forradio= t("layout.collaborators.role_names.#{ role }")
|
|
|
|
|
= link_to_function t("layout.delete"), "deleteAdminMember();", :class => 'button'
|
|
|
|
|
.both
|
|
|
|
|
.hr.top
|
2011-12-05 12:32:18 +00:00
|
|
|
|
|
2012-03-01 14:23:26 +00:00
|
|
|
|
= form_tag add_group_members_path(parent) do
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.admin-search= autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_users_path#, :id_element => '#member_id_field'
|
2012-03-01 14:23:26 +00:00
|
|
|
|
.admin-role
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.lineForm= select_tag 'role', options_for_collaborators_roles_select
|
2012-03-01 14:23:26 +00:00
|
|
|
|
.both
|
|
|
|
|
%br
|
|
|
|
|
= submit_tag t("layout.add"), :class => 'button'
|
2011-12-09 23:40:13 +00:00
|
|
|
|
|
2012-03-01 14:23:26 +00:00
|
|
|
|
.hr.bottom
|
|
|
|
|
.both
|
|
|
|
|
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button'
|
|
|
|
|
|
2012-05-02 10:18:07 +01:00
|
|
|
|
- content_for :sidebar, render('sidebar')
|