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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ccd2a8d6
Commit
ccd2a8d6
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
Show a tooltip on revert link.
parent
477ae66b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+5
-7
app/views/projects/commit/_revert.html.haml
app/views/projects/commit/_revert.html.haml
+1
-1
No files found.
app/helpers/commits_helper.rb
View file @
ccd2a8d6
...
...
@@ -127,12 +127,10 @@ module CommitsHelper
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-close btn-
#{
btn_class
}
"
,
title:
'Create merge request to revert commit'
)
content_tag
:span
,
'data-toggle'
=>
'modal'
,
'data-target'
=>
'#modal-revert-commit'
do
link_to
'Revert'
,
'#modal-revert-commit'
,
'data-toggle'
=>
'tooltip'
,
'data-original-title'
=>
'Create merge request to revert commit'
,
class:
"btn btn-close btn-
#{
btn_class
}
"
end
else
continue_params
=
{
to:
continue_to_path
,
...
...
@@ -145,7 +143,7 @@ module CommitsHelper
)
link_to
'Revert'
,
fork_path
,
class:
'btn btn-grouped btn-close'
,
method: :post
,
title:
'Create merge request to revert commit'
'data-toggle'
=>
'tooltip'
,
'data-original-title'
=>
'Create merge request to revert commit'
end
end
...
...
app/views/projects/commit/_revert.html.haml
View file @
ccd2a8d6
...
...
@@ -7,7 +7,7 @@
.modal-body
=
form_tag
revert_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
commit_id
),
method: :post
,
remote:
false
,
class:
'form-horizontal js-create-dir-form js-requires-input'
do
.form-group.branch
=
label_tag
'target_branch'
,
'
Target branch
'
,
class:
'control-label'
=
label_tag
'target_branch'
,
'
Revert in branch:
'
,
class:
'control-label'
.col-sm-10
=
select_tag
"target_branch"
,
grouped_options_refs
,
class:
"select2 select2-sm js-target-branch"
-
if
can?
(
current_user
,
:push_code
,
@project
)
...
...
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