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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
477ae66b
Commit
477ae66b
authored
Feb 10, 2016
by
Rubén Dávila
Committed by
Robert Speicher
Feb 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move revert link to the MR widget section plus some refactor.
parent
2ea5b37f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+2
-2
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+0
-3
app/views/projects/merge_requests/widget/_merged.html.haml
app/views/projects/merge_requests/widget/_merged.html.haml
+2
-0
No files found.
app/helpers/commits_helper.rb
View file @
477ae66b
...
...
@@ -123,14 +123,14 @@ module CommitsHelper
)
end
def
revert_commit_link
(
show_modal_condition
,
continue_to_path
)
def
revert_commit_link
(
show_modal_condition
,
continue_to_path
,
btn_class:
nil
)
return
unless
current_user
if
show_modal_condition
link_to
(
'Revert'
,
'#modal-revert-commit'
,
'data-target'
=>
'#modal-revert-commit'
,
'data-toggle'
=>
'modal'
,
class:
'btn btn-grouped btn-close'
,
class:
"btn btn-close btn-
#{
btn_class
}
"
,
title:
'Create merge request to revert commit'
)
else
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
477ae66b
...
...
@@ -18,6 +18,3 @@
Edit
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
'btn btn-nr btn-grouped btn-reopen reopen-mr-link'
,
title:
"Reopen merge request"
-
if
@merge_request
.
merged?
&&
@merge_request
.
merge_commit_sha
.
present?
=
revert_commit_link
(
can_update_merge_request?
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
))
app/views/projects/merge_requests/widget/_merged.html.haml
View file @
477ae66b
...
...
@@ -6,6 +6,8 @@
-
if
@merge_request
.
merge_event
by
#{
link_to_member
(
@project
,
@merge_request
.
merge_event
.
author
,
avatar:
true
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
merge_event
.
created_at
)
}
-
if
@merge_request
.
merge_commit_sha
.
present?
=
revert_commit_link
(
can_update_merge_request?
,
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
btn_class:
'sm'
)
%div
-
if
!
@merge_request
.
source_branch_exists?
||
(
params
[
:delete_source
]
==
'true'
)
The changes were merged into
...
...
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