Mercurial > hg > soundsoftware-site
annotate plugins/redmine_bibliography/app/helpers/authorships_helper.rb @ 1270:b2f7f52a164d redmine-2.2-integration
Fix project members page: update editlist partial following changes to project member settings partial; update mailer class and templates; make editlist forms not be remote (we just reload page)
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 02 May 2013 16:24:09 +0100 |
parents | e65c02706f1c |
children | 2805873c0147 |
rev | line source |
---|---|
luis@1126 | 1 # -*- coding: utf-8 -*- |
luis@328 | 2 module AuthorshipsHelper |
chris@702 | 3 |
chris@702 | 4 # Generates a link to either author or user, depending on which is |
chris@702 | 5 # available |
chris@702 | 6 def link_to_authorship(authorship) |
chris@702 | 7 s = '' |
chris@702 | 8 if authorship.author.nil? |
chris@702 | 9 # legacy reasons… |
chris@702 | 10 s << h(authorship.name_on_paper) |
chris@702 | 11 else |
luis@1126 | 12 if authorship.author.user.nil? |
chris@702 | 13 s << link_to(authorship.name_on_paper, :controller => 'authors', :action => 'show', :id => authorship.author) |
chris@702 | 14 else |
chris@702 | 15 s << link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user) |
chris@702 | 16 end |
chris@702 | 17 end |
chris@702 | 18 s |
chris@702 | 19 end |
chris@702 | 20 |
luis@328 | 21 end |