comparison plugins/redmine_bibliography/app/helpers/my_helper.rb @ 1117:b4b72f1eb644 redmine-2.2-integration

Moved all the plugins from the vendor folder to the application root folder.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 08 Jan 2013 12:32:05 +0000
parents vendor/plugins/redmine_bibliography/app/helpers/my_helper.rb@999a6b3c4cd1
children
comparison
equal deleted inserted replaced
1116:bb32da3bea34 1117:b4b72f1eb644
1 module MyHelper
2
3 def get_my_publications()
4 if not User.current.author.nil?
5 @my_publications = Publication.all(:include => :authors, :conditions => "authors.id = #{User.current.author.id}")
6 else
7 @my_publications = []
8 end
9 end
10
11 def render_publications_projects(publication)
12 s = ""
13 projs = []
14
15 publication.projects.each do |proj|
16 projs << link_to(proj.name, proj)
17 end
18
19 s << projs.join(', ')
20
21 s
22 end
23
24 def render_publications_authors(publication)
25 s = ""
26 auths = []
27
28 publication.authorships.each do |auth|
29 auths << h(auth.name_on_paper)
30 end
31
32 s << auths.join(', ')
33
34 s
35 end
36
37
38 end