rosa-build/app/views/members/edit.html.haml

47 lines
1.7 KiB
Plaintext
Raw Normal View History

2012-03-30 15:54:30 +01:00
-set_meta_tags :title => [title_object(@group), t('layout.groups.members')]
= 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|
%tr
%td
%span#niceCheckbox1.niceCheck-main
= check_box_tag "user_remove[#{user.id}][]"
%td
.img
= image_tag avatar_url(user)
.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
= 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'
.hr.bottom
.both
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button'
- content_for :sidebar, render('groups/sidebar')