rosa-build/app/views/groups/members/index.html.haml

40 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-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
- (parent.members - [parent.owner]).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.fullname, user_path(user)
- Relation::ROLES.each_with_index do |role, i|
%td
.radio= radio_button_tag "user[#{user.id}]", role, ((parent.actors.exists? :actor_id => user.id, :actor_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
= form_tag add_group_members_path(parent) do
.admin-search= autocomplete_field_tag 'user_uname', params[:user_uname], autocomplete_user_uname_autocompletes_path
.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('sidebar')