summaryrefslogtreecommitdiff
path: root/app/views/projects/_files.html.haml
blob: 8642dc5fc8c953993d14da72387bc93a07131364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
- ref = local_assigns.fetch(:ref) { current_ref }
- project = local_assigns.fetch(:project) { @project }
- show_auto_devops_callout = show_auto_devops_callout?(@project)
- add_page_startup_api_call logs_file_project_ref_path(@project, ref, @path, format: "json", offset: 0)
- if readme_path = @project.repository.readme_path
  - add_page_startup_api_call project_blob_path(@project, tree_join(@ref, readme_path), viewer: "rich", format: "json")

#tree-holder.tree-holder.clearfix
  .nav-block.gl-display-flex.gl-align-items-center
    = render 'projects/tree/tree_header', tree: @tree

  #js-last-commit
    .info-well.gl-display-none.gl-sm-display-flex.project-last-commit
      .gl-spinner-container.m-auto
        = loading_icon(size: 'md', color: 'dark', css_class: 'align-text-bottom')

  - if is_project_overview
    .project-buttons.gl-mb-3.js-show-on-project-root
      = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true

  #js-tree-list{ data: vue_file_list_data(project, ref) }
  - if can_edit_tree?
    = render 'projects/blob/new_dir'