changeset 642:8c88a15a701e feature_36

Show authors and date in publication list box on project front page
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 07 Sep 2011 12:13:16 +0100
parents cbad7075a60f
children 505fdac73166
files vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb vendor/plugins/redmine_bibliography/config/locales/en.yml
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Tue Sep 06 15:10:45 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Wed Sep 07 12:13:16 2011 +0100
@@ -1,8 +1,11 @@
 <% if @project.publications.any? %>
   <div class="bibliography box">
-	  <h3><%=l(:label_publications_plural)%></h3>	
+	  <h3><%=l(:label_related_publication_plural)%></h3>	
 	  <p><% @project.publications.each do |publication| %>
-	    <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %><br />
+	    <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %> - 
+	    <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
+	    <% if publication.bibtex_entry.year.to_s != "" %>(<%= publication.bibtex_entry.year %>)<% end %>
+	    <br />
 	  <% end %></p>
   </div>
 <% end %>
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml	Tue Sep 06 15:10:45 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml	Wed Sep 07 12:13:16 2011 +0100
@@ -47,7 +47,8 @@
 
   remove_author: "Remove this author"
   
-  label_publications_plural: "Publications"
+  label_publication_plural: "Publications"
+  label_related_publication_plural: "Related publications"
   label_publication_new: "Create New Publication"
   label_publication_index: "List of Publication"
   label_add_publication_to_project: "Add publication to this project"