Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/app/helpers/authorships_helper.rb @ 1137:66b9ab6cf9d7 redmine-2.2-integration
We don't use ZeroClipboard, just scrub this stuff (image_path with 2 args doesn't appear to work any more)
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 10 Jan 2013 11:11:15 +0000 |
parents | e65c02706f1c |
children | 2805873c0147 |
line wrap: on
line source
# -*- coding: utf-8 -*- module AuthorshipsHelper # Generates a link to either author or user, depending on which is # available def link_to_authorship(authorship) s = '' if authorship.author.nil? # legacy reasons… s << h(authorship.name_on_paper) else if authorship.author.user.nil? s << link_to(authorship.name_on_paper, :controller => 'authors', :action => 'show', :id => authorship.author) else s << link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user) end end s end end