debian-mirror-gitlab/app/views/projects/tree/_tree.html.haml

54 lines
1.7 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
= 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
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, '#'
- if current_user && can_push_branch?(@project, @ref)
%li
2015-04-26 12:48:37 +05:30
= link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'New file', id: 'new-file-link' do
2014-09-02 18:07:02 +05:30
%small
2015-04-26 12:48:37 +05:30
%i.fa.fa-plus
2014-09-02 18:07:02 +05:30
%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-xs
.pull-left Last Commit
.last-commit.hidden-sm.pull-left
 
2015-04-26 12:48:37 +05:30
%i.fa.fa-angle-right
2014-09-02 18:07:02 +05:30
 
%small.light
2015-04-26 12:48:37 +05:30
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit)
2014-09-02 18:07:02 +05:30
–
= truncate(@commit.title, length: 50)
2015-04-26 12:48:37 +05:30
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right'
2014-09-02 18:07:02 +05:30
- if @path.present?
%tr.tree-item
%td.tree-item-file-name
2015-04-26 12:48:37 +05:30
= link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10'
2014-09-02 18:07:02 +05:30
%td
%td.hidden-xs
= render_tree(tree)
- if tree.readme
= render "projects/tree/readme", readme: tree.readme
%div.tree_progress
:javascript
// Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() {
ajaxGet('#{@logs_path}');
});