_files.html.haml 1.22 KB
Newer Older
1
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
2 3 4
- commit = local_assigns.fetch(:commit) { @repository.commit }
- ref = local_assigns.fetch(:ref) { current_ref }
- project = local_assigns.fetch(:project) { @project }
Douwe Maan's avatar
Douwe Maan committed
5
- content_url = local_assigns.fetch(:content_url) { @tree.readme ? project_blob_path(@project, tree_join(@ref, @tree.readme.path)) : project_tree_path(@project, @ref) }
6
- show_auto_devops_callout = show_auto_devops_callout?(@project)
7
- vue_file_list = Feature.enabled?(:vue_file_list, @project)
8

9
#tree-holder.tree-holder.clearfix
10
  .nav-block
11 12
    = render 'projects/tree/tree_header', tree: @tree

13
  - if commit
14
    = render 'shared/commit_well', commit: commit, ref: ref, project: project
15

16
  - if is_project_overview
17
    .project-buttons.append-bottom-default{ class: ("js-hide-on-navigation" if vue_file_list) }
18 19
      = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout)

20 21 22 23 24 25
  - if vue_file_list
    #js-tree-list{ data: { project_path: @project.full_path, ref: ref } }
    - if @tree.readme
      = render "projects/tree/readme", readme: @tree.readme
  - else
    = render 'projects/tree/tree_content', tree: @tree, content_url: content_url