# HG changeset patch # User luisf # Date 1312995496 -3600 # Node ID 4ee092298206203ed1f503c18eb307990b35960a # Parent 7cca1ac03f0c0f95048030190c48b73f31cdc26e Created just one function to fill the user's author info (used to be in 2 different places) diff -r 7cca1ac03f0c -r 4ee092298206 vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb --- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 17:19:36 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 17:58:16 2011 +0100 @@ -19,12 +19,8 @@ Rails.logger.debug { "Identify Author: USER" } - author_info = { - :name_on_paper => author.name, - :author_user_id => author.id, - :institution => "", - :is_user => "1" - } + # fc defined in the users_author_patch + author_info = author.get_author_info link_text = h(author.name) diff -r 7cca1ac03f0c -r 4ee092298206 vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb --- a/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb Wed Aug 10 17:19:36 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb Wed Aug 10 17:58:16 2011 +0100 @@ -15,16 +15,13 @@ def get_author_info info = { - :name_on_paper => "", - :email => "", + :name_on_paper => self.name, + :email => self.mail, :institution => "", :author_user_id => self.id, :is_user => "1" } - info[:name_on_paper] = self.name - info[:email] = self.mail - unless self.ssamr_user_detail.nil? info[:institution] = self.ssamr_user_detail.institution_name end