File: _breadcrumb.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (38 lines) | stat: -rw-r--r-- 1,978 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- blame = local_assigns.fetch(:blame, false)
.nav-block
  .tree-ref-container
    .tree-ref-holder.gl-max-w-26
      #js-tree-ref-switcher{ data: { project_id: @project.id, project_root_path: project_path(@project), ref: current_ref, ref_type: @ref_type.to_s } }

    %ul.breadcrumb.repo-breadcrumb
      %li.breadcrumb-item
        = link_to project_tree_path(@project, @ref, ref_type: @ref_type) do
          = @project.path
      - path_breadcrumbs do |title, path|
        - title = truncate(title, length: 40)
        %li.breadcrumb-item
          - if path == @path
            = link_to project_blob_path(@project, tree_join(@ref, path), ref_type: @ref_type) do
              %strong= title
          - else
            = link_to title, project_tree_path(@project, tree_join(@ref, path), ref_type: @ref_type)

  .tree-controls.gl-flex.gl-flex-wrap.sm:gl-flex-nowrap.gl-items-baseline.gl-gap-3
    = render 'projects/find_file_link'
    -# only show normal/blame view links for text files
    - if blob.readable_text?
      - if blame
        = link_button_to _('Normal view'), project_blob_path(@project, @id, ref_type: @ref_type)
      - else
        = link_button_to _('Blame'), project_blame_path(@project, @id, ref_type: @ref_type), data: { event_tracking: 'click_blame_control_on_blob_page' }, class: 'js-blob-blame-link' unless blob.empty?

    = link_button_to _('History'), project_commits_path(@project, @id, ref_type: @ref_type), data: { event_tracking: 'click_history_control_on_blob_page' }

    - permalink_description = _('Go to permalink')
    - permalink_shortcut = 'y'
    - permalink_title = "#{permalink_description} <kbd class='flat ml-1' aria-hidden=true>#{permalink_shortcut}</kbd>"
    = link_button_to _('Permalink'), project_blob_path(@project, tree_join(@commit.sha, @path)),
        'aria-keyshortcuts': permalink_shortcut,
        class: 'has-tooltip js-data-file-blob-permalink-url',
        'data-html': true,
        title: permalink_title