Commit 60af91b4 authored by Florie Guibert's avatar Florie Guibert

Update scoped label documentation anchor link

parent eacfd911
...@@ -27,7 +27,7 @@ module EE ...@@ -27,7 +27,7 @@ module EE
weight_feature_available: current_board_parent.feature_available?(:issue_weights).to_s, weight_feature_available: current_board_parent.feature_available?(:issue_weights).to_s,
show_promotion: show_feature_promotion, show_promotion: show_feature_promotion,
scoped_labels: current_board_parent.feature_available?(:scoped_labels)&.to_s, scoped_labels: current_board_parent.feature_available?(:scoped_labels)&.to_s,
scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels') scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels-premium')
} }
super.merge(data) super.merge(data)
......
...@@ -45,7 +45,7 @@ module EE ...@@ -45,7 +45,7 @@ module EE
def label_dropdown_data(edit_context, opts = {}) def label_dropdown_data(edit_context, opts = {})
scoped_labels_fields = { scoped_labels_fields = {
scoped_labels: edit_context&.feature_available?(:scoped_labels)&.to_s, scoped_labels: edit_context&.feature_available?(:scoped_labels)&.to_s,
scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels') scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels-premium')
} }
return super.merge(scoped_labels_fields) unless edit_context.is_a?(Group) return super.merge(scoped_labels_fields) unless edit_context.is_a?(Group)
...@@ -74,7 +74,7 @@ module EE ...@@ -74,7 +74,7 @@ module EE
private private
def scoped_labels_doc_link def scoped_labels_doc_link
help_url = ::Gitlab::Routing.url_helpers.help_page_path('user/project/labels.md', anchor: 'scoped-labels') help_url = ::Gitlab::Routing.url_helpers.help_page_path('user/project/labels.md', anchor: 'scoped-labels-premium')
%(<a href="#{help_url}" class="gl-link gl-label-icon" target="_blank" rel="noopener"><i class="fa fa-question-circle"></i></a>).html_safe %(<a href="#{help_url}" class="gl-link gl-label-icon" target="_blank" rel="noopener"><i class="fa fa-question-circle"></i></a>).html_safe
end end
......
...@@ -79,7 +79,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated ...@@ -79,7 +79,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
toggle_subscription_path: toggle_subscription_group_epic_path(group, epic), toggle_subscription_path: toggle_subscription_group_epic_path(group, epic),
labels_web_url: group_labels_path(group), labels_web_url: group_labels_path(group),
epics_web_url: group_epics_path(group), epics_web_url: group_epics_path(group),
scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels') scoped_labels_documentation_link: help_page_path('user/project/labels.md', anchor: 'scoped-labels-premium')
} }
paths[:todo_delete_path] = dashboard_todo_path(epic_pending_todo) if epic_pending_todo.present? paths[:todo_delete_path] = dashboard_todo_path(epic_pending_todo) if epic_pending_todo.present?
......
- if @label.subject.feature_available?(:scoped_labels) - if @label.subject.feature_available?(:scoped_labels)
- docs_url = help_page_path('user/project/labels.md', anchor: 'scoped-labels') - docs_url = help_page_path('user/project/labels.md', anchor: 'scoped-labels-premium')
- docs_link_start = "<a href='#{docs_url}' target='_blank' rel='noreferrer noopener'>".html_safe - docs_link_start = "<a href='#{docs_url}' target='_blank' rel='noreferrer noopener'>".html_safe
- docs_link_end = '</a>'.html_safe - docs_link_end = '</a>'.html_safe
- docs_link_placeholders = { link_start: docs_link_start, - docs_link_placeholders = { link_start: docs_link_start,
......
...@@ -57,7 +57,7 @@ describe LabelsHelper do ...@@ -57,7 +57,7 @@ describe LabelsHelper do
show_any: "true", show_any: "true",
default_label: "Labels", default_label: "Labels",
scoped_labels: "false", scoped_labels: "false",
scoped_labels_documentation_link: "/help/user/project/labels.md#scoped-labels" scoped_labels_documentation_link: "/help/user/project/labels.md#scoped-labels-premium"
} }
end end
......
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