Mercurial > hg > soundsoftware-site
diff app/helpers/.svn/text-base/repositories_helper.rb.svn-base @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | cd2282d2aa55 |
line wrap: on
line diff
--- a/app/helpers/.svn/text-base/repositories_helper.rb.svn-base Fri Nov 19 14:05:24 2010 +0000 +++ b/app/helpers/.svn/text-base/repositories_helper.rb.svn-base Thu Jan 13 12:53:21 2011 +0000 @@ -18,8 +18,12 @@ require 'iconv' module RepositoriesHelper - def format_revision(txt) - txt.to_s[0,8] + def format_revision(revision) + if revision.respond_to? :format_identifier + revision.format_identifier + else + revision.to_s + end end def truncate_at_line_break(text, length = 255) @@ -87,7 +91,7 @@ :action => 'show', :id => @project, :path => path_param, - :rev => @changeset.revision) + :rev => @changeset.identifier) output << "<li class='#{style}'>#{text}</li>" output << render_changes_tree(s) elsif c = tree[file][:c] @@ -97,13 +101,13 @@ :action => 'entry', :id => @project, :path => path_param, - :rev => @changeset.revision) unless c.action == 'D' + :rev => @changeset.identifier) unless c.action == 'D' text << " - #{c.revision}" unless c.revision.blank? text << ' (' + link_to('diff', :controller => 'repositories', :action => 'diff', :id => @project, :path => path_param, - :rev => @changeset.revision) + ') ' if c.action == 'M' + :rev => @changeset.identifier) + ') ' if c.action == 'M' text << ' ' + content_tag('span', c.from_path, :class => 'copied-from') unless c.from_path.blank? output << "<li class='#{style}'>#{text}</li>" end