Mercurial > hg > soundsoftware-site
annotate vendor/plugins/redmine_bibliography/app/helpers/authors_helper.rb @ 595:84e8d34d024c feature_36
DEV Commit: now generating the seach "author select box" with the appropriate options and element names and id's, so that it gets correctly submitted with the form.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 16 Aug 2011 02:06:36 +0100 |
parents | 951fcb1711f2 |
children | 8fa35731c959 |
rev | line source |
---|---|
luis@328 | 1 module AuthorsHelper |
luis@540 | 2 unloadable |
luis@540 | 3 |
luis@540 | 4 def render_author_publications(author) |
luis@540 | 5 s = "" |
luis@540 | 6 pubs = [] |
luis@540 | 7 |
luis@540 | 8 author.publications.each do |pub| |
luis@540 | 9 pubs << link_to(pub.title, pub) |
luis@540 | 10 end |
luis@540 | 11 |
luis@540 | 12 if pubs.size < 3 |
luis@540 | 13 s << '<nobr>' << pubs.join(', ') << '</nobr>' |
luis@540 | 14 else |
luis@540 | 15 s << pubs.join(', ') |
luis@540 | 16 end |
luis@540 | 17 s |
luis@540 | 18 end |
luis@540 | 19 |
luis@328 | 20 end |