Mercurial > hg > soundsoftware-site
changeset 533:b1c56157d64d feature_36
Correct Query to select a user's publications.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 26 Jul 2011 11:35:08 +0100 |
parents | 76d064830472 |
children | cdec3eeaef7e |
files | vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb Mon Jul 25 17:53:41 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb Tue Jul 26 11:35:08 2011 +0100 @@ -1,14 +1,12 @@ <h3><%=l(:label_my_publications_box)%> <%= "(" + User.current.author.authorships.count.to_s + ")" unless User.current.author.nil? %></h3> -<% Publication.find(:all).each do |pub|%> -<div class="wiki"> - <h3><%= link_to pub.title, pub %></h3> - - <% pub.projects.each do |proj| %> - <%= link_to proj.name, proj %> - <% end %> - -</div> +<% Publication.all(:include => :authors, :conditions => "id = #{User.current.author.id}").each do |pub|%> + <div class="wiki"> + <h3><%= link_to pub.title, pub %></h3> + <% pub.projects.each do |proj| %> + <%= link_to proj.name, proj %> + <% end %> + </div> <% end %>