diff options
author | Andrey Kumanyaev <me@zzet.org> | 2012-12-26 02:52:20 +0400 |
---|---|---|
committer | Andrey Kumanyaev <me@zzet.org> | 2012-12-26 19:52:15 +0400 |
commit | 9c574464a6051536ee83a93e8270a7dd9d85da33 (patch) | |
tree | 306ca832f425920b8ccfbff150dacb5e39359e4d /app/views/admin/groups | |
parent | 17ea019f4e43b4fb394544f9d86ab3016f54d28e (diff) | |
download | gitlab-ce-9c574464a6051536ee83a93e8270a7dd9d85da33.tar.gz |
Add functional in admin section
Diffstat (limited to 'app/views/admin/groups')
-rw-r--r-- | app/views/admin/groups/show.html.haml | 59 |
1 files changed, 44 insertions, 15 deletions
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 41f6d9b3516..e23fea3a3e6 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -44,25 +44,54 @@ %div = f.submit 'Change Owner', class: "btn danger" = link_to "Cancel", "#", class: "btn change-owner-cancel-link" -%fieldset - %legend Projects (#{@group.projects.count}) - %table - %thead + +- if @group.projects.any? + %fieldset + %legend Projects (#{@group.projects.count}) + %table + %thead + %tr + %th Project name + %th Path + %th Users + %th.cred Danger Zone! + - @group.projects.each do |project| + %tr + %td + = link_to project.name_with_namespace, [:admin, project] + %td + %span.monospace= project.path_with_namespace + ".git" + %td= project.users.count + %td.bgred + = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small" + + = form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put do + %table.zebra-striped + %thead + %tr + %th Users + %th Project Access: + + - @group.users.each do |u| + %tr{class: "user_#{u.id}"} + %td.name= link_to u.name, admin_user_path(u) + %td.projects_access + - u.projects.in_group(@group).each do |p| + - u_p = u.users_projects.in_project(p).first + = "#{p.name} (#{link_to u_p.project_access_human, edit_admin_team_member_path(u_p) })".html_safe %tr - %th Project name - %th Path - %th Users - %th.cred Danger Zone! - - @group.projects.each do |project| + %td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5' + %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} + %tr + %td= submit_tag 'Add user to projects in group', class: "btn primary" %td - = link_to project.name_with_namespace, [:admin, project] - %td - %span.monospace= project.path_with_namespace + ".git" - %td= project.users.count - %td.bgred - = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small" + Read more about project permissions + %strong= link_to "here", help_permissions_path, class: "vlink" +- else + %fieldset + %legend Group is empty = form_tag project_update_admin_group_path(@group), class: "bulk_import", method: :put do %fieldset |