gitlab-org--gitlab-foss/app/views/projects/blob/_blob.html.haml

38 lines
1.1 KiB
Text
Raw Normal View History

%ul.breadcrumb.repo-breadcrumb
%li
2014-10-01 18:21:29 -04:00
%i.fa.fa-angle-right
= link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
= @project.path
- tree_breadcrumbs(@tree, 6) do |title, path|
%li
- if path
2013-05-08 14:27:43 -04:00
- if path.end_with?(@path)
= link_to namespace_project_blob_path(@project.namespace, @project, path) do
%strong
2013-05-08 14:27:43 -04:00
= truncate(title, length: 40)
- else
= link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
- else
= link_to title, '#'
%ul.blob-commit-info.hidden-xs
2014-09-27 16:05:02 -04:00
- blob_commit = @repository.last_commit_for_path(@commit.id, blob.path)
= render blob_commit, project: @project
%div#blob-content-holder.blob-content-holder
%article.file-holder
2015-03-13 22:20:25 -04:00
.file-title
2014-10-04 06:29:18 -04:00
= blob_icon blob.mode, blob.name
2015-03-13 22:20:25 -04:00
%strong
= blob.name
2015-03-13 22:20:25 -04:00
%small
= number_to_human_size(blob.size)
.file-actions.hidden-xs
= render "actions"
- if blob.text?
= render "text", blob: blob
- elsif blob.image?
= render "image", blob: blob
- else
= render "download", blob: blob