# HG changeset patch # User luisf # Date 1311687311 -3600 # Node ID cdec3eeaef7e406f8fee72bb1fe89e2c133a226c # Parent b1c56157d64d297f92456e019a17ae6a6e4db78a changes in the Query to retreive list of My Publications diff -r b1c56157d64d -r cdec3eeaef7e 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 Tue Jul 26 11:35:08 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb Tue Jul 26 14:35:11 2011 +0100 @@ -1,12 +1,34 @@ -

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

+

<%=l(:label_my_publications_box)%> <%= "(" + Publication.all(:include => :authors, :conditions => "authors.id = #{User.current.author.id}").count.to_s + ")" unless User.current.author.nil? %>

-<% 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 %> + + + + + + + + <% Publication.all(:include => :authors, :conditions => "authors.id = #{User.current.author.id}").each do |publication|%> + + + + + + + <% end %> + +
<%=l(:field_publication_title)%><%=l(:field_publication_authors)%><%=l(:field_publication_projects)%>
+ <%= link_to publication.title, publication %> + + <% publication.authorships.each do |authorship| %> + <%= h authorship.name_on_paper %> + <% end %> + + <% publication.projects.each do |proj| %> + + <%= link_to proj.name, proj %> + + <% end %> +
+ diff -r b1c56157d64d -r cdec3eeaef7e vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Tue Jul 26 11:35:08 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Tue Jul 26 14:35:11 2011 +0100 @@ -7,6 +7,10 @@ publications_box: "My Publications" label_my_publications_box: "My Publications" + field_publication_title: Title + field_publication_authors: Authors + field_publication_projects: "Associated Projects" + label_add_me_as_author: "Add me as an author" label_add_another_author: "Add another author"