Mercurial > hg > soundsoftware-site
view vendor/plugins/redmine_bibliography/app/helpers/my_helper.rb @ 758:687c9fbca255 feature_14
gross hack to fix autocompletes from being halted in the project filter chain. To be fixed.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 11 Nov 2011 17:24:10 +0000 |
parents | 999a6b3c4cd1 |
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