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

38 lines
1.1 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
%ul.breadcrumb.repo-breadcrumb
%li
2015-04-26 12:48:37 +05:30
%i.fa.fa-angle-right
= link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
2014-09-02 18:07:02 +05:30
= @project.path
- tree_breadcrumbs(@tree, 6) do |title, path|
%li
- if path
- if path.end_with?(@path)
2015-04-26 12:48:37 +05:30
= link_to namespace_project_blob_path(@project.namespace, @project, path) do
2014-09-02 18:07:02 +05:30
%strong
= truncate(title, length: 40)
- else
2015-04-26 12:48:37 +05:30
= link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
2014-09-02 18:07:02 +05:30
- else
= link_to title, '#'
2015-09-25 12:07:36 +05:30
%ul.blob-commit-info.hidden-xs
2015-04-26 12:48:37 +05:30
- blob_commit = @repository.last_commit_for_path(@commit.id, blob.path)
2014-09-02 18:07:02 +05:30
= render blob_commit, project: @project
%div#tree-content-holder.tree-content-holder
%article.file-holder
2015-04-26 12:48:37 +05:30
.file-title
= blob_icon blob.mode, blob.name
%strong
2014-09-02 18:07:02 +05:30
= blob.name
2015-04-26 12:48:37 +05:30
%small
= number_to_human_size(blob.size)
.file-actions.hidden-xs
= render "actions"
2014-09-02 18:07:02 +05:30
- if blob.text?
= render "text", blob: blob
- elsif blob.image?
= render "image", blob: blob
- else
= render "download", blob: blob