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

55 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-01-26 22:13:19 +00:00
%ul.breadcrumb
2012-01-29 19:30:03 +00:00
%li
= link_to project_tree_path(@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), project_tree_path(@project, path)
- else
= link_to title, '#'
- if current_user && can_push_branch?(@project, @ref)
%li
= link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do
%small
%i.icon-plus.light
2012-10-02 07:26:24 +00:00
%div#tree-content-holder.tree-content-holder
%table#tree-slider{class: "table_#{@hex_path} tree-table" }
%thead
%tr
%th Name
%th Last Update
%th.hidden-sm
2013-04-19 06:33:56 +00:00
Last Commit
%span.last-commit
 
%i.icon-angle-right
 
%small.light
= link_to @commit.short_id, project_commit_path(@project, @commit)
–
= truncate(@commit.title, length: 50)
%th= link_to "history", project_commits_path(@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 "..", project_tree_path(@project, up_dir_path(tree)), class: 'prepend-left-10'
%td
%td
%td
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('#{@logs_path}');
});