From 4cd139e948ad0de3516b6534146b51faffeca610 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Thu, 22 Dec 2016 16:38:27 -0600 Subject: Moved the members (project_members)option to a single controller called members This controller is going to contain both the project members and groups options for the settings gear. Generated the route and modified the routing to point to the new members setting path --- .../projects/project_members/_index.html.haml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/views/projects/project_members/_index.html.haml (limited to 'app/views/projects/project_members/_index.html.haml') diff --git a/app/views/projects/project_members/_index.html.haml b/app/views/projects/project_members/_index.html.haml new file mode 100644 index 00000000000..6499569dde7 --- /dev/null +++ b/app/views/projects/project_members/_index.html.haml @@ -0,0 +1,27 @@ +.row.prepend-top-default + .col-lg-3.settings-sidebar + %h4.prepend-top-0 + Members + = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default hidden-xs visible-sm pull-right", title: "Import members from another project" + - if can?(current_user, :admin_project_member, @project) + %p + Add new user to + %strong= @project.name + .col-lg-9 + .light.prepend-top-default + - if can?(current_user, :admin_project_member, @project) + = render "projects/project_members/new_project_member" + + = render 'shared/members/requests', membership_source: @project, requesters: @requesters + .append-bottom-default.clearfix + %h5.member.existing-title + Existing users and groups + - if @group_links.any? + = render 'groups', group_links: @group_links + + .append-bottom-default.clearfix + - if @group_links.any? + = render 'groups', group_links: @group_links + + = render 'projects/project_members/team', members: @project_members + = paginate @project_members, theme: "gitlab" -- cgit v1.2.1 From 68c730bb99a12b0ea8ac3d08f074dc66e7ac2dae Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Fri, 23 Dec 2016 12:23:04 -0600 Subject: Fixed rspec tests for the project members also fixed the index view (removed an extra tag ) --- app/views/projects/project_members/_index.html.haml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/views/projects/project_members/_index.html.haml') diff --git a/app/views/projects/project_members/_index.html.haml b/app/views/projects/project_members/_index.html.haml index 6499569dde7..0208e6e4ae8 100644 --- a/app/views/projects/project_members/_index.html.haml +++ b/app/views/projects/project_members/_index.html.haml @@ -17,11 +17,7 @@ %h5.member.existing-title Existing users and groups - if @group_links.any? - = render 'groups', group_links: @group_links - - .append-bottom-default.clearfix - - if @group_links.any? - = render 'groups', group_links: @group_links + = render 'projects/project_members/groups', group_links: @group_links = render 'projects/project_members/team', members: @project_members = paginate @project_members, theme: "gitlab" -- cgit v1.2.1 From def6c43da15a38e1211cf733442efe01824e5150 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Fri, 23 Dec 2016 15:45:34 -0600 Subject: Fixed more rspec tests as well as spinach features --- app/views/projects/project_members/_index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/project_members/_index.html.haml') diff --git a/app/views/projects/project_members/_index.html.haml b/app/views/projects/project_members/_index.html.haml index 0208e6e4ae8..08f0b8b1381 100644 --- a/app/views/projects/project_members/_index.html.haml +++ b/app/views/projects/project_members/_index.html.haml @@ -2,7 +2,7 @@ .col-lg-3.settings-sidebar %h4.prepend-top-0 Members - = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default hidden-xs visible-sm pull-right", title: "Import members from another project" + = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default visible-xs visible-sm pull-right", title: "Import members from another project" - if can?(current_user, :admin_project_member, @project) %p Add new user to -- cgit v1.2.1 From 075aae2503d245c3618a4314d12daa22aac6a624 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Wed, 28 Dec 2016 12:54:40 -0600 Subject: Updated the "users" to "members" matches in the view Reverted the change from the "expires_at" to "expires_at_groups" in the groups controller --- app/views/projects/project_members/_index.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/projects/project_members/_index.html.haml') diff --git a/app/views/projects/project_members/_index.html.haml b/app/views/projects/project_members/_index.html.haml index 08f0b8b1381..bd8d030c73e 100644 --- a/app/views/projects/project_members/_index.html.haml +++ b/app/views/projects/project_members/_index.html.haml @@ -5,7 +5,7 @@ = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default visible-xs visible-sm pull-right", title: "Import members from another project" - if can?(current_user, :admin_project_member, @project) %p - Add new user to + Add a new member to %strong= @project.name .col-lg-9 .light.prepend-top-default @@ -15,7 +15,7 @@ = render 'shared/members/requests', membership_source: @project, requesters: @requesters .append-bottom-default.clearfix %h5.member.existing-title - Existing users and groups + Existing members and groups - if @group_links.any? = render 'projects/project_members/groups', group_links: @group_links -- cgit v1.2.1 From 23e6d8c3682c116db909d0eabfaedb57df85bf36 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Thu, 5 Jan 2017 12:25:47 -0600 Subject: Moved the "import" button next to the "Add to project" button Fixed padding and margins for the dropdowns on the members section --- app/views/projects/project_members/_index.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views/projects/project_members/_index.html.haml') diff --git a/app/views/projects/project_members/_index.html.haml b/app/views/projects/project_members/_index.html.haml index bd8d030c73e..ab0771b5751 100644 --- a/app/views/projects/project_members/_index.html.haml +++ b/app/views/projects/project_members/_index.html.haml @@ -2,7 +2,6 @@ .col-lg-3.settings-sidebar %h4.prepend-top-0 Members - = link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default visible-xs visible-sm pull-right", title: "Import members from another project" - if can?(current_user, :admin_project_member, @project) %p Add a new member to -- cgit v1.2.1