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
Léo-Paul Géneau
gitlab-ce
Commits
8592e992
Commit
8592e992
authored
Oct 10, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added copy file path button to diffs
Closes #23108
parent
4e963fed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
CHANGELOG
CHANGELOG
+1
-0
app/helpers/button_helper.rb
app/helpers/button_helper.rb
+2
-1
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+1
-1
No files found.
CHANGELOG
View file @
8592e992
...
...
@@ -26,6 +26,7 @@ v 8.13.0 (unreleased)
- Revert "Label list shows all issues (opened or closed) with that label"
- Expose expires_at field when sharing project on API
- Fix VueJS template tags being rendered in code comments
- Added copy file path button to merge request diff files
- Fix issue with page scrolling to top when closing or pinning sidebar (lukehowell)
- Add Issue Board API support (andrebsguedes)
- Allow the Koding integration to be configured through the API
...
...
app/helpers/button_helper.rb
View file @
8592e992
...
...
@@ -15,10 +15,11 @@ module ButtonHelper
#
# See http://clipboardjs.com/#usage
def
clipboard_button
(
data
=
{})
css_class
=
data
[
:class
]
||
'btn-clipboard'
data
=
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}.
merge
(
data
)
content_tag
:button
,
icon
(
'clipboard'
),
class:
"btn
btn-clipboard
"
,
class:
"btn
#{
css_class
}
"
,
data:
data
,
type: :button
,
title:
"Copy to Clipboard"
...
...
app/views/projects/diffs/_file.html.haml
View file @
8592e992
...
...
@@ -8,7 +8,7 @@
=
link_to
'#'
,
class:
'js-toggle-diff-comments btn active has-tooltip btn-file-option'
,
title:
"Toggle comments for this file"
,
disabled:
@diff_notes_disabled
do
=
icon
(
'comment'
)
\
=
clipboard_button
(
clipboard_text:
diff_file
.
new_path
,
class:
'btn-file-option'
)
-
if
editable_diff?
(
diff_file
)
-
link_opts
=
@merge_request
.
id
?
{
from_merge_request_id:
@merge_request
.
id
}
:
{}
=
edit_blob_link
(
@merge_request
.
source_project
,
@merge_request
.
source_branch
,
diff_file
.
new_path
,
...
...
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