changeset 720:5eb7efd59ed7 cannam

Merge
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Mon, 17 Oct 2011 16:58:48 +0100
parents 3f7bea56f35b (current diff) 378aca14739f (diff)
children 7c7ef64e68da
files
diffstat 16 files changed, 280 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Mon Oct 17 16:58:48 2011 +0100
@@ -64,21 +64,21 @@
 
   def get_bibtex_required_fields
 
-    fields = BibtexEntryType.fields(params[:value])
-    all_fields = BibtexEntryType.all_fields
+    unless params[:value].empty?
+      fields = BibtexEntryType.fields(params[:value]) 
+    end
 
     respond_to do |format|
       format.js {
-        render(:update) {|page| 
-          all_fields.each_with_index do |field, idx|            
-            unless fields.include? field
-              page["publication_bibtex_entry_attributes_#{field}"].up('p').hide()
-            else
-              page["publication_bibtex_entry_attributes_#{field}"].up('p').show()
-            end            
+        render(:update) {|page|       
+          if params[:value].empty?
+            page << "hideOnLoad();"
+          else
+            page << "show_required_bibtex_fields(#{fields.to_json()});"
           end
         }
       }
+    
     end
   end
 
--- a/vendor/plugins/redmine_bibliography/app/helpers/authorships_helper.rb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/helpers/authorships_helper.rb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,2 +1,21 @@
+# -*- coding: undecided -*-
 module AuthorshipsHelper
+
+  # Generates a link to either author or user, depending on which is
+  # available
+  def link_to_authorship(authorship)
+    s = ''
+    if authorship.author.nil?
+      # legacy reasons…
+      s << h(authorship.name_on_paper)
+    else
+      if authorship.author.user.nil?      
+        s << link_to(authorship.name_on_paper, :controller => 'authors', :action => 'show', :id => authorship.author)
+      else
+        s << link_to(authorship.name_on_paper, :controller => 'users', :action => 'show', :id => authorship.author.user)
+      end
+    end
+    s
+  end
+
 end
--- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb	Mon Oct 17 16:58:48 2011 +0100
@@ -2,6 +2,7 @@
 require 'bibtex'
 
 module PublicationsHelper
+  include AuthorshipsHelper
 
   def link_to_publication(publication, options={}, html_options = nil)
     url = {:controller => 'publications', :action => 'show', :id => publication}.merge(options)
@@ -11,8 +12,12 @@
   def projects_check_box_tags(name, projects)
     s = ''
     projects.sort.each do |project|
-      s << "<label>#{ check_box_tag name, project.id, false } #{link_to_project project}</label>\n"
+      if User.current.allowed_to?(:edit_publication, project) 
+        s << "<label>#{ check_box_tag name, project.id, false } #{link_to_project project}</label>\n"
+        s << '<br />'
+      end
     end
+
     s 
   end
   
@@ -42,12 +47,12 @@
     f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)", :class => 'icon icon-del')
   end
     
-  def link_to_add_fields(name, f, association)
+  def link_to_add_author_fields(name, f, association, action)
     new_object = f.object.class.reflect_on_association(association).klass.new
     fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
       render(association.to_s.singularize + "_fields", :f => builder)
     end    
-    link_to_function(name, h("add_fields(this, '#{association}', '#{escape_javascript(fields)}')"), { :class => 'icon icon-add', :id => "add_another_author" })
+    link_to_function(name, h("add_author_fields(this, '#{association}', '#{escape_javascript(fields)}', '#{action}')"), { :class => 'icon icon-add', :id => "add_another_author" })
   end  
 
   def sanitized_object_name(object_name)
@@ -72,29 +77,40 @@
     str = object_name.split("\[").last().gsub("\]","")
     str.to_sym
   end
+
+  def render_authorships_list(publication)   
+    s = '<p>'
+    
+    publication.authorships.each do |authorship|
+      s << link_to_authorship(authorship)
+      s << "<br /><em>#{authorship.institution}</em></p>"
+    end    
+
+    s   
+  end
   
-  def render_projects_list(publication)
-    logger.error { "PROJECT NAME #{@project.name unless @project.nil?}" }
     
-    s = ""
-
-    publication.projects.each do |proj|
+  def render_projects_list(publication, show_delete_icon)    
+    s= ""
+    
+    publication.projects.visible.each do |proj|
       s << link_to_project(proj, {}, :class => 'publication_project')
-      
-      if User.current.allowed_to?(:edit_publication, @project)
-        if @project == proj
-          confirm_msg = 'Are you sure you want to remove the current project from this publication\'s projects list?'
-        else
-          confirm_msg = false
-        end 
-            
-        s << link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj,  :project_id => @project }, :method => :post, :confirm => confirm_msg }, :class => 'icon icon-del') 
+    
+      if show_delete_icon  
+        if User.current.allowed_to?(:edit_publication, @project)
+          if @project == proj
+            confirm_msg = 'Are you sure you want to remove the current project from this publication\'s projects list?'
+          else
+            confirm_msg = false
+          end 
+          
+          s << link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj,  :project_id => @project }, :method => :post, :confirm => confirm_msg }, :class => 'icon icon-del') 
+        end
       end
       
-      s << "<br />"
-      
-    end
-    
+      s << "<br />"      
+    end    
+
     s  
   end
   
--- a/vendor/plugins/redmine_bibliography/app/models/bibtex_entry_type.rb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/models/bibtex_entry_type.rb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,7 +1,5 @@
 class BibtexEntryType < ActiveRecord::Base
 
-  @@all_fields = [ "editor", "publisher", "chapter", "pages", "volume", "series", "address", "edition", "month", "year", "type", "note", "number", "journal", "howpublished", "key", "school" ]
-
   @@fields = Hash['article', ['journal', 'year', 'volume', 'number', 'pages', 'month', 'note' ], 
                   'book' , [ 'editor', 'publisher', 'volume', 'series', 'address', 'edition', 'month', 'year', 'note' ],
                   'booklet' , [ 'howpublished', 'address', 'year', 'month', 'note', 'key' ],
@@ -28,8 +26,4 @@
   def self.fields (type)
     @@fields[ self.find(type).name ]    
   end
-
-  def self.all_fields
-    @@all_fields
-  end
 end
--- a/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,6 +1,6 @@
 <h2><%=l(:label_authors_show)%></h2>
 
-<div class="splitcontentleft">
+<div class="autoscroll">
   <table class="list authors">		
   	<thead>
   	  <tr>
@@ -21,4 +21,8 @@
     <% end %>
   	</tbody>
   </table>
-</div>
\ No newline at end of file
+</div>
+
+<% content_for :sidebar do %>
+<% end %>
+  
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml	Mon Oct 17 16:58:48 2011 +0100
@@ -19,11 +19,11 @@
 
       <p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p>
       <p class="author_identify">
-        <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
+        <label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_yes) %> </label><br />
        
-        <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
+        <label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_correct) %> </label><br />
         
-        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no ), :onclick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
+        <label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no ), :onchange => "identify_author_status($(this).value, #{form_object_id(f.object_name) });") %> <%= l(:identify_author_no) %> </label><br />
       </p>
     </div>	
   
@@ -45,12 +45,11 @@
 
   <p>
 
-  <% if params[:action] == 'new' %>
-   <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
-  <% else %>
-<%= button_to_function l(:label_edit_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
-
- <% end %>
+  <%- if params[:action] == 'new' -%>
+    <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
+  <%- else -%>
+    <%= button_to_function l(:label_edit_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
+  <%- end -%>
 
 
   <%= link_to_remove_fields l("remove_author"), f %>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -8,73 +8,73 @@
 	        :onChange => remote_function( :url => { :controller => :publications, :action => :get_bibtex_required_fields}, :with => "'value=' + value" )	              
 	%>
 </p>
-<p> 
-  <%= f.text_field :year, :size => 4, :class => 'bibtex' %> 
+
+<p class="bibtex hol"> 
+  <%= f.text_field :year, :size => 4 %> 
 </p>
-<p> 
-  <%= f.text_field :month, :size => 4, :class => 'bibtex' %> 
+<p class="bibtex hol"> 
+  <%= f.text_field :month, :size => 4%> 
 </p>
-<p> 
-  <%= f.text_field :chapter, :size => 15, :class => 'bibtex' %>  
+<p class="bibtex hol">  
+  <%= f.text_field :chapter, :size => 15%>  
 </p>  
-<p>   
-  <%= f.text_field :editor, :size => 33, :class => 'bibtex'  %>  
+<p class="bibtex hol"> 
+  <%= f.text_field :editor, :size => 33  %>  
 </p>  
-<p>   
-  <%= f.text_field :booktitle, :size => 33, :class => 'bibtex'  %>  
+<p class="bibtex hol"> 
+  <%= f.text_field :booktitle, :size => 33  %>  
 </p>  
-<p>   
-  <%= f.text_field :publisher,:size => 33, :class => 'bibtex'  %>  
+<p class="bibtex hol"> 
+  <%= f.text_field :publisher,:size => 33  %>  
 </p>  
-<p>   
-  <%= f.text_field :pages, :size => 12, :class => 'bibtex'  %>  
+<p class="bibtex hol"> 
+  <%= f.text_field :pages, :size => 12 %>  
 </p>
-<p>
- <%= f.text_field :address, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :address %>
 </p>
-<p>
- <%= f.text_field :annote, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :annote %>
 </p>
-<p>
- <%= f.text_field :crossref, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :crossref %>
 </p>
-<p>
- <%= f.text_field :edition, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :edition %>
 </p>
-<p>
- <%= f.text_field :eprint, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :eprint %>
 </p>
-<p>
- <%= f.text_field :howpublished, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :howpublished %>
 </p>
-<p>
- <%= f.text_field :journal, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :journal %>
 </p>
-<p>
- <%= f.text_field :key, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :key %>
 </p>
-<p>
- <%= f.text_field :note, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :note %>
 </p>
-<p>
- <%= f.text_field :number, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :number %>
 </p>
-<p>
- <%= f.text_field :organization, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :organization %>
 </p>
-<p>
- <%= f.text_field :school, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :school %>
 </p>
-<p>
- <%= f.text_field :series, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :series %>
 </p>
-<p>
- <%= f.text_field :type, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :type %>
 </p>
-<p>
- <%= f.text_field :url, :class => 'bibtex' %>
+<p class="bibtex hol"> 
+ <%= f.text_field :url %>
 </p>
-<p>
- <%= f.text_field :volume, :class => 'bibtex' %>
-</p>
-
+<p class="bibtex hol"> 
+ <%= f.text_field :volume %>
+</p>
\ No newline at end of file
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -24,7 +24,7 @@
     <% f.fields_for :authorships do |builder| -%>
       <%= render "authorship_fields", :f => builder %>
     <%- end -%>
-    <%= link_to_add_fields l(:label_add_an_author), f, :authorships %>
+    <%= link_to_add_author_fields l(:label_add_an_author), f, :authorships, params[:action] %>
   </div>
 </div>
 
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_list_projects.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,1 +1,1 @@
-<%= render_projects_list(@publication) %>
+<%= render_projects_list(@publication, true) %>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,7 +1,7 @@
 <% content_for :header_tags do %>
     <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
     <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>  
-    <%= javascript_tag 'Event.observe(window, "load", function(e){show_all_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %>
+    <%= javascript_tag 'Event.observe(window, "load", function(e){show_required_bibtex_fields(' + @bibtype_fields.to_json + ')});' %>
 <% end %>
 
 <h2><%=l(:label_publication_show)%></h2>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/index.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -5,9 +5,9 @@
 </div>
 
   <% if @project %>
-  <h3><%= l(:label_all_publications_for_project, :project => @project.name) %></h3>
+    <h3><%= l(:label_all_publications_for_project, :project => @project.name) %></h3>
   <% else %>
-  <h3><%= l(:label_all_publications) %></h3>
+    <h3><%= l(:label_all_publications) %></h3>
   <% end %>
 
   <div class="autoscroll">
@@ -15,25 +15,23 @@
     <thead><tr>
       <th><%= l(:title) %></th> 
       <th><%= l(:authors) %></th> 
-      <th><%= l(:year) %></th> 
+      <th><%= l(:year) %></th>
+      <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>
-    </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">
+            <%= render_authorships_list(publication) %>
+          <td class="year"><%= publication.bibtex_entry.year %></td>
+          <td class="projects">
+              <%= render_projects_list(publication, false) %>
+          </td>
+        </tr>
+      <%- end -%>
+    <%- end -%>
   </table>
   </div>
 
--- a/vendor/plugins/redmine_bibliography/app/views/publications/new.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/new.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -1,7 +1,6 @@
 <% content_for :header_tags do %>
     <%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %>
     <%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
-    <%= javascript_tag 'Event.observe(window, "load", hide_all_bibtex_required_fields);' %>
 <% end %>
 
 <h2><%=l(:label_publication_new)%></h2>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb	Mon Oct 17 16:58:48 2011 +0100
@@ -14,7 +14,7 @@
       <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>    
         <span class="handle">[drag to reorder]</span>
       <%- end -%>
-      <%= h authorship.name_on_paper %> <em><%= h authorship.institution %></em> <br />
+      <%= link_to_authorship authorship %> <em><%= h authorship.institution %></em> <br />
     <%- end -%>
   <%- end -%>
 </ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/plugins/redmine_bibliography/app/views/users/show.rhtml	Mon Oct 17 16:58:48 2011 +0100
@@ -0,0 +1,105 @@
+<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
+
+<div class="contextual">
+<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %>
+</div>
+
+<h2><%= avatar @user, :size => "50" %> <%=h @user.name %></h2>
+
+<div class="splitcontentleft">
+<ul>
+	<% unless @user.pref.hide_mail %>
+		<li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
+	<% end %>
+	<% @user.visible_custom_field_values.each do |custom_value| %>
+	<% if !custom_value.value.blank? %>
+    <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
+	<% end %>
+	<% end %>
+    <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
+	<% unless @user.last_login_on.nil? %>
+		<li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li>
+	<% end %>
+</ul>
+
+<h3><%=l(:label_ssamr_description)%></h3>
+<%= textilizable @description %>
+
+<h3><%=l(:label_ssamr_institution)%></h3>
+<p><%= h @institution_name %></p>
+
+
+<% unless @memberships.empty? %>
+<h3><%=l(:label_project_plural)%></h3>
+<ul>
+<% for membership in @memberships %>
+	<li><%= link_to_project(membership.project) %>
+    (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li>
+<% end %>
+</ul>
+<% end %>
+<%= call_hook :view_account_left_bottom, :user => @user %>
+</div>
+
+<div class="splitcontentright">
+
+  <% if @user.author %>
+  <div id="bibliography">
+    <% @publications = Publication.all(:include => :authors, :conditions => "authors.id = #{@user.author.id}") %>
+
+    <h3><%=l(:publications) %> <%= "(" + @publications.count.to_s + ")" %> </h3>
+
+    <% @publications.each do |publication|%>    
+      <dt>
+        <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %>
+      </dt>
+
+      <dd>
+        <span class="authors">
+          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
+        </span>
+        <% if publication.bibtex_entry.year.to_s != "" %>
+          <span class="year">
+            <%= publication.bibtex_entry.year %>
+          </span>
+        <% end %>
+      </dd>
+  	<% end %>
+  </div>
+  <% end %>
+
+
+<% unless @events_by_day.empty? %>
+<h3><%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3>
+
+<p>
+<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
+</p>
+
+<div id="activity">
+<% @events_by_day.keys.sort.reverse.each do |day| %>
+<h4><%= format_activity_day(day) %></h4>
+<dl>
+<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
+  <dt class="<%= e.event_type %>">
+  <span class="time"><%= format_time(e.event_datetime, false) %></span>
+  <%= content_tag('span', h(e.project), :class => 'project') %>
+  <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
+  <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
+<% end -%>
+</dl>
+<% end -%>
+</div>
+
+<% other_formats_links do |f| %>
+	<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
+<% end %>
+
+<% content_for :header_tags do %>
+		<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
+<% end %>
+<% end %>
+<%= call_hook :view_account_right_bottom, :user => @user %>
+</div>
+
+<% html_title @user.name %>
--- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js	Mon Oct 17 16:58:48 2011 +0100
@@ -3,12 +3,15 @@
     $(link).up(".fields").hide();
 }
 
-function add_fields(link, association, content) {
-    var new_id = new Date().getTime();
-    var regexp = new RegExp("new_" + association, "g")
-    $(link).insert({
-	before: content.replace(regexp, new_id)
-    });
+function add_author_fields(link, association, content, action) {
+	var new_id = new Date().getTime();
+  var regexp = new RegExp("new_" + association, "g");
+  $(link).insert({
+		before: content.replace(regexp, new_id)
+  });
+	if(action != "new"){
+		toggle_save_author(new_id, $(link));
+	};
 }
 
 function identify_author_status(status, object_id) {
@@ -57,16 +60,17 @@
     toggle_div("publication_authorships_attributes_" + form_object_id +"_search_author");
 }
 
-function edit_author(form_object_id){}
+function hide_all_bibtex_required_fields(){$$('p.bibtex').each(function(s){s.hide()})}
 
-function hide_all_bibtex_required_fields() {
-	$$('input.bibtex').each(function(s){
-	    s.up('p').hide();
-		})}
-		
-function show_all_required_bibtex_fields(entrytype_fields) {
-	$$('input.bibtex').each(function(s){
-    if(entrytype_fields.indexOf(s.id.split('_').last()) == -1){s.up('p').hide()};
+// entrytype_fields is a jsno array with the fields requires by the selected bibtex entry 
+function show_required_bibtex_fields(entrytype_fields) {
+	$$('p.bibtex').each(function(s){
+		if(entrytype_fields.indexOf(s.down('input').id.split('_').last()) != -1){
+			s.show();
+			}
+		else {
+			s.hide();
+			}
 	})
 }
 		
\ No newline at end of file
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml	Mon Oct 17 16:58:32 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml	Mon Oct 17 16:58:48 2011 +0100
@@ -7,9 +7,12 @@
   author: "Author"
   name: "Name"
   year: "Year"
+  associated_projects: "Associated Projects"
   publications_box: "My Publications"
   label_my_publications_box: "My Publications"
   view_all_publications: "View All Project's Publications"
+  publications: Publications
+  
   
   identify_author_question: Is the right person selected above?
   identify_author_yes: "Yes"
@@ -20,12 +23,12 @@
 
   label_all_publications: All Publications
   label_all_publications_for_project: Publications associated with %{project}
-  label_authors_show: "Authorships by this author"
+  label_authors_show: "Authorships associated with this author"
   label_authors_index: "List of authors"
   
-  field_authorship_publication_title: "Publication Title"
-  field_authorship_name: "Name"
-  field_authorship_email: "Email Address"
+  field_authorship_publication_title: "Publication"
+  field_authorship_name: "Name on Paper"
+  field_authorship_email: "Email"
   field_authorship_institution: "Institution"
   
   field_external_url: "External URL"
@@ -83,7 +86,7 @@
   field_publication_id: "Publication_id"
   field_address: "Address"
   field_annote: "Annote"
-  field_booktitle: "Book Title"
+  field_booktitle: "Title of Book or Proceedings"
   field_chapter: "Chapter"
   field_crossref: "Cross Reference"
   field_edition: "Edition"