Mercurial > hg > soundsoftware-site
changeset 583:4ee092298206 feature_36
Created just one function to fill the user's author info (used to be in 2 different places)
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 10 Aug 2011 17:58:16 +0100 |
parents | 7cca1ac03f0c |
children | bed7ea82663d |
files | vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb vendor/plugins/redmine_bibliography/lib/bibliography/user_author_patch.rb |
diffstat | 2 files changed, 4 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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