gitlab-org--gitlab-foss/app/views/projects/tree/_tree_content.html.haml
Filipa Lacerda 26faaa77ca Moves method to TreeHelper
Reuses existing TreeHelper instead of creating a new one just for one
method.
2019-07-11 20:38:19 +00:00

24 lines
980 B
Text

.tree-content-holder.js-tree-content{ data: tree_content_data(@logs_path, @project, @path) }
.table-holder.bordered-box
%table.table#tree-slider{ class: "table_#{@hex_path} tree-table qa-file-tree" }
%thead
%tr
%th= s_('ProjectFileTree|Name')
%th.d-none.d-sm-table-cell
.float-left= _('Last commit')
%th.text-right= _('Last update')
- if @path.present?
%tr.tree-item
%td.tree-item-file-name
= link_to "..", project_tree_path(@project, up_dir_path), class: 'prepend-left-10'
%td
%td.d-none.d-sm-table-cell
= render_tree(tree)
- if tree.readme
= render "projects/tree/readme", readme: tree.readme
- if can_edit_tree?
= render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, @id), method: :post
= render 'projects/blob/new_dir'