# HG changeset patch # User luisf # Date 1311676508 -3600 # Node ID b1c56157d64d297f92456e019a17ae6a6e4db78a # Parent 76d064830472d12b55876e0a9bbf60c858296126 Correct Query to select a user's publications. diff -r 76d064830472 -r b1c56157d64d vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb --- 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 @@

<%=l(:label_my_publications_box)%> <%= "(" + User.current.author.authorships.count.to_s + ")" unless User.current.author.nil? %>

-<% Publication.find(:all).each do |pub|%> -
-

<%= link_to pub.title, pub %>

- - <% pub.projects.each do |proj| %> - <%= link_to proj.name, proj %> - <% end %> - -
+<% Publication.all(:include => :authors, :conditions => "id = #{User.current.author.id}").each do |pub|%> +
+

<%= link_to pub.title, pub %>

+ <% pub.projects.each do |proj| %> + <%= link_to proj.name, proj %> + <% end %> +
<% end %>