2017-09-10 17:25:29 +05:30
|
|
|
- blame = local_assigns.fetch(:blame, false)
|
|
|
|
.nav-block
|
|
|
|
.tree-ref-container
|
|
|
|
.tree-ref-holder
|
2023-05-27 22:25:52 +05:30
|
|
|
#js-tree-ref-switcher{ data: { project_id: @project.id, project_root_path: project_path(@project), ref: current_ref, ref_type: @ref_type.to_s } }
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
%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-13 15:44:24 +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),
|
2021-03-11 19:13:27 +05:30
|
|
|
class: 'gl-button btn btn-default'
|
2020-01-01 13:55:28 +05:30
|
|
|
- else
|
|
|
|
= link_to 'Blame', project_blame_path(@project, @id),
|
2021-03-11 19:13:27 +05:30
|
|
|
class: 'gl-button btn btn-default 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),
|
2021-03-11 19:13:27 +05:30
|
|
|
class: 'gl-button btn btn-default'
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
= link_to 'Permalink', project_blob_path(@project,
|
2021-03-11 19:13:27 +05:30
|
|
|
tree_join(@commit.sha, @path)), class: 'gl-button btn btn-default js-data-file-blob-permalink-url'
|