changeset 585:5818ebc11362 feature_36

Some simple improvements to publication list table layout
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 12 Aug 2011 12:07:22 +0100
parents bed7ea82663d
children 658cfb481618
files vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb vendor/plugins/redmine_bibliography/config/locales/en.yml
diffstat 2 files changed, 22 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb	Wed Aug 10 18:44:00 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb	Fri Aug 12 12:07:22 2011 +0100
@@ -2,35 +2,38 @@
 		<%= link_to l(:label_publication_new), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>
 </div>
 
-<div class="splitcontentleft">
   <% if @project %>
   <h3><%= l(:label_all_publications_for_project, :project => @project.name) %></h3>
   <% else %>
   <h3><%= l(:label_all_publications) %></h3>
   <% end %>
 
-  <table>
-    <tr>
-      <th>Number</th>
-      <th>Title</th> 
-    </tr>
+  <div class="autoscroll">
+  <table class="list publications">
+    <thead><tr>
+      <th><%= l(:title) %></th> 
+      <th><%= l(:authors) %></th> 
+      <th><%= l(:year) %></th> 
+    </tr></thead>
 
     <% @publications.each do |publication| %>
-	    <tr>
-	      <td><%= publication.id %></td>
-	      <td><%= link_to publication.title, :controller => "publications", :action => "show", :id => publication, :project_id => @project %></td>
-	 	  </tr>
+    <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? %>
+	  <%= 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>
+    </tr>
     <% end %>    
   </table>
-
-</div>
-
-<div class="splitcontentright">
-  placeholder div
-</div>
-
+  </div>
 
 <% content_for :sidebar do %>
-  Sidebar
 <% end %>
   
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml	Wed Aug 10 18:44:00 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml	Fri Aug 12 12:07:22 2011 +0100
@@ -4,6 +4,7 @@
   authors: "Authors"
   author: "Author"
   name: "Name"
+  year: "Year"
   publications_box: "My Publications"
   label_my_publications_box: "My Publications"