Mercurial > hg > soundsoftware-site
view vendor/plugins/redmine_bibliography/app/helpers/authors_helper.rb @ 1086:5ebdeb79ea9c feature_550
Add "My Page" box for my projects. Currently this also affects the layout of the non-My-Page version of the My Projects list, need to adjust that
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 23 Nov 2012 14:29:55 +0000 |
parents | 8fa35731c959 |
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