Revision 1080:5bd8c86cfa6a vendor/plugins/redmine_bibliography/app/models

View differences:

vendor/plugins/redmine_bibliography/app/models/publication.rb
19 19

  
20 20
  before_save :set_initial_author_order
21 21

  
22
  acts_as_activity_provider :type => 'publication',
23
                            :timestamp => "#{Publication.table_name}.created_at",
24
                            :author_key => "#{Publication.table_name}.builder_id",
25
                            :find_options => {:joins => "INNER JOIN projects_publications ON #{Publication.table_name}.id = projects_publications.publication_id JOIN #{Project.table_name} ON #{Project.table_name}.id = projects_publications.project_id"}
26

  
27
  acts_as_event :title => Proc.new {|o| o.title },
28
                :datetime => :created_at,
29
                :author =>  nil,
30
                :type => 'publications',
31
                #todo - need too move the cache from the helper to the model
32
                :description => Proc.new {|o| o.print_entry(:ieee)},
33
                :project => Project.first
34
                # :url => Proc.new {|o| {:controller => 'publications', :action => 'show', :id => o.id }}
35

  
36

  
22 37
  # Ensure error message uses proper text instead of
23 38
  # bibtex_entry.entry_type (#268).  There has to be a better way to
24 39
  # do this!

Also available in: Unified diff