rosa-build/app/views/projects/collaborators/edit.html.haml

94 lines
3.8 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(@project), t('layout.projects.members')]
= render 'sidebar'
= render 'submenu'
%a{:name => 'users'}
%h3= t("layout.users.list_header")
= form_tag add_project_collaborators_path(@project) do
.admin-search
= autocomplete_field_tag 'member_id', params[:member_id], autocomplete_user_uname_users_path, :id_element => '#member_id_field'
.admin-role
.lineForm
= select_tag 'role', options_for_collaborators_roles_select
= hidden_field_tag 'member_id', nil, :id => 'member_id_field'
= submit_tag t("layout.add"), :class => 'button'
.both
= form_tag project_collaborators_path(@project), :id => 'members_form', :delete_url => remove_project_collaborators_path(@project) 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_with_index do |user, num|
%tr{:id => "admin-table-members-row#{num}"}
%td
%span#niceCheckbox1.niceCheck-main{ :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)
- Relation::ROLES.each_with_index do |role, i|
%td
.radio
= radio_button_tag "user[#{user.id}]", role, ((@project.relations.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_selected"), "deleteAdminMember();", :class => 'button'
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button right_floated'
.both
%br
.hr.bottom
.both
%a{:name => 'groups'}
%h3= t("layout.groups.list_header")
= form_tag add_project_collaborators_path(@project) do
.admin-search
= autocomplete_field_tag 'group_id', params[:group_id], autocomplete_group_uname_groups_path, :id_element => '#group_id_field'
.admin-role
.lineForm
= select_tag 'role', options_for_collaborators_roles_select, :id => 'group_role'
= hidden_field_tag 'group_id', nil, :id => 'group_id_field'
= submit_tag t("layout.add"), :class => 'button'
.both
= form_tag project_collaborators_path(@project), :id => 'groups_form', :delete_url => remove_project_collaborators_path(@project) do
= hidden_field_tag "_method", "post", :id => 'groups_method'
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
%thead
%tr
%th
\ 
%th
= t("layout.collaborators.members")
%th{:colspan => "3"}
= t("layout.collaborators.roles")
%tbody
- @groups.each_with_index do |group, num|
%tr{:id => "admin-table-members-row#{num + @users.size + 1}"}
%td
%span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "}
= check_box_tag "group_remove[#{group.id}][]"
%td
.forimg= link_to "#{group.uname}", group_path(group)
- Relation::ROLES.each_with_index do |role, i|
%td
.radio
= radio_button_tag "group[#{group.id}]", role, ((@project.relations.exists? :actor_id => group.id, :actor_type => 'Group', :role => role) ? :checked : nil), :class => 'niceRadio'
.forradio= t("layout.collaborators.role_names.#{ role }")
= link_to_function t("layout.delete_selected"), "deleteAdminGroup();", :class => 'button'
= link_to_function t("layout.save"), "saveAdminGroup();", :class => 'button right_floated'
.both
.both