gitlab-org--gitlab-foss/app/views/projects/tree/_tree.html.haml

54 lines
1.8 KiB
Plaintext
Raw Normal View History

%ul.breadcrumb.repo-breadcrumb
2012-01-29 19:30:03 +00:00
%li
= link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
2013-03-14 17:50:57 +00:00
= @project.path
- tree_breadcrumbs(tree, 6) do |title, path|
2013-01-03 19:09:18 +00:00
%li
- if path
= link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
2013-01-03 19:09:18 +00:00
- else
= link_to title, '#'
- if current_user && can_push_branch?(@project, @ref)
%li
= link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'New file', id: 'new-file-link' do
%small
2014-10-01 22:21:29 +00:00
%i.fa.fa-plus
%div#tree-content-holder.tree-content-holder.prepend-top-20
%table#tree-slider{class: "table_#{@hex_path} tree-table" }
%thead
%tr
%th Name
%th Last Update
%th.hidden-xs
.pull-left Last Commit
.last-commit.hidden-sm.pull-left
 
2014-10-01 22:21:29 +00:00
%i.fa.fa-angle-right
 
%small.light
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit)
–
= truncate(@commit.title, length: 50)
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right'
2011-12-12 16:42:07 +00:00
2013-10-01 14:00:28 +00:00
- if @path.present?
%tr.tree-item
%td.tree-item-file-name
= link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10'
%td
%td.hidden-xs
2011-10-08 21:36:38 +00:00
= render_tree(tree)
2011-10-08 21:36:38 +00:00
- if tree.readme
= render "projects/tree/readme", readme: tree.readme
2011-12-12 16:42:07 +00:00
%div.tree_progress
:javascript
// Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() {
ajaxGet("#{escape_javascript(@logs_path)}");
});