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
f49ac5c8
Commit
f49ac5c8
authored
Dec 15, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clipboard buttons on MR instructions and Commit#show
parent
a5a9cd30
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+1
-1
app/helpers/button_helper.rb
app/helpers/button_helper.rb
+2
-2
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+2
-2
app/views/projects/merge_requests/show/_how_to_merge.html.haml
...iews/projects/merge_requests/show/_how_to_merge.html.haml
+6
-6
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
f49ac5c8
...
...
@@ -191,7 +191,7 @@
.btn-clipboard
{
@extend
.pull-right
;
margin-right
:
18
px
;
margin-right
:
20
px
;
margin-top
:
5px
;
position
:
absolute
;
right
:
0
;
...
...
app/helpers/button_helper.rb
View file @
f49ac5c8
...
...
@@ -10,8 +10,8 @@ module ButtonHelper
# # => "<button class='...' data-clipboard-text='Foo'>...</button>"
#
# # Define the target element
# clipboard_button(clipboard_target: "#foo")
# # => "<button class='...' data-clipboard-target='#foo'>...</button>"
# clipboard_button(clipboard_target: "
div
#foo")
# # => "<button class='...' data-clipboard-target='
div
#foo'>...</button>"
#
# See http://clipboardjs.com/#usage
def
clipboard_button
(
data
=
{})
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
f49ac5c8
...
...
@@ -20,8 +20,8 @@
%p
%span
.light
Commit
=
link_to
@commit
.
id
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
),
class:
"monospace"
,
data:
{
clipboard_text:
@commit
.
id
}
=
clipboard_button
=
link_to
@commit
.
id
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
),
class:
"monospace"
=
clipboard_button
(
clipboard_text:
@commit
.
id
)
.commit-info-row
%span
.light
Authored by
%strong
...
...
app/views/projects/merge_requests/show/_how_to_merge.html.haml
View file @
f49ac5c8
...
...
@@ -8,8 +8,8 @@
%p
%strong
Step 1.
Fetch and check out the branch for this merge request
=
clipboard_button
%pre
.dark
=
clipboard_button
(
clipboard_target:
'pre#merge-info-1'
)
%pre
.dark
#merge-info-1
-
if
@merge_request
.
for_fork?
:preserve
git fetch
#{
h
@merge_request
.
source_project
.
http_url_to_repo
}
#{
h
@merge_request
.
source_branch
}
...
...
@@ -25,8 +25,8 @@
%p
%strong
Step 3.
Merge the branch and fix any conflicts that come up
=
clipboard_button
%pre
.dark
=
clipboard_button
(
clipboard_target:
'pre#merge-info-3'
)
%pre
.dark
#merge-info-3
-
if
@merge_request
.
for_fork?
:preserve
git checkout
#{
h
@merge_request
.
target_branch
}
...
...
@@ -38,8 +38,8 @@
%p
%strong
Step 4.
Push the result of the merge to GitLab
=
clipboard_button
%pre
.dark
=
clipboard_button
(
clipboard_target:
'pre#merge-info-4'
)
%pre
.dark
#merge-info-4
:preserve
git push origin
#{
h
@merge_request
.
target_branch
}
-
unless
@merge_request
.
can_be_merged_by?
(
current_user
)
...
...
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