Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
91c1fa7c
Commit
91c1fa7c
authored
Jun 25, 2020
by
Axel García
Committed by
Miguel Rincon
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly add initial data to the epic presenter
parent
07290d35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
ee/app/helpers/epics_helper.rb
ee/app/helpers/epics_helper.rb
+5
-1
ee/app/presenters/epic_presenter.rb
ee/app/presenters/epic_presenter.rb
+1
-2
No files found.
ee/app/helpers/epics_helper.rb
View file @
91c1fa7c
# frozen_string_literal: true
# frozen_string_literal: true
module
EpicsHelper
module
EpicsHelper
def
epic_initial_data
(
epic
)
issuable_initial_data
(
epic
).
merge
(
canCreate:
can?
(
current_user
,
:create_epic
,
epic
.
group
))
end
def
epic_show_app_data
(
epic
)
def
epic_show_app_data
(
epic
)
EpicPresenter
.
new
(
epic
,
current_user:
current_user
).
show_data
(
author_icon:
avatar_icon_for_user
(
epic
.
author
),
base_data:
issuable
_initial_data
(
epic
))
EpicPresenter
.
new
(
epic
,
current_user:
current_user
).
show_data
(
author_icon:
avatar_icon_for_user
(
epic
.
author
),
base_data:
epic
_initial_data
(
epic
))
end
end
def
epic_new_app_data
(
group
)
def
epic_new_app_data
(
group
)
...
...
ee/app/presenters/epic_presenter.rb
View file @
91c1fa7c
...
@@ -44,8 +44,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
...
@@ -44,8 +44,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
def
initial_data
def
initial_data
{
{
labels:
epic
.
labels
,
labels:
epic
.
labels
,
subscribed:
subscribed?
,
subscribed:
subscribed?
canCreate:
can?
(
current_user
,
:create_epic
,
epic
)
}
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment