Commit 075aae25 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Updated the "users" to "members" matches in the view

Reverted the change from the "expires_at" to "expires_at_groups" in the groups controller
parent 99c263ad
...@@ -16,13 +16,13 @@ class Projects::GroupLinksController < Projects::ApplicationController ...@@ -16,13 +16,13 @@ class Projects::GroupLinksController < Projects::ApplicationController
project.project_group_links.create( project.project_group_links.create(
group: group, group: group,
group_access: params[:link_group_access], group_access: params[:link_group_access],
expires_at: params[:expires_at] || params[:expires_at_groups] expires_at: params[:expires_at]
) )
else else
flash[:alert] = 'Please select a group.' flash[:alert] = 'Please select a group.'
end end
redirect_to namespace_project_group_links_path(project.namespace, project) redirect_to namespace_project_settings_members_path(project.namespace, project)
end end
def update def update
...@@ -36,7 +36,7 @@ class Projects::GroupLinksController < Projects::ApplicationController ...@@ -36,7 +36,7 @@ class Projects::GroupLinksController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
redirect_to namespace_project_group_links_path(project.namespace, project) redirect_to namespace_project_settings_members_path(project.namespace, project)
end end
format.js { head :ok } format.js { head :ok }
end end
......
...@@ -59,7 +59,7 @@ module SelectsHelper ...@@ -59,7 +59,7 @@ module SelectsHelper
def users_select_data_attributes(opts) def users_select_data_attributes(opts)
{ {
placeholder: opts[:placeholder] || 'Search for a user', placeholder: opts[:placeholder] || 'Search for members to update or invite',
null_user: opts[:null_user] || false, null_user: opts[:null_user] || false,
any_user: opts[:any_user] || false, any_user: opts[:any_user] || false,
email_user: opts[:email_user] || false, email_user: opts[:email_user] || false,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.col-lg-9 .col-lg-9
%h5.prepend-top-0 %h5.prepend-top-0
Set a group to share Set a group to share
= form_tag namespace_project_group_links_path(@project.namespace, @project), class: 'js-requires-input', method: :post do = form_tag namespace_project_group_links_path(@project.namespace, @project), class: 'js-requires-input', method: :post, namespace: 'GROUPS' do
.form-group .form-group
= label_tag :link_group_id, "Group", class: "label-light" = label_tag :link_group_id, "Group", class: "label-light"
= groups_select_tag(:link_group_id, data: { skip_groups: @skip_groups }, required: true) = groups_select_tag(:link_group_id, data: { skip_groups: @skip_groups }, required: true)
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
.form-group .form-group
= label_tag :expires_at, 'Access expiration date', class: 'label-light' = label_tag :expires_at, 'Access expiration date', class: 'label-light'
.clearable-input .clearable-input
= text_field_tag :expires_at_groups, nil, class: 'form-control js-access-expiration-date-groups', placeholder: 'Select access expiration date' = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date-groups', placeholder: 'Select access expiration date', id: 'expires_at_groups'
%i.clear-icon.js-clear-input %i.clear-icon.js-clear-input
.help-block .help-block
On this date, all users in the group will automatically lose access to this project. On this date, all members in the group will automatically lose access to this project.
= submit_tag "Share", class: "btn btn-create" = submit_tag "Share", class: "btn btn-create"
.col-lg-9.col-lg-offset-3 .col-lg-9.col-lg-offset-3
%hr %hr
......
...@@ -5,7 +5,7 @@ ...@@ -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" = 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) - if can?(current_user, :admin_project_member, @project)
%p %p
Add new user to Add a new member to
%strong= @project.name %strong= @project.name
.col-lg-9 .col-lg-9
.light.prepend-top-default .light.prepend-top-default
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= render 'shared/members/requests', membership_source: @project, requesters: @requesters = render 'shared/members/requests', membership_source: @project, requesters: @requesters
.append-bottom-default.clearfix .append-bottom-default.clearfix
%h5.member.existing-title %h5.member.existing-title
Existing users and groups Existing members and groups
- if @group_links.any? - if @group_links.any?
= render 'projects/project_members/groups', group_links: @group_links = render 'projects/project_members/groups', group_links: @group_links
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.col-md-5.col-lg-5 .col-md-5.col-lg-5
= users_select_tag(:user_ids, multiple: true, class: "input-clamp", scope: :all, email_user: true) = users_select_tag(:user_ids, multiple: true, class: "input-clamp", scope: :all, email_user: true)
.help-block.append-bottom-10 .help-block.append-bottom-10
Search for users by name, username, or email, or invite new ones using their email address. Search for members by name, username, or email, or invite new ones using their email address.
.col-md-2.col-lg-2 .col-md-2.col-lg-2
= select_tag :access_level, options_for_select(ProjectMember.access_level_roles, @project_member.access_level), class: "form-control project-access-select" = select_tag :access_level, options_for_select(ProjectMember.access_level_roles, @project_member.access_level), class: "form-control project-access-select"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date' = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date'
%i.clear-icon.js-clear-input %i.clear-icon.js-clear-input
.help-block.append-bottom-10 .help-block.append-bottom-10
On this date, the user(s) will automatically lose access to this project. On this date, the member(s) will automatically lose access to this project.
.col-md-2 .col-md-2
= f.submit "Add to project", class: "btn btn-create btn-block" = f.submit "Add to project", class: "btn btn-create btn-block"
......
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
Users with access to Members with access to
%strong #{@project.name} %strong #{@project.name}
%span.badge= @project_members.total_count %span.badge= @project_members.total_count
= form_tag namespace_project_settings_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do = form_tag namespace_project_settings_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
%i.clear-icon.js-clear-input %i.clear-icon.js-clear-input
- if can_admin_member - if can_admin_member
= link_to namespace_project_group_link_path(@project.namespace, @project, group_link), = link_to namespace_project_group_link_path(@project.namespace, @project, group_link),
remote: true,
method: :delete, method: :delete,
data: { confirm: "Are you sure you want to remove #{group.name}?" }, data: { confirm: "Are you sure you want to remove #{group.name}?" },
class: 'btn btn-remove prepend-left-10' do class: 'btn btn-remove prepend-left-10' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment