Extract code from view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9809 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
888d284136
commit
9b63117856
|
@ -32,7 +32,7 @@
|
|||
<% if @repository.report_last_commit %>
|
||||
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>
|
||||
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
||||
<td class="author"><%= entry.changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(entry.changeset.author) if entry.lastrev %></td>
|
||||
<td class="author"><%= entry.author %></td>
|
||||
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
|
|
@ -322,6 +322,14 @@ module Redmine
|
|||
def is_text?
|
||||
Redmine::MimeType.is_type?('text', name)
|
||||
end
|
||||
|
||||
def author
|
||||
if changeset
|
||||
changeset.author.to_s
|
||||
elsif lastrev
|
||||
Redmine::CodesetUtil.replace_invalid_utf8(lastrev.author.to_s.split('<').first)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Revisions < Array
|
||||
|
|
Loading…
Reference in New Issue