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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-13 18:10:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-13 18:10:40 +0300
commit9b1b702f0fc3820e13fd3810bf096687d3378dc5 (patch)
tree8ec6e084f9b0c84ebc0996c8ea64d47389f49e81 /app/helpers/issuables_helper.rb
parent39c1496527de559d5d3a5c3b53d11575f435a4dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb48
1 files changed, 2 insertions, 46 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index da142cbed0e..de5cae2e9e2 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -2,6 +2,7 @@
module IssuablesHelper
include GitlabRoutingHelper
+ include IssuablesDescriptionTemplatesHelper
def sidebar_gutter_toggle_icon
content_tag(:span, class: 'js-sidebar-toggle-container', data: { is_expanded: !sidebar_gutter_collapsed? }) do
@@ -75,28 +76,6 @@ module IssuablesHelper
.to_json
end
- def template_dropdown_tag(issuable, &block)
- title = selected_template(issuable) || "Choose a template"
- options = {
- toggle_class: 'js-issuable-selector',
- title: title,
- filter: true,
- placeholder: 'Filter',
- footer_content: true,
- data: {
- data: issuable_templates(issuable),
- field_name: 'issuable_template',
- selected: selected_template(issuable),
- project_path: ref_project.path,
- namespace_path: ref_project.namespace.full_path
- }
- }
-
- dropdown_tag(title, options: options) do
- capture(&block)
- end
- end
-
def users_dropdown_label(selected_users)
case selected_users.length
when 0
@@ -294,6 +273,7 @@ module IssuablesHelper
{
projectPath: ref_project.path,
+ projectId: ref_project.id,
projectNamespace: ref_project.namespace.full_path
}
end
@@ -369,24 +349,6 @@ module IssuablesHelper
cookies[:collapsed_gutter] == 'true'
end
- def issuable_templates(issuable)
- @issuable_templates ||=
- case issuable
- when Issue
- ref_project.repository.issue_template_names
- when MergeRequest
- ref_project.repository.merge_request_template_names
- end
- end
-
- def issuable_templates_names(issuable)
- issuable_templates(issuable).map { |template| template[:name] }
- end
-
- def selected_template(issuable)
- params[:issuable_template] if issuable_templates(issuable).any? { |template| template[:name] == params[:issuable_template] }
- end
-
def issuable_todo_button_data(issuable, is_collapsed)
{
todo_text: _('Add a to do'),
@@ -424,12 +386,6 @@ module IssuablesHelper
end
end
- def template_names_path(parent, issuable)
- return '' unless parent.is_a?(Project)
-
- project_template_names_path(parent, template_type: issuable.class.name.underscore)
- end
-
def issuable_sidebar_options(issuable)
{
endpoint: "#{issuable[:issuable_json_path]}?serializer=sidebar_extras",