BigW Consortium Gitlab

_file.html.haml 1.28 KB
Newer Older
1
- environment = local_assigns.fetch(:environment, nil)
Douwe Maan committed
2
- file_hash = hexdigest(diff_file.file_path)
3
.diff-file.file-holder{ id: file_hash, data: diff_file_html_data(project, diff_file.file_path, diff_file.content_sha) }
4
  .js-file-title.file-title-flex-parent
5
    .file-header-content
6
      = render "projects/diffs/file_header", diff_file: diff_file, url: "##{file_hash}"
7

8
    - unless diff_file.submodule?
9
      - blob = diff_file.blob
10
      .file-actions.hidden-xs
11
        - if blob.readable_text?
12
          = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: "Toggle comments for this file", disabled: @diff_notes_disabled do
13
            = icon('comment')
Douwe Maan committed
14
          \
15
          - if editable_diff?(diff_file)
16
            - link_opts = @merge_request.persisted? ? { from_merge_request_iid: @merge_request.iid } : {}
17 18
            = edit_blob_link(@merge_request.source_project, @merge_request.source_branch, diff_file.new_path,
                             blob: blob, link_opts: link_opts)
19

20 21
        = view_file_button(diff_file.content_sha, diff_file.file_path, project)
        = view_on_environment_button(diff_file.content_sha, diff_file.file_path, environment) if environment
22

23 24
  = render 'projects/fork_suggestion'

25
  = render 'projects/diffs/content', diff_file: diff_file