debian-mirror-gitlab/app/views/projects/blame/show.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
2.8 KiB
Text
Raw Normal View History

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'
2015-09-25 12:07:36 +05:30
2022-11-25 23:54:43 +05:30
#blob-content-holder.tree-holder.js-per-page{ data: { testid: 'blob-content-holder', per_page: @blame_per_page } }
2019-12-04 20:38:33 +05:30
= render "projects/blob/breadcrumb", blob: @blob, blame: true
2017-09-10 17:25:29 +05:30
2022-10-11 01:57:18 +05:30
.file-holder.gl-overflow-hidden
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
2022-10-11 01:57:18 +05:30
.table-responsive.file-content.blame.code{ class: "#{user_color_scheme} gl-rounded-0!", data: { qa_selector: 'blame_file_content' } }
2019-12-04 20:38:33 +05:30
%table
2022-06-21 17:19:12 +05:30
- current_line = @blame.first_line
2020-06-23 00:09:42 +05:30
- @blame.groups.each do |blame_group|
- commit_data = @blame.commit_data(blame_group[:commit])
2021-04-17 20:07:23 +05:30
- line_count = blame_group[:lines].count
2022-01-26 12:08:38 +05:30
%tr{ style: intrinsic_row_css(line_count) }
2021-04-17 20:07:23 +05:30
%td.blame-commit{ class: commit_data.age_map_class }
.commit
= commit_data.author_avatar
.commit-row-title
%span.item-title.str-truncated-100
= commit_data.commit_link
%span
= commit_data.project_blame_link
 
.light
= commit_data.commit_author_link
= _('committed')
#{commit_data.time_ago_tooltip}
%td.line-numbers
- (current_line...(current_line + line_count)).each do |i|
%a.diff-line-num.gl-justify-content-end{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i, class: "gl-display-flex!" }
2021-09-30 23:02:18 +05:30
.file-line-num
= i
2021-04-17 20:07:23 +05:30
\
2020-06-23 00:09:42 +05:30
2021-10-27 15:23:28 +05:30
%td.lines.gl-w-full
2021-04-17 20:07:23 +05:30
%pre.code.highlight
%code
- blame_group[:lines].each do |line|
#{line}
2020-06-23 00:09:42 +05:30
2021-04-17 20:07:23 +05:30
- current_line += line_count
2022-07-16 23:28:13 +05:30
2022-10-11 01:57:18 +05:30
- if @blame_pagination && @blame_pagination.total_pages > 1
.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
= _('For faster browsing, not all history is shown.')
= render Pajamas::ButtonComponent.new(href: namespace_project_blame_path(namespace_id: @project.namespace, project_id: @project, id: @id, no_pagination: true), size: :small, button_options: { class: 'gl-mt-3' }) do |c|
= _('View entire blame')
- if @blame_pagination
= paginate(@blame_pagination, theme: "gitlab")