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>2021-05-28 09:10:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-28 09:10:48 +0300
commitd193734fb97510ffc55f84c2f3a0a3692cd2d859 (patch)
treed01546164fb50d89639e8f4c39e81776bb1347c6 /app
parent50135e6e0460e9276588670e3235a95f19a1660d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss5
-rw-r--r--app/controllers/projects/templates_controller.rb2
-rw-r--r--app/finders/template_finder.rb16
-rw-r--r--app/helpers/gitpod_helper.rb2
-rw-r--r--app/helpers/issuables_description_templates_helper.rb9
-rw-r--r--app/models/project.rb4
-rw-r--r--app/views/admin/application_settings/_gitpod.html.haml6
7 files changed, 13 insertions, 31 deletions
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index 8246739c8f7..1abaff40bc9 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -107,10 +107,15 @@ $tabs-holder-z-index: 250;
border-radius: $border-radius-default;
}
+ .mr-widget-section:not(:first-child),
.mr-widget-footer {
border-top: solid 1px $border-color;
}
+ .mr-widget-alert-container + .mr-widget-section {
+ border-top: 0;
+ }
+
.mr-fast-forward-message {
padding-left: $gl-padding-50;
padding-bottom: $gl-padding;
diff --git a/app/controllers/projects/templates_controller.rb b/app/controllers/projects/templates_controller.rb
index b4b8fb97049..df945a99c73 100644
--- a/app/controllers/projects/templates_controller.rb
+++ b/app/controllers/projects/templates_controller.rb
@@ -25,7 +25,7 @@ class Projects::TemplatesController < Projects::ApplicationController
def names
respond_to do |format|
- format.json { render json: TemplateFinder.all_template_names_hash_or_array(project, params[:template_type].to_s) }
+ format.json { render json: TemplateFinder.all_template_names(project, params[:template_type].to_s.pluralize) }
end
end
diff --git a/app/finders/template_finder.rb b/app/finders/template_finder.rb
index 0f5622f2df0..b82b601541c 100644
--- a/app/finders/template_finder.rb
+++ b/app/finders/template_finder.rb
@@ -21,27 +21,11 @@ class TemplateFinder
end
end
- # This is temporary and will be removed once we introduce group level inherited templates and
- # remove the inherited_issuable_templates FF
- def all_template_names_hash_or_array(project, issuable_type)
- if project.inherited_issuable_templates_enabled?
- all_template_names(project, issuable_type.pluralize)
- else
- all_template_names_array(project, issuable_type.pluralize)
- end
- end
-
def all_template_names(project, type)
return {} if !VENDORED_TEMPLATES.key?(type.to_s) && type.to_s != 'licenses'
build(type, project).template_names
end
-
- # This is for issues and merge requests description templates only.
- # This will be removed once we introduce group level inherited templates and remove the inherited_issuable_templates FF
- def all_template_names_array(project, type)
- all_template_names(project, type).values.flatten.select { |tmpl| tmpl[:project_id] == project.id }.compact.uniq
- end
end
attr_reader :type, :project, :params
diff --git a/app/helpers/gitpod_helper.rb b/app/helpers/gitpod_helper.rb
index 875a44c51bb..726c852fcdd 100644
--- a/app/helpers/gitpod_helper.rb
+++ b/app/helpers/gitpod_helper.rb
@@ -2,6 +2,6 @@
module GitpodHelper
def gitpod_enable_description
- s_('Enable %{linkStart}Gitpod%{linkEnd} integration to launch a development environment in your browser directly from GitLab.')
+ s_('Users can launch a development environment from a GitLab browser tab when the %{linkStart}Gitpod%{linkEnd} integration is enabled.')
end
end
diff --git a/app/helpers/issuables_description_templates_helper.rb b/app/helpers/issuables_description_templates_helper.rb
index 5f69098de56..6cafde65c5c 100644
--- a/app/helpers/issuables_description_templates_helper.rb
+++ b/app/helpers/issuables_description_templates_helper.rb
@@ -29,17 +29,12 @@ module IssuablesDescriptionTemplatesHelper
def issuable_templates(project, issuable_type)
@template_types ||= {}
@template_types[project.id] ||= {}
- @template_types[project.id][issuable_type] ||= TemplateFinder.all_template_names_hash_or_array(project, issuable_type)
+ @template_types[project.id][issuable_type] ||= TemplateFinder.all_template_names(project, issuable_type.pluralize)
end
def issuable_templates_names(issuable)
all_templates = issuable_templates(ref_project, issuable.to_ability_name)
-
- if ref_project.inherited_issuable_templates_enabled?
- all_templates.values.flatten.map { |tpl| tpl[:name] if tpl[:project_id] == ref_project.id }.compact.uniq
- else
- all_templates.map { |template| template[:name] }
- end
+ all_templates.values.flatten.map { |tpl| tpl[:name] if tpl[:project_id] == ref_project.id }.compact.uniq
end
def selected_template(issuable)
diff --git a/app/models/project.rb b/app/models/project.rb
index 26a7062581f..df3c4bf54df 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2592,10 +2592,6 @@ class Project < ApplicationRecord
Projects::GitGarbageCollectWorker
end
- def inherited_issuable_templates_enabled?
- Feature.enabled?(:inherited_issuable_templates, self, default_enabled: :yaml)
- end
-
def activity_path
Gitlab::Routing.url_helpers.activity_project_path(self)
end
diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml
index 6d335e2db16..c08b41e8c55 100644
--- a/app/views/admin/application_settings/_gitpod.html.haml
+++ b/app/views/admin/application_settings/_gitpod.html.haml
@@ -22,7 +22,9 @@
= f.label :gitpod_enabled, s_('Gitpod|Enable Gitpod integration'), class: 'form-check-label'
.form-group
= f.label :gitpod_url, s_('Gitpod|Gitpod URL'), class: 'label-bold'
- = f.text_field :gitpod_url, class: 'form-control gl-form-input', placeholder: s_('Gitpod|e.g. https://gitpod.example.com')
+ = f.text_field :gitpod_url, class: 'form-control gl-form-input', placeholder: s_('Gitpod|https://gitpod.example.com')
.form-text.text-muted
- = s_('Gitpod|Add the URL to your Gitpod instance configured to read your GitLab projects.')
+ = s_('Gitpod|The URL to your Gitpod instance configured to read your GitLab projects, such as https://gitpod.example.com.')
+ - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('integration/gitpod', anchor: 'enable-gitpod-in-your-user-settings') }
+ = s_('Gitpod|To use the integration, each user must also enable Gitpod on their GitLab account. %{link_start}How do I enable it?%{link_end} ').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= f.submit s_('Save changes'), class: 'gl-button btn btn-confirm'