_file.html.haml 1.04 KB
Newer Older
1
.diff-file.file-holder{id: "diff-#{index}", data: diff_file_html_data(project, diff_file.file_path, diff_commit.id)}
Douwe Maan's avatar
Douwe Maan committed
2
  .file-title{id: "file-path-#{hexdigest(diff_file.file_path)}"}
Herminio Torres's avatar
Herminio Torres committed
3
    = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "#diff-#{index}"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4

5
    - unless diff_file.submodule?
Douwe Maan's avatar
Douwe Maan committed
6
      .file-actions.hidden-xs
7
        - if blob_text_viewable?(blob)
Annabel Dunstone's avatar
Annabel Dunstone committed
8
          = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip btn-file-option', title: "Toggle comments for this file" do
9
            = icon('comment')
Douwe Maan's avatar
Douwe Maan committed
10
          \
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11

12 13 14 15 16
          - if editable_diff?(diff_file)
            = edit_blob_link(@merge_request.source_project,
                @merge_request.source_branch, diff_file.new_path,
                from_merge_request_id: @merge_request.id,
                skip_visible_check: true)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17

18
        = view_file_btn(diff_commit.id, diff_file.new_path, project)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19

20
  = render 'projects/diffs/content', diff_file: diff_file, diff_commit: diff_commit, blob: blob, project: project