Mercurial > hg > soundsoftware-site
changeset 692:dd366a17ab34 feature_36
Bug #294 - Does not show publications associated with projects without visibility.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 16 Sep 2011 17:28:08 +0100 |
parents | f8d7e85ccd4e |
children | 5163e3ec00b8 |
files | vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb |
diffstat | 1 files changed, 20 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <th><%= l(:associated_projects) %></th> </tr></thead> - <% @publications.each do |publication| %> - <tr class="<%= cycle('odd', 'even') %>"> - <td class="firstcol title" align="top"><%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %></td> - <td class="authors" align="top"> - <% 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 %> - <em><%= authorship.institution %></em><br/> - <% end %> - <td class="year"><%= publication.bibtex_entry.year %></td> - <td class="projects"> - <%= render_projects_list(publication, false) %> - </td> - </tr> - <% end %> + <%- @publications.each do |publication| -%> + <%- if publication.projects.visible.length > 0 -%> + <tr class="<%= cycle('odd', 'even') %>"> + <td class="firstcol title" align="top"><%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %></td> + <td class="authors" align="top"> + <% 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 %> + <em><%= authorship.institution %></em><br/> + <% end %> + <td class="year"><%= publication.bibtex_entry.year %></td> + <td class="projects"> + <%= render_projects_list(publication, false) %> + </td> + </tr> + <%- end -%> + <%- end -%> </table> </div>