2012-03-30 15:54:30 +01:00
|
|
|
|
-set_meta_tags :title => [title_object(@project), t('layout.projects.members')]
|
2012-05-02 10:18:07 +01:00
|
|
|
|
= render 'sidebar'
|
|
|
|
|
= render 'submenu'
|
2011-12-14 15:28:31 +00:00
|
|
|
|
|
2012-03-22 00:44:05 +00:00
|
|
|
|
%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
|
|
|
|
|
|
2012-02-29 14:45:04 +00:00
|
|
|
|
= form_tag project_collaborators_path(@project), :id => 'members_form', :delete_url => remove_project_collaborators_path(@project) do
|
2012-02-28 21:01:25 +00:00
|
|
|
|
= hidden_field_tag "_method", "post"
|
|
|
|
|
%table.tablesorter{:cellpadding => "0", :cellspacing => "0"}
|
|
|
|
|
%thead
|
|
|
|
|
%tr
|
|
|
|
|
%th
|
|
|
|
|
\
|
|
|
|
|
%th
|
2012-02-29 14:45:04 +00:00
|
|
|
|
= t("layout.collaborators.members")
|
2012-02-28 21:01:25 +00:00
|
|
|
|
%th{:colspan => "3"}
|
2012-02-29 14:45:04 +00:00
|
|
|
|
= t("layout.collaborators.roles")
|
2012-02-28 21:01:25 +00:00
|
|
|
|
%tbody
|
2012-03-22 00:44:05 +00:00
|
|
|
|
- @users.each_with_index do |user, num|
|
|
|
|
|
%tr{:id => "admin-table-members-row#{num}"}
|
2012-02-28 21:01:25 +00:00
|
|
|
|
%td
|
2012-03-20 16:24:18 +00:00
|
|
|
|
%span#niceCheckbox1.niceCheck-main{ :style => "background-position: 0px 0px; "}
|
2012-02-28 21:01:25 +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-05-28 11:08:51 +01:00
|
|
|
|
.forimg= link_to user.fullname, user_path(user)
|
2012-02-28 21:01:25 +00:00
|
|
|
|
- Relation::ROLES.each_with_index do |role, i|
|
|
|
|
|
%td
|
|
|
|
|
.radio
|
2012-04-26 02:38:33 +01:00
|
|
|
|
= radio_button_tag "user[#{user.id}]", role, ((@project.relations.exists? :actor_id => user.id, :actor_type => 'User', :role => role) ? :checked : nil), :class => 'niceRadio'
|
2012-02-29 14:45:04 +00:00
|
|
|
|
.forradio= t("layout.collaborators.role_names.#{ role }")
|
2012-03-22 13:53:35 +00:00
|
|
|
|
= link_to_function t("layout.delete_selected"), "deleteAdminMember();", :class => 'button'
|
|
|
|
|
= link_to_function t("layout.save"), "saveAdminMember();", :class => 'button right_floated'
|
2012-02-28 21:01:25 +00:00
|
|
|
|
.both
|
2012-03-22 00:44:05 +00:00
|
|
|
|
%br
|
|
|
|
|
|
|
|
|
|
.hr.bottom
|
|
|
|
|
.both
|
|
|
|
|
|
|
|
|
|
%a{:name => 'groups'}
|
|
|
|
|
%h3= t("layout.groups.list_header")
|
2012-02-29 14:45:04 +00:00
|
|
|
|
|
2012-02-28 21:01:25 +00:00
|
|
|
|
= form_tag add_project_collaborators_path(@project) do
|
|
|
|
|
.admin-search
|
2012-03-22 00:44:05 +00:00
|
|
|
|
= autocomplete_field_tag 'group_id', params[:group_id], autocomplete_group_uname_groups_path, :id_element => '#group_id_field'
|
2012-02-28 21:01:25 +00:00
|
|
|
|
.admin-role
|
|
|
|
|
.lineForm
|
2012-03-22 00:44:05 +00:00
|
|
|
|
= select_tag 'role', options_for_collaborators_roles_select, :id => 'group_role'
|
|
|
|
|
= hidden_field_tag 'group_id', nil, :id => 'group_id_field'
|
2012-02-28 21:01:25 +00:00
|
|
|
|
= submit_tag t("layout.add"), :class => 'button'
|
2012-03-22 00:44:05 +00:00
|
|
|
|
.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
|
2012-04-26 02:38:33 +01:00
|
|
|
|
= radio_button_tag "group[#{group.id}]", role, ((@project.relations.exists? :actor_id => group.id, :actor_type => 'Group', :role => role) ? :checked : nil), :class => 'niceRadio'
|
2012-03-22 00:44:05 +00:00
|
|
|
|
.forradio= t("layout.collaborators.role_names.#{ role }")
|
2012-03-22 13:53:35 +00:00
|
|
|
|
= link_to_function t("layout.delete_selected"), "deleteAdminGroup();", :class => 'button'
|
|
|
|
|
= link_to_function t("layout.save"), "saveAdminGroup();", :class => 'button right_floated'
|
2012-03-22 00:44:05 +00:00
|
|
|
|
.both
|
2012-02-28 21:01:25 +00:00
|
|
|
|
.both
|
|
|
|
|
|