BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6c37e0f6
Commit
6c37e0f6
authored
Jun 17, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clipboard-buttons-fix' into 'master'
Fix clipboard buttons on "Check out branch" modal. Closes #18794 See merge request !4760
parents
04f72a3b
12b39524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
button_helper.rb
app/helpers/button_helper.rb
+10
-0
_how_to_merge.html.haml
...iews/projects/merge_requests/show/_how_to_merge.html.haml
+3
-3
No files found.
app/helpers/button_helper.rb
View file @
6c37e0f6
...
...
@@ -22,6 +22,16 @@ module ButtonHelper
type: :button
end
# Output a "Copy to Clipboard" button with a custom CSS class
#
# data - Data attributes passed to `content_tag`
# css_class - Class passed to the `content_tag`
#
# Examples:
#
# # Define the target element
# clipboard_button_with_class({clipboard_target: "div#foo"}, css_class: "btn-clipboard")
# # => "<button class='btn btn-clipboard' data-clipboard-target='div#foo'>...</button>"
def
clipboard_button_with_class
(
data
=
{},
css_class:
'btn-clipboard'
)
content_tag
:button
,
icon
(
'clipboard'
),
...
...
app/views/projects/merge_requests/show/_how_to_merge.html.haml
View file @
6c37e0f6
...
...
@@ -8,7 +8,7 @@
%p
%strong
Step 1.
Fetch and check out the branch for this merge request
=
clipboard_button
(
clipboard_target:
'pre#merge-info-1'
)
=
clipboard_button
_with_class
({
clipboard_target:
"pre#merge-info-1"
},
css_class:
"btn-clipboard"
)
%pre
.dark
#merge-info-1
-
if
@merge_request
.
for_fork?
:preserve
...
...
@@ -25,7 +25,7 @@
%p
%strong
Step 3.
Merge the branch and fix any conflicts that come up
=
clipboard_button
(
clipboard_target:
'pre#merge-info-3'
)
=
clipboard_button
_with_class
({
clipboard_target:
"pre#merge-info-3"
},
css_class:
"btn-clipboard"
)
%pre
.dark
#merge-info-3
-
if
@merge_request
.
for_fork?
:preserve
...
...
@@ -38,7 +38,7 @@
%p
%strong
Step 4.
Push the result of the merge to GitLab
=
clipboard_button
(
clipboard_target:
'pre#merge-info-4'
)
=
clipboard_button
_with_class
({
clipboard_target:
"pre#merge-info-4"
},
css_class:
"btn-clipboard"
)
%pre
.dark
#merge-info-4
:preserve
git push origin
#{
h
@merge_request
.
target_branch
}
...
...
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