2017-01-29 14:38:00 -05:00
|
|
|
- environment = local_assigns.fetch(:environment, nil)
|
2016-12-26 05:47:16 -05:00
|
|
|
.diff-file.file-holder{ id: file_hash, data: diff_file_html_data(project, diff_file.file_path, diff_commit.id) }
|
2017-01-21 14:58:41 -05:00
|
|
|
.file-title
|
2016-11-13 13:18:03 -05:00
|
|
|
= render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "##{file_hash}"
|
2014-09-08 09:26:49 -04:00
|
|
|
|
2016-06-20 12:57:10 -04:00
|
|
|
- unless diff_file.submodule?
|
2017-01-18 17:48:51 -05:00
|
|
|
.file-actions.hidden-xs
|
2015-12-18 10:14:12 -05:00
|
|
|
- if blob_text_viewable?(blob)
|
2017-01-30 05:58:30 -05:00
|
|
|
= link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: "Toggle comments for this file", disabled: @diff_notes_disabled do
|
2016-03-31 14:37:27 -04:00
|
|
|
= icon('comment')
|
2016-01-21 16:46:49 -05:00
|
|
|
\
|
2016-07-30 00:04:04 -04:00
|
|
|
- if editable_diff?(diff_file)
|
2016-11-07 12:09:22 -05:00
|
|
|
- link_opts = @merge_request.persisted? ? { from_merge_request_iid: @merge_request.iid } : {}
|
2016-08-17 11:05:00 -04:00
|
|
|
= edit_blob_link(@merge_request.source_project, @merge_request.source_branch, diff_file.new_path,
|
|
|
|
blob: blob, link_opts: link_opts)
|
2014-09-08 09:26:49 -04:00
|
|
|
|
2016-07-20 12:25:36 -04:00
|
|
|
= view_file_btn(diff_commit.id, diff_file.new_path, project)
|
2017-01-29 14:38:00 -05:00
|
|
|
= view_on_environment_btn(diff_commit.id, diff_file.new_path, environment) if environment
|
2014-09-08 09:26:49 -04:00
|
|
|
|
2016-07-20 12:25:36 -04:00
|
|
|
= render 'projects/diffs/content', diff_file: diff_file, diff_commit: diff_commit, blob: blob, project: project
|