Welcome to mirror list, hosted at ThFree Co, Russian Federation.

show.html.haml « blame « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b17207c0da68814d9314b6aa5779e97eac595a04 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- project_duration = age_map_duration(@blame_groups, @project)
- page_title "Blame", @blob.path, @ref

#blob-content-holder.tree-holder
  = render "projects/blob/breadcrumb", blob: @blob, blame: true

  .file-holder
    = render "projects/blob/header", blob: @blob, blame: true
    .file-blame-legend
      = render 'age_map_legend'
    .table-responsive.file-content.blame.code.js-syntax-highlight
      %table
        - current_line = 1
        - @blame_groups.each do |blame_group|
          %tr
            - commit = blame_group[:commit]
            %td.blame-commit{ class: age_map_class(commit.committed_date, project_duration) }
              .commit
                = author_avatar(commit, size: 36, has_tooltip: false)
                .commit-row-title
                  %span.item-title.str-truncated-100
                    = link_to commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title
                  %span
                    - previous_commit_id = commit.parent_id
                    - if previous_commit_id
                      = link_to project_blame_path(@project, tree_join(previous_commit_id, @path)),
                                title: _('View blame prior to this change'),
                                aria: { label: _('View blame prior to this change') },
                                data: { toggle: 'tooltip', placement: 'right', container: 'body' } do
                        = sprite_icon('doc-versions', size: 16, css_class: 'doc-versions align-text-bottom')
                   
                .light
                  = commit_author_link(commit, avatar: false)
                  committed
                  #{time_ago_with_tooltip(commit.committed_date)}
            %td.line-numbers
              - line_count = blame_group[:lines].count
              - (current_line...(current_line + line_count)).each do |i|
                %a.diff-line-num{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i }
                  = icon("link")
                  = i
                \
              - current_line += line_count
            %td.lines
              %pre.code.highlight
                %code
                  - blame_group[:lines].each do |line|
                    #{line}