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
c53f2d8e
Commit
c53f2d8e
authored
Jul 03, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert parent param removal
parent
55dd0d72
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
9 deletions
+11
-9
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects/merge_requests/application_controller.rb
...rollers/projects/merge_requests/application_controller.rb
+1
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+4
-2
app/views/shared/issuable/_close_reopen_button.html.haml
app/views/shared/issuable/_close_reopen_button.html.haml
+3
-3
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
...ews/shared/issuable/_close_reopen_report_toggle.html.haml
+2
-2
No files found.
app/controllers/projects/issues_controller.rb
View file @
c53f2d8e
...
...
@@ -271,7 +271,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def
issue_params
params
.
permit
(
*
issue_params_attributes
)
params
.
require
(
:issue
).
permit
(
*
issue_params_attributes
)
end
def
issue_params_attributes
...
...
app/controllers/projects/merge_requests/application_controller.rb
View file @
c53f2d8e
...
...
@@ -17,7 +17,7 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont
end
def
merge_request_params
params
.
permit
(
merge_request_params_attributes
)
params
.
require
(
:merge_request
).
permit
(
merge_request_params_attributes
)
end
def
merge_request_params_attributes
...
...
app/helpers/issuables_helper.rb
View file @
c53f2d8e
...
...
@@ -247,7 +247,8 @@ module IssuablesHelper
def
close_issuable_url
(
issuable
)
params
=
{}
params
[
:state_event
]
=
:close
params
[
issuable
.
model_name
.
to_s
.
underscore
]
=
{}
params
[
issuable
.
model_name
.
to_s
.
underscore
][
:state_event
]
=
:close
params
[
:format
]
=
:json
if
issuable
.
is_a?
(
Issue
)
issuable_url
(
issuable
,
params
)
...
...
@@ -255,7 +256,8 @@ module IssuablesHelper
def
reopen_issuable_url
(
issuable
)
params
=
{}
params
[
:state_event
]
=
:reopen
params
[
issuable
.
model_name
.
to_s
.
underscore
]
=
{}
params
[
issuable
.
model_name
.
to_s
.
underscore
][
:state_event
]
=
:reopen
params
[
:format
]
=
:json
if
issuable
.
is_a?
(
Issue
)
issuable_url
(
issuable
,
params
)
...
...
app/views/shared/issuable/_close_reopen_button.html.haml
View file @
c53f2d8e
-
is_current_user
=
current_user
==
issuable
.
author
-
display_issuable_type
=
issuable
.
model_name
.
human
.
downcase
-
button_method
=
issuable
.
is_a?
(
MergeRequest
)
?
'put'
:
''
-
button_method
=
issuable
.
is_a?
(
MergeRequest
)
?
:put
:
nil
-
if
can_update
&&
is_current_user
=
link_to
"Close
#{
display_issuable_type
}
"
,
close_issuable_url
(
issuable
),
{
method:
button_method
,
class:
"hidden-xs hidden-sm btn btn-close btn-grouped
#{
'hidden'
if
issuable
.
closed?
}
"
,
title:
"Close
#{
display_issuable_type
}
"
}
=
link_to
"Reopen
#{
display_issuable_type
}
"
,
reopen_issuable_url
(
issuable
),
{
method:
button_method
,
class:
"hidden-xs hidden-sm btn btn-reopen btn-grouped
#{
'hidden'
unless
issuable
.
closed?
}
"
,
title:
"Reopen
#{
display_issuable_type
}
"
}
=
link_to
"Close
#{
display_issuable_type
}
"
,
close_issuable_url
(
issuable
),
method:
button_method
,
class:
"hidden-xs hidden-sm btn btn-close btn-grouped
#{
'hidden'
if
issuable
.
closed?
}
"
,
title:
"Close
#{
display_issuable_type
}
"
=
link_to
"Reopen
#{
display_issuable_type
}
"
,
reopen_issuable_url
(
issuable
),
method:
button_method
,
class:
"hidden-xs hidden-sm btn btn-reopen btn-grouped
#{
'hidden'
unless
issuable
.
closed?
}
"
,
title:
"Reopen
#{
display_issuable_type
}
"
-
elsif
can_update
&&
!
is_current_user
=
render
'shared/issuable/close_reopen_report_toggle'
,
issuable:
issuable
-
else
...
...
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
View file @
c53f2d8e
...
...
@@ -4,10 +4,10 @@
-
button_responsive_class
=
'hidden-xs hidden-sm'
-
button_class
=
"
#{
button_responsive_class
}
btn btn-grouped js-issuable-close-button issuable-close-button"
-
toggle_class
=
"
#{
button_responsive_class
}
btn btn-nr dropdown-toggle js-issuable-close-toggle"
-
button_method
=
issuable
.
is_a?
(
MergeRequest
)
?
'put'
:
''
-
button_method
=
issuable
.
is_a?
(
MergeRequest
)
?
:put
:
nil
.pull-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
=
link_to
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
close_reopen_issuable_url
(
issuable
),
{
method:
button_method
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
}
=
link_to
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
close_reopen_issuable_url
(
issuable
),
method:
button_method
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
=
button_tag
type:
'button'
,
class:
"
#{
toggle_class
}
btn-
#{
button_action
}
-color"
,
data:
{
'dropdown-trigger'
=>
'#issuable-close-menu'
},
'aria-label'
=>
'Toggle dropdown'
do
=
icon
(
'caret-down'
,
class:
'toggle-icon icon'
)
...
...
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