##// END OF EJS Templates
Adds the repository identifier in the activity and search results (#779)....
Jean-Philippe Lang -
r9137:ee8002b0c934
parent child
Show More
@@ -31,7 +31,7 class Changeset < ActiveRecord::Base
31 31 :join_table => "#{table_name_prefix}changeset_parents#{table_name_suffix}",
32 32 :association_foreign_key => 'changeset_id', :foreign_key => 'parent_id'
33 33
34 acts_as_event :title => Proc.new {|o| "#{l(:label_revision)} #{o.format_identifier}" + (o.short_comments.blank? ? '' : (': ' + o.short_comments))},
34 acts_as_event :title => Proc.new {|o| o.title},
35 35 :description => :long_comments,
36 36 :datetime => :committed_on,
37 37 :url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project, :repository_id => o.repository.identifier_param, :rev => o.identifier}}
@@ -166,6 +166,13 class Changeset < ActiveRecord::Base
166 166 tag
167 167 end
168 168
169 # Returns the title used for the changeset in the activity/search results
170 def title
171 repo = (repository && repository.identifier.present?) ? " (#{repository.identifier})" : ''
172 comm = short_comments.blank? ? '' : (': ' + short_comments)
173 "#{l(:label_revision)} #{format_identifier}#{repo}#{comm}"
174 end
175
169 176 # Returns the previous changeset
170 177 def previous
171 178 @previous ||= Changeset.find(:first,
General Comments 0
You need to be logged in to leave comments. Login now