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
981cde3f
Commit
981cde3f
authored
Jul 09, 2020
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a helper to inject data into epic form
parent
0d582137
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
ee/app/helpers/epics_helper.rb
ee/app/helpers/epics_helper.rb
+11
-0
ee/app/views/groups/epics/new.html.haml
ee/app/views/groups/epics/new.html.haml
+1
-1
No files found.
ee/app/helpers/epics_helper.rb
View file @
981cde3f
...
...
@@ -5,6 +5,17 @@ module EpicsHelper
EpicPresenter
.
new
(
epic
,
current_user:
current_user
).
show_data
(
author_icon:
avatar_icon_for_user
(
epic
.
author
),
base_data:
issuable_initial_data
(
epic
))
end
def
epic_new_app_data
(
group
)
{
group_path:
group
.
full_path
,
group_epics_path:
group_epics_path
(
group
),
labels_fetch_path:
group_labels_path
(
group
,
format: :json
,
only_group_labels:
true
,
include_ancestor_groups:
true
),
labels_manage_path:
group_labels_path
(
group
),
markdown_preview_path:
preview_markdown_path
(
group
),
markdown_docs_path:
help_page_path
(
'user/markdown'
)
}
end
def
epic_endpoint_query_params
(
opts
)
opts
[
:data
]
||=
{}
opts
[
:data
][
:endpoint_query_params
]
=
{
...
...
ee/app/views/groups/epics/new.html.haml
View file @
981cde3f
...
...
@@ -2,4 +2,4 @@
-
breadcrumb_title
_
(
"New"
)
-
page_title
_
(
"New epic"
)
.js-epic-new
{
data:
{
group_path:
@group
.
full_path
,
group_epics_path:
group_epics_path
(
@group
),
labels_fetch_path:
group_labels_path
(
@group
,
format: :json
,
only_group_labels:
true
,
include_ancestor_groups:
true
),
labels_manage_path:
group_labels_path
(
@group
),
markdown_preview_path:
preview_markdown_path
(
@group
),
markdown_docs_path:
help_page_path
(
'user/markdown'
)
}
}
.js-epic-new
{
data:
epic_new_app_data
(
@group
)
}
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