Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/app/helpers/authors_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 | b4b72f1eb644 |
children |
line wrap: on
line source
module AuthorsHelper unloadable def render_author_publications(author) s = "" pubs = [] author.publications.each do |pub| pubs << link_to(pub.title, pub) end if pubs.size < 3 s << '<nobr>' << pubs.join(', ') << '</nobr>' else s << pubs.join(', ') end s end # Generates a link to an author # todo: test options def link_to_author(author, options={}, html_options = nil) url = {:controller => 'authors', :action => 'show', :id => author}.merge(options) link_to(h(author.name), url, html_options) end end