Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/app/helpers/my_helper.rb @ 1151:a3cb7444c9bd redmine-2.2-integration
html output in parent project link
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 15 Jan 2013 12:26:20 +0000 |
parents | b4b72f1eb644 |
children |
line wrap: on
line source
module MyHelper def get_my_publications() if not User.current.author.nil? @my_publications = Publication.all(:include => :authors, :conditions => "authors.id = #{User.current.author.id}") else @my_publications = [] end end def render_publications_projects(publication) s = "" projs = [] publication.projects.each do |proj| projs << link_to(proj.name, proj) end s << projs.join(', ') s end def render_publications_authors(publication) s = "" auths = [] publication.authorships.each do |auth| auths << h(auth.name_on_paper) end s << auths.join(', ') s end end