Commit 21b176e6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '6676-extract-ee-specific-files-lines-for-discussion-app-helpers' into 'master'

Resolve "Extract EE specific files/lines for Discussion app/helpers"

Closes #6676

See merge request gitlab-org/gitlab-ee!6891
parents 37d0c297 2dabc9c3
...@@ -254,7 +254,6 @@ module IssuablesHelper ...@@ -254,7 +254,6 @@ module IssuablesHelper
updateEndpoint: "#{issuable_path(issuable)}.json", updateEndpoint: "#{issuable_path(issuable)}.json",
canUpdate: can?(current_user, :"update_#{issuable.to_ability_name}", issuable), canUpdate: can?(current_user, :"update_#{issuable.to_ability_name}", issuable),
canDestroy: can?(current_user, :"destroy_#{issuable.to_ability_name}", issuable), canDestroy: can?(current_user, :"destroy_#{issuable.to_ability_name}", issuable),
canAdmin: can?(current_user, :"admin_#{issuable.to_ability_name}", issuable),
issuableRef: issuable.to_reference, issuableRef: issuable.to_reference,
markdownPreviewPath: preview_markdown_path(parent), markdownPreviewPath: preview_markdown_path(parent),
markdownDocsPath: help_page_path('user/markdown'), markdownDocsPath: help_page_path('user/markdown'),
...@@ -269,7 +268,6 @@ module IssuablesHelper ...@@ -269,7 +268,6 @@ module IssuablesHelper
if parent.is_a?(Group) if parent.is_a?(Group)
data[:groupPath] = parent.path data[:groupPath] = parent.path
data[:issueLinksEndpoint] = group_epic_issues_path(parent, issuable)
else else
data.merge!(projectPath: ref_project.path, projectNamespace: ref_project.namespace.full_path) data.merge!(projectPath: ref_project.path, projectNamespace: ref_project.namespace.full_path)
end end
......
...@@ -22,10 +22,6 @@ module SystemNoteHelper ...@@ -22,10 +22,6 @@ module SystemNoteHelper
'moved' => 'arrow-right', 'moved' => 'arrow-right',
'outdated' => 'pencil-square', 'outdated' => 'pencil-square',
'duplicate' => 'issue-duplicate', 'duplicate' => 'issue-duplicate',
'approved' => 'approval',
'unapproved' => 'unapproval',
'relate' => 'link',
'unrelate' => 'unlink',
'locked' => 'lock', 'locked' => 'lock',
'unlocked' => 'lock-open' 'unlocked' => 'lock-open'
}.freeze }.freeze
......
...@@ -9,5 +9,18 @@ module EE ...@@ -9,5 +9,18 @@ module EE
weightNoneValue: ::Issue::WEIGHT_NONE weightNoneValue: ::Issue::WEIGHT_NONE
) )
end end
override :issuable_initial_data
def issuable_initial_data(issuable)
data = super.merge(
canAdmin: can?(current_user, :"admin_#{issuable.to_ability_name}", issuable)
)
if parent.is_a?(Group)
data[:issueLinksEndpoint] = group_epic_issues_path(parent, issuable)
end
data
end
end end
end end
...@@ -3,6 +3,10 @@ module EE ...@@ -3,6 +3,10 @@ module EE
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
EE_ICON_NAMES_BY_ACTION = { EE_ICON_NAMES_BY_ACTION = {
'approved' => 'approval',
'unapproved' => 'unapproval',
'relate' => 'link',
'unrelate' => 'unlink',
'epic_issue_added' => 'issues', 'epic_issue_added' => 'issues',
'epic_issue_removed' => 'issues', 'epic_issue_removed' => 'issues',
'epic_issue_moved' => 'issues', 'epic_issue_moved' => 'issues',
......
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