gitlab-org--gitlab-foss/app/views/projects/diffs/_file.html.haml

20 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-08-10 09:28:42 +00:00
.diff-file.file-holder{id: "diff-#{index}", data: diff_file_html_data(project, diff_file.file_path, diff_commit.id)}
2016-01-21 21:46:49 +00:00
.file-title{id: "file-path-#{hexdigest(diff_file.file_path)}"}
= render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "#diff-#{index}"
- unless diff_file.submodule?
2016-01-21 21:46:49 +00:00
.file-actions.hidden-xs
2015-12-18 15:14:12 +00:00
- if blob_text_viewable?(blob)
2016-04-01 19:27:39 +00:00
= link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip btn-file-option', title: "Toggle comments for this file" do
2016-03-31 18:37:27 +00:00
= icon('comment')
2016-01-21 21:46:49 +00:00
\
- 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,
blob: blob, link_opts: link_opts)
= view_file_btn(diff_commit.id, diff_file.new_path, project)
= render 'projects/diffs/content', diff_file: diff_file, diff_commit: diff_commit, blob: blob, project: project