summaryrefslogtreecommitdiff
path: root/app/views/projects/blame/show.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/blame/show.html.haml')
-rw-r--r--app/views/projects/blame/show.html.haml16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index a6ee2b2f7b8..c7359d873d9 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -1,5 +1,6 @@
- @no_container = true
-- page_title "Annotate", @blob.path, @ref
+- project_duration = age_map_duration(@blame_groups, @project)
+- page_title "Blame", @blob.path, @ref
= render "projects/commits/head"
%div{ class: container_class }
@@ -8,21 +9,22 @@
.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
- %td.blame-commit
+ - commit = blame_group[:commit]
+ %td.blame-commit{ class: age_map_class(commit.committed_date, project_duration) }
.commit
- - commit = blame_group[:commit]
= author_avatar(commit, size: 36)
.commit-row-title
- %strong
- = link_to_gfm truncate(commit.title, length: 35), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "cdark"
+ %span.item-title.str-truncated-100
+ = link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title
.pull-right
- = link_to commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit), class: "commit-sha"
+ = link_to commit.short_id, project_commit_path(@project, commit), class: "commit-sha"
 
.light
= commit_author_link(commit, avatar: false)