Update views to use CommitDecorator

This commit is contained in:
Riyad Preukschas 2012-07-22 13:08:24 +02:00
parent ff40b7de7a
commit 34cea1cb63
11 changed files with 28 additions and 19 deletions

View file

@ -1,3 +1,3 @@
- if tm
%strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
= link_to truncate(content_commit.safe_message, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link"
= link_to truncate(content_commit.title, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link"

View file

@ -25,6 +25,7 @@
%table
- @blame.each do |commit, lines|
- commit = Commit.new(commit)
- commit = CommitDecorator.decorate(commit)
%tr
%td.author
= image_tag gravatar_icon(commit.author_email, 16)
@ -32,8 +33,8 @@
%td.blame_commit
 
= link_to project_commit_path(@project, :id => commit.id) do
%code= commit.id.to_s[0..10]
%span.row_title= truncate(commit.safe_message, :length => 30) rescue "--broken encoding"
%code= commit.short_id
%span.row_title= truncate(commit.title, :length => 30) rescue "--broken encoding"
%td.lines
= preserve do
%pre