2018-12-07 09:11:42 -05:00
|
|
|
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
|
2017-05-16 19:44:54 -04:00
|
|
|
- commit = local_assigns.fetch(:commit) { @repository.commit }
|
|
|
|
- ref = local_assigns.fetch(:ref) { current_ref }
|
|
|
|
- project = local_assigns.fetch(:project) { @project }
|
2017-08-03 08:29:35 -04:00
|
|
|
- content_url = local_assigns.fetch(:content_url) { @tree.readme ? project_blob_path(@project, tree_join(@ref, @tree.readme.path)) : project_tree_path(@project, @ref) }
|
2018-12-07 09:11:42 -05:00
|
|
|
- show_auto_devops_callout = show_auto_devops_callout?(@project)
|
2017-07-28 12:56:38 -04:00
|
|
|
|
2015-10-17 13:18:28 -04:00
|
|
|
#tree-holder.tree-holder.clearfix
|
2016-01-14 06:31:31 -05:00
|
|
|
.nav-block
|
2017-07-28 12:56:38 -04:00
|
|
|
= render 'projects/tree/tree_header', tree: @tree
|
|
|
|
|
2019-06-28 08:36:18 -04:00
|
|
|
- if vue_file_list_enabled?
|
|
|
|
#js-last-commit
|
|
|
|
- elsif commit
|
2017-07-28 13:18:00 -04:00
|
|
|
= render 'shared/commit_well', commit: commit, ref: ref, project: project
|
2017-07-28 12:56:38 -04:00
|
|
|
|
2018-12-07 09:11:42 -05:00
|
|
|
- if is_project_overview
|
2019-05-29 05:24:35 -04:00
|
|
|
.project-buttons.append-bottom-default{ class: ("js-keep-hidden-on-navigation" if vue_file_list_enabled?) }
|
2018-12-07 09:11:42 -05:00
|
|
|
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout)
|
|
|
|
|
2019-05-29 05:24:35 -04:00
|
|
|
- if vue_file_list_enabled?
|
|
|
|
#js-tree-list{ data: { project_path: @project.full_path, project_short_path: @project.path, ref: ref, full_name: @project.name_with_namespace } }
|
2019-07-10 08:17:45 -04:00
|
|
|
- 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'
|
2019-05-20 04:41:28 -04:00
|
|
|
- if @tree.readme
|
|
|
|
= render "projects/tree/readme", readme: @tree.readme
|
|
|
|
- else
|
|
|
|
= render 'projects/tree/tree_content', tree: @tree, content_url: content_url
|