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
|
|
|
|
|
\
|
|
|
|
|
%th
|
|
|
|
|
= t("layout.collaborators.members")
|
|
|
|
|
%th{:colspan => "3"}
|
|
|
|
|
= t("layout.collaborators.roles")
|
|
|
|
|
%tbody
|
|
|
|
|
- @users.each do |user|
|
2012-03-01 15:41:40 +00:00
|
|
|
|
%tr
|
2012-03-01 14:23:26 +00:00
|
|
|
|
%td
|
2012-03-01 15:41:40 +00:00
|
|
|
|
%span#niceCheckbox1.niceCheck-main
|
2012-03-01 14:23:26 +00:00
|
|
|
|
= check_box_tag "user_remove[#{user.id}][]"
|
|
|
|
|
%td
|
|
|
|
|
.img
|
2012-03-06 18:59:29 +00:00
|
|
|
|
= image_tag avatar_url(user)
|
2012-03-01 14:23:26 +00:00
|
|
|
|
.forimg= link_to user.name, user_path(user)
|
|
|
|
|
- Relation::ROLES.each_with_index do |role, i|
|
|
|
|
|
%td
|
|
|
|
|
.radio
|
|
|
|
|
= radio_button_tag "user[#{user.id}]", role, ((parent.objects.exists? :object_id => user.id, :object_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio'
|
|
|
|
|
.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
|
|
|
|
|
.admin-search
|
|
|
|
|
= autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_users_path#, :id_element => '#member_id_field'
|
|
|
|
|
.admin-role
|
|
|
|
|
.lineForm
|
|
|
|
|
= select_tag 'role', options_for_collaborators_roles_select
|
|
|
|
|
.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'
|
|
|
|
|
|
|
|
|
|
- content_for :sidebar, render('groups/sidebar')
|