# HG changeset patch # User luisf # Date 1316190488 -3600 # Node ID dd366a17ab34dfb460e461bf11e0ac9401aa797d # Parent f8d7e85ccd4ee3f6c78670dd958a275ac4a8152f Bug #294 - Does not show publications associated with projects without visibility. diff -r f8d7e85ccd4e -r dd366a17ab34 vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb Fri Sep 16 17:06:58 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb Fri Sep 16 17:28:08 2011 +0100 @@ -19,24 +19,26 @@ <%= l(:associated_projects) %> - <% @publications.each do |publication| %> - - <%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %> - - <% publication.authorships.each do |authorship| %> - <%# if authorship.author.user.nil? || !authorship.author.user.active? %> - <%= h authorship.name_on_paper %> - <%# else %> - <%#= link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user) %> - <%# end %> - <%= authorship.institution %>
- <% end %> - <%= publication.bibtex_entry.year %> - - <%= render_projects_list(publication, false) %> - - - <% end %> + <%- @publications.each do |publication| -%> + <%- if publication.projects.visible.length > 0 -%> + + <%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %> + + <% publication.authorships.each do |authorship| %> + <%# if authorship.author.user.nil? || !authorship.author.user.active? %> + <%= h authorship.name_on_paper %> + <%# else %> + <%#= link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user) %> + <%# end %> + <%= authorship.institution %>
+ <% end %> + <%= publication.bibtex_entry.year %> + + <%= render_projects_list(publication, false) %> + + + <%- end -%> + <%- end -%>