debian-mirror-gitlab/app/views/projects/blob/_blob.html.haml

31 lines
1.5 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
= render "projects/blob/breadcrumb", blob: blob
2021-09-04 01:27:46 +05:30
- project = @project.present(current_user: current_user)
- ref = local_assigns[:ref] || @ref
2022-04-04 11:22:00 +05:30
- expanded = params[:expanded].present?
2022-08-13 15:12:31 +05:30
- if blob.rich_viewer
- add_page_startup_api_call local_assigns.fetch(:viewer_url) { url_for(safe_params.merge(viewer: blob.rich_viewer.type, format: :json)) }
2015-11-26 14:37:03 +05:30
2018-11-08 19:23:39 +05:30
.info-well.d-none.d-sm-block
2017-09-10 17:25:29 +05:30
.well-segment
%ul.blob-commit-info
= render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref
2014-09-02 18:07:02 +05:30
2022-11-25 23:54:43 +05:30
#js-code-owners{ data: { blob_path: blob.path, project_path: @project.full_path, branch: @ref } }
2017-09-10 17:25:29 +05:30
= render "projects/blob/auxiliary_viewer", blob: blob
2014-09-02 18:07:02 +05:30
2023-01-13 00:05:48 +05:30
#blob-content-holder.blob-content-holder.js-per-page{ data: { blame_per_page: Projects::BlameService::PER_PAGE } }
2020-04-22 19:07:51 +05:30
- if @code_navigation_path
#js-code-navigation{ data: { code_navigation_path: @code_navigation_path, blob_path: blob.path, definition_path_prefix: project_blob_path(@project, @ref) } }
2022-08-13 15:12:31 +05:30
- if !expanded
2021-09-04 01:27:46 +05:30
-# Data info will be removed once we migrate this to use GraphQL
-# Follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/330406
#js-view-blob-app{ data: { blob_path: blob.path,
project_path: @project.full_path,
target_branch: project.empty_repo? ? ref : @ref,
original_branch: @ref } }
2022-05-07 20:08:51 +05:30
= gl_loading_icon(size: 'md')
2021-04-29 21:17:54 +05:30
- else
%article.file-holder
= render 'projects/blob/header', blob: blob
= render 'projects/blob/content', blob: blob