debian-mirror-gitlab/app/views/projects/blob/_breadcrumb.html.haml

36 lines
1.3 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- blame = local_assigns.fetch(:blame, false)
.nav-block
.tree-ref-container
.tree-ref-holder
= render 'shared/ref_switcher', destination: 'blob', path: @path
%ul.breadcrumb.repo-breadcrumb
2018-11-08 19:23:39 +05:30
%li.breadcrumb-item
2017-09-10 17:25:29 +05:30
= link_to project_tree_path(@project, @ref) do
= @project.path
- path_breadcrumbs do |title, path|
- title = truncate(title, length: 40)
2018-11-08 19:23:39 +05:30
%li.breadcrumb-item
2017-09-10 17:25:29 +05:30
- if path == @path
= link_to project_blob_path(@project, tree_join(@ref, path)) do
%strong= title
- else
= link_to title, project_tree_path(@project, tree_join(@ref, path))
2020-03-09 13:42:32 +05:30
.tree-controls.gl-children-ml-sm-3<
2017-09-10 17:25:29 +05:30
= render 'projects/find_file_link'
2020-01-01 13:55:28 +05:30
-# only show normal/blame view links for text files
- if blob.readable_text?
- if blame
= link_to 'Normal view', project_blob_path(@project, @id),
class: 'btn'
- else
= link_to 'Blame', project_blame_path(@project, @id),
class: 'btn js-blob-blame-link' unless blob.empty?
2017-09-10 17:25:29 +05:30
2020-01-01 13:55:28 +05:30
= link_to 'History', project_commits_path(@project, @id),
class: 'btn'
2017-09-10 17:25:29 +05:30
2020-01-01 13:55:28 +05:30
= link_to 'Permalink', project_blob_path(@project,
tree_join(@commit.sha, @path)), class: 'btn js-data-file-blob-permalink-url'