2020-07-28 23:09:34 +05:30
|
|
|
- page_title _("Blame"), @blob.path, @ref
|
2022-11-25 23:54:43 +05:30
|
|
|
- add_page_specific_style 'page_bundles/tree'
|
2023-06-20 00:43:36 +05:30
|
|
|
- blame_streaming_url = blame_pages_streaming_url(@id, @project)
|
|
|
|
|
|
|
|
- if @blame_mode.streaming? && @blame_pagination.total_extra_pages > 0
|
2023-05-27 22:25:52 +05:30
|
|
|
- content_for :startup_js do
|
|
|
|
= javascript_tag do
|
|
|
|
:plain
|
|
|
|
window.blamePageStream = (() => {
|
2023-06-20 00:43:36 +05:30
|
|
|
const url = new URL("#{blame_streaming_url}");
|
2023-05-27 22:25:52 +05:30
|
|
|
url.searchParams.set('page', 2);
|
|
|
|
return fetch(url).then(response => response.body);
|
|
|
|
})();
|
2023-06-20 00:43:36 +05:30
|
|
|
- dataset = { testid: 'blob-content-holder', qa_selector: 'blame_file_content', per_page: @blame_pagination.per_page, total_extra_pages: @blame_pagination.total_extra_pages - 1, pages_url: blame_streaming_url }
|
2015-09-25 12:07:36 +05:30
|
|
|
|
2023-04-23 21:23:45 +05:30
|
|
|
#blob-content-holder.tree-holder.js-per-page{ data: dataset }
|
2019-12-04 20:38:33 +05:30
|
|
|
= render "projects/blob/breadcrumb", blob: @blob, blame: true
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2023-04-23 21:23:45 +05:30
|
|
|
.file-holder
|
2019-12-04 20:38:33 +05:30
|
|
|
= render "projects/blob/header", blob: @blob, blame: true
|
2021-04-17 20:07:23 +05:30
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
.file-blame-legend
|
2021-04-17 20:07:23 +05:30
|
|
|
%span.left-label Newer
|
|
|
|
%span.legend-box.legend-box-0
|
|
|
|
%span.legend-box.legend-box-1
|
|
|
|
%span.legend-box.legend-box-2
|
|
|
|
%span.legend-box.legend-box-3
|
|
|
|
%span.legend-box.legend-box-4
|
|
|
|
%span.legend-box.legend-box-5
|
|
|
|
%span.legend-box.legend-box-6
|
|
|
|
%span.legend-box.legend-box-7
|
|
|
|
%span.legend-box.legend-box-8
|
|
|
|
%span.legend-box.legend-box-9
|
|
|
|
%span.right-label Older
|
|
|
|
|
2023-04-23 21:23:45 +05:30
|
|
|
.table-responsive.blame-table
|
|
|
|
.blame-table-wrapper
|
|
|
|
= render partial: 'page'
|
2022-07-16 23:28:13 +05:30
|
|
|
|
2023-06-20 00:43:36 +05:30
|
|
|
- if @blame_mode.streaming?
|
2023-05-27 22:25:52 +05:30
|
|
|
#blame-stream-container.blame-stream-container
|
|
|
|
|
2023-06-20 00:43:36 +05:30
|
|
|
- if @blame_mode.pagination? && @blame_pagination.total_pages > 1
|
2022-10-11 01:57:18 +05:30
|
|
|
.gl-display-flex.gl-justify-content-center.gl-flex-direction-column.gl-align-items-center.gl-p-3.gl-bg-gray-50.gl-border-t-solid.gl-border-t-1.gl-border-gray-100
|
2023-06-20 00:43:36 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(href: entire_blame_path(@id, @project, @blame_mode), size: :small, button_options: { class: 'gl-mt-3' }) do |c|
|
2023-05-27 22:25:52 +05:30
|
|
|
= _('Show full blame')
|
|
|
|
|
2023-06-20 00:43:36 +05:30
|
|
|
- if @blame_mode.streaming?
|
2023-05-27 22:25:52 +05:30
|
|
|
#blame-stream-loading.blame-stream-loading
|
|
|
|
.gradient
|
|
|
|
= gl_loading_icon(size: 'sm')
|
|
|
|
%span.gl-mx-2
|
|
|
|
= _('Loading full blame...')
|
2022-10-11 01:57:18 +05:30
|
|
|
|
2023-06-20 00:43:36 +05:30
|
|
|
- if @blame_mode.pagination?
|
|
|
|
= paginate(@blame_pagination.paginator, theme: "gitlab")
|