changeset 1062:5577ef946dc8 luisf

Merge
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 19 Nov 2012 19:55:54 +0000
parents 01076ed49ffc (current diff) 70fa02f56de7 (diff)
children 6f464526403b baf70e98d8ab 7f360105e175
files vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb
diffstat 5 files changed, 62 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Mon Nov 19 19:50:04 2012 +0000
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Mon Nov 19 19:55:54 2012 +0000
@@ -1,8 +1,8 @@
-<%= f.error_messages %>  
+<%= f.error_messages %>
 
 <h3><%= f.text_field :title, :required => true, :size => 70 %></h3>
 
-<div class="splitcontentleft">      
+<div class="splitcontentleft">
   <h3><%= l(:label_publication_other_details) %></h3>
   <div class="box tabular">
     <% f.fields_for :bibtex_entry do |builder| -%>
@@ -14,12 +14,17 @@
       <br />
       <em><%= l(:text_external_url) %></em>
     </p>
+    <p>
+      <%= f.text_field :doi, :size => 70 %>
+      <br />
+      <em><%= l(:text_doi) %></em>
+    </p>
 
   </div>
 </div>
 
 <div class="splitcontentright">
-  <h3><%= l(:authors) %></h3>    
+  <h3><%= l(:authors) %></h3>
   <div class="box tabular">
     <% f.fields_for :authorships do |builder| -%>
       <%= render "authorship_fields", :f => builder %>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb	Mon Nov 19 19:50:04 2012 +0000
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb	Mon Nov 19 19:55:54 2012 +0000
@@ -3,7 +3,7 @@
 <div class="box">
   <h3>Publication Info</h3>
   <p><%= show_cite_proc_entry(@publication)%></p>
-  
+
   <h3>B<small>IB</small>T<sub>E</sub>X Format</h3>
   <pre><%=h print_bibtex_entry(@publication) %></pre>
 </div>
@@ -14,7 +14,7 @@
 <ul id="authorships">
   <% for authorship in @publication.authorships.find(:all, :order => :auth_order) %>
     <% content_tag_for :li, authorship do %>
-      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>    
+      <%- if User.current.allowed_to?(:edit_publication, @project) && @publication.authorships.length > 1 -%>
         <span class="handle">[drag to reorder]</span>
       <%- end -%>
       <%= link_to_authorship authorship %> <em><%= h authorship.institution %></em> <br />
@@ -30,17 +30,21 @@
   <%= show_bibtex_fields(@publication.bibtex_entry) %>
 <%- end -%>
 
-<% unless @publication.external_url.blank? %>
-  <h4>
-    <%= l(:field_external_url) %>
-  </h4>
+<%- unless @publication.external_url.blank? -%>
   <p>
-    <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} %>
+    <b><%= l(:field_external_url) %>:</b> <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} -%>
+  </p>
+<%- end -%>
+
+
+<% unless @publication.doi.blank? %>
+  <p>
+    <b><%= l(:field_doi)-%>:</b> <%= link_to h(@publication.doi), "http://dx.doi.org/#{@publication.doi}", {:target => "_blank"} -%>
   </p>
 <% end %>
 
 <br / >
-  <% if User.current.allowed_to?(:add_publication, @project) %>	
+  <% if User.current.allowed_to?(:add_publication, @project) %>
     <%= link_to l(:label_publication_edit), { :controller => "publications", :action => "edit", :id => @publication, :project_id => @project } %> |
     <%= link_to "Delete", {:controller => 'publications', :action => 'destroy', :id => @publication, :project_id => @project },
                                                      :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> |
@@ -49,15 +53,15 @@
 </div>
 
 <% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %>
-  
+
 <% content_for :sidebar do %>
   <h3><%=l(:label_publication_project_index)%></h3>
 
   <p id="list_projects">
     <%= render :partial => 'list_projects' %>
   </p>
-  
+
   <%- if User.current.allowed_to?(:edit_publication, @project) -%>
-    <%= render :partial => 'add_project_form' %>    
+    <%= render :partial => 'add_project_form' %>
   <%- end -%>
 <% end %>
--- a/vendor/plugins/redmine_bibliography/config/locales/en.yml	Mon Nov 19 19:50:04 2012 +0000
+++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml	Mon Nov 19 19:55:54 2012 +0000
@@ -12,8 +12,7 @@
   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"
   identify_author_correct: "Yes, but I need to correct some details below"
@@ -25,24 +24,25 @@
   label_all_publications_for_project: Publications associated with %{project}
   label_authors_show: "Authorships associated with this author"
   label_authors_index: "List of authors"
-  
+
   field_authorship_publication_title: "Publication"
   field_authorship_name: "Name on Paper"
   field_authorship_email: "Email"
   field_authorship_institution: "Institution"
-  
+
   field_external_url: "External URL"
+  field_doi: "DOI"
   field_publication_title: Title
   field_publication_authors: Authors
   field_publication_projects: "Associated projects"
   field_author_name: Author
   field_author_user: User Name
   field_author_username: "Associated user"
-  field_author_publications: "Publications by this Author" 
+  field_author_publications: "Publications by this Author"
   field_identify_author_yes: "Yes"
   field_identify_author_correct: "Corrections"
   field_identify_author_no: "No"
-  
+
   label_author_is_me: "(I am this author)"
   label_add_me_as_author: "Add me as an author"
   label_add_an_author: "Add an author"
@@ -54,7 +54,7 @@
   label_author_information: "Author Information"
 
   remove_author: "Remove this author"
-  
+
   label_publication_plural: "Publications"
   label_related_publication_plural: "Related publications"
   label_publication_new: "Create New Publication"
@@ -67,22 +67,23 @@
   label_publication_project_index: "Projects associated with this publication"
   label_publication_index: "View all publications"
   label_publication_other_details: "Details"
-  
+
   text_external_url: "Link to the publication or to an external page about it."
+  text_doi: "DOI (Digital Object Identifier)."
   text_author_name_on_paper: "Author's name as it appears on the paper."
   text_author_institution: "Author's institution as on the paper."
   text_author_email: "Author's email address as on the paper."
-  
+
   text_author_search: "Search existing authors"
-  
+
   # authorships model
   field_institution: "Institution"
-  field_name_on_paper: "Name" 
+  field_name_on_paper: "Name"
   field_email: "Email Address"
-      
+
   # bibtex_entries model
   field_entry_type: "Publication Type"
-  field_id: "id" 
+  field_id: "id"
   field_publication_id: "Publication_id"
   field_address: "Address"
   field_annote: "Annote"
@@ -122,7 +123,7 @@
   field_bibtex_proceedings: Conference proceedings
   field_bibtex_techreport: Technical report
   field_bibtex_unpublished: Unpublished
-  
+
   label_author_1: First author
   label_author_2: Second author
   label_author_3: Third author
@@ -146,6 +147,6 @@
 
   mail_subject_publication_added: "You have been added as an author to a new publication"
   mail_body_publication_added: "A new publication (%{publication}) has been added to the project '%{project}.'"
-  
-  
-  
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/plugins/redmine_bibliography/db/migrate/008_add_doi_and_timestamp_columns_to_publications.rb	Mon Nov 19 19:55:54 2012 +0000
@@ -0,0 +1,12 @@
+class AddDoiAndTimestampColumnsToPublications < ActiveRecord::Migration
+  def self.up
+    add_column :publications, :doi, :string
+    add_timestamps :publications
+
+  end
+
+  def self.down
+    remove_column :publications, :doi
+    remove_timestamps :publications
+  end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/plugins/redmine_bibliography/db/migrate/009_add_timestamp_columns_to_authors.rb	Mon Nov 19 19:55:54 2012 +0000
@@ -0,0 +1,9 @@
+class AddTimestampColumnsToAuthors < ActiveRecord::Migration
+  def self.up
+    add_timestamps :authors
+  end
+
+  def self.down
+    remove_timestamps :authors
+  end
+end