Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-29 18:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-29 18:07:33 +0300
commit762918f04a2ee8f4f7fac3d551c14af8dd30f17c (patch)
treea5e678bd635aca979707262b98607f7e2b68fd4a /app
parentfb28ad5316eb794646daf3b222779ed2e08b638e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/controllers/concerns/onboarding/redirectable.rb8
-rw-r--r--app/controllers/invites_controller.rb4
-rw-r--r--app/controllers/sessions_controller.rb2
-rw-r--r--app/models/group.rb4
-rw-r--r--app/models/project.rb4
-rw-r--r--app/views/groups/_import_group_from_another_instance_panel.html.haml13
6 files changed, 15 insertions, 20 deletions
diff --git a/app/controllers/concerns/onboarding/redirectable.rb b/app/controllers/concerns/onboarding/redirectable.rb
index 7e669db9199..15c1847ebe4 100644
--- a/app/controllers/concerns/onboarding/redirectable.rb
+++ b/app/controllers/concerns/onboarding/redirectable.rb
@@ -9,7 +9,7 @@ module Onboarding
def after_sign_up_path
if onboarding_status.single_invite?
flash[:notice] = helpers.invite_accepted_notice(onboarding_status.last_invited_member)
- onboarding_status.last_invited_member_source.activity_path
+ polymorphic_path(onboarding_status.last_invited_member_source)
else
# Invites will come here if there is more than 1.
path_for_signed_in_user
@@ -17,13 +17,13 @@ module Onboarding
end
def path_for_signed_in_user
- stored_location_for(:user) || last_member_activity_path
+ stored_location_for(:user) || last_member_source_path
end
- def last_member_activity_path
+ def last_member_source_path
return dashboard_projects_path unless onboarding_status.last_invited_member_source.present?
- onboarding_status.last_invited_member_source.activity_path
+ polymorphic_path(onboarding_status.last_invited_member_source)
end
end
end
diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb
index c058329680a..fcd87f46f67 100644
--- a/app/controllers/invites_controller.rb
+++ b/app/controllers/invites_controller.rb
@@ -125,14 +125,14 @@ class InvitesController < ApplicationController
name: member.source.full_name,
url: project_url(member.source),
title: _("project"),
- path: member.source.activity_path
+ path: project_path(member.source)
}
when Group
{
name: member.source.name,
url: group_url(member.source),
title: _("group"),
- path: member.source.activity_path
+ path: group_path(member.source)
}
end
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 595d79abcf2..a8a09bd6ac6 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -100,7 +100,7 @@ class SessionsController < Devise::SessionsController
def after_pending_invitations_hook
member = resource.members.last
- store_location_for(:user, member.source.activity_path) if member
+ store_location_for(:user, polymorphic_path(member.source)) if member
end
def captcha_enabled?
diff --git a/app/models/group.rb b/app/models/group.rb
index 7092d5217e1..215d6624fd3 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -790,10 +790,6 @@ class Group < Namespace
end
strong_memoize_attr :has_project_with_service_desk_enabled?
- def activity_path
- Gitlab::Routing.url_helpers.activity_group_path(self)
- end
-
# rubocop: disable CodeReuse/ServiceClass
def open_issues_count(current_user = nil)
Groups::OpenIssuesCountService.new(self, current_user).count
diff --git a/app/models/project.rb b/app/models/project.rb
index 5788885498c..e9403728e54 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2992,10 +2992,6 @@ class Project < ApplicationRecord
Projects::GitGarbageCollectWorker
end
- def activity_path
- Gitlab::Routing.url_helpers.activity_project_path(self)
- end
-
def ci_forward_deployment_enabled?
return false unless ci_cd_settings
diff --git a/app/views/groups/_import_group_from_another_instance_panel.html.haml b/app/views/groups/_import_group_from_another_instance_panel.html.haml
index 6c5a27e68c4..9cf52115f4f 100644
--- a/app/views/groups/_import_group_from_another_instance_panel.html.haml
+++ b/app/views/groups/_import_group_from_another_instance_panel.html.haml
@@ -27,16 +27,19 @@
- docs_link = link_to('', help_page_path('user/group/import/index', anchor: 'migrated-group-items'), target: '_blank', rel: 'noopener noreferrer')
= safe_format(s_('GroupsNew|Not all group items are migrated. %{docs_link_start}What items are migrated%{docs_link_end}?'), tag_pair(docs_link, :docs_link_start, :docs_link_end))
- %p.gl-mt-3
- = s_('GroupsNew|Provide credentials for the source instance to import from. You can provide this instance as a source to move groups in this instance.')
- .form-group.gl-display-flex.gl-flex-direction-column
- = f.label :bulk_import_gitlab_url, s_('GroupsNew|GitLab source instance URL'), for: 'import_gitlab_url'
+ %p.gl-mt-5.gl-mb-3
+ - url_link = link_to('', help_page_path('user/group/import/index', anchor: 'connect-the-source-gitlab-instance'), target: '_blank', rel: 'noopener noreferrer')
+ = safe_format(s_('GroupsNew|Provide credentials for the %{url_link_start}source instance%{url_link_end} to import from. You can provide this instance as a source to move groups within this instance.'), tag_pair(url_link, :url_link_start, :url_link_end))
+ .form-group.gl-form-group.gl-display-flex.gl-flex-direction-column
+ = f.label :bulk_import_gitlab_url, s_('GroupsNew|GitLab source instance base URL'), for: 'import_gitlab_url'
= f.text_field :bulk_import_gitlab_url, disabled: bulk_imports_disabled, placeholder: 'https://gitlab.example.com', class: 'gl-form-input col-xs-12 col-sm-8',
required: true,
title: s_('GroupsNew|Enter the URL for the source instance.'),
id: 'import_gitlab_url',
data: { testid: 'import-gitlab-url' }
- .form-group.gl-display-flex.gl-flex-direction-column
+ %small.form-text.text-gl-muted
+ = s_('Import|Must only contain the base URL of the source GitLab instance.')
+ .form-group.gl-form-group.gl-display-flex.gl-flex-direction-column
= f.label :bulk_import_gitlab_access_token, s_('GroupsNew|Personal access token'), for: 'import_gitlab_token', class: 'col-form-label'
.gl-font-weight-normal
- pat_link = link_to('', help_page_path('user/profile/personal_access_tokens'), target: '_blank')