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

57 lines
1.6 KiB
Text
Raw Normal View History

2012-01-26 17:13:19 -05:00
%ul.breadcrumb
2012-01-29 14:30:03 -05:00
%li
2013-03-14 13:50:57 -04:00
%i.icon-angle-right
= link_to project_tree_path(@project, @ref) do
2013-03-14 13:50:57 -04:00
= @project.path
- tree_breadcrumbs(tree, 6) do |title, path|
2013-01-03 14:09:18 -05:00
%li
- if path
= link_to truncate(title, length: 40), project_tree_path(@project, path)
- else
= link_to title, '#'
- if current_user && @repository.branch_names.include?(@ref) && current_user.can?(:push_code, @project)
%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 03:26:24 -04: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 02:33:56 -04: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 11:42:07 -05:00
2013-10-01 10:00:28 -04:00
- if @path.present?
%tr.tree-item
%td.tree-item-file-name
= image_tag "file_empty.png", size: '16x16'
= link_to "..", project_tree_path(@project, up_dir_path(tree))
%td
%td
%td
2011-10-08 17:36:38 -04:00
= render_tree(tree)
2011-10-08 17:36:38 -04:00
- if tree.readme
= render "projects/tree/readme", readme: tree.readme
2011-12-12 11:42:07 -05:00
%div.tree_progress
:javascript
// Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() {
ajaxGet('#{@logs_path}');
});