# HG changeset patch # User luisf # Date 1353354954 0 # Node ID 5577ef946dc8b2c819f62376c1d1f3eec3c95d9f # Parent 01076ed49ffc12ffcace4b8f7cf9fabfb02403d5# Parent 70fa02f56de76c51433d0e26e899baf3c6680b6a Merge diff -r 01076ed49ffc -r 5577ef946dc8 vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb --- 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 %>

<%= f.text_field :title, :required => true, :size => 70 %>

-
+

<%= l(:label_publication_other_details) %>

<% f.fields_for :bibtex_entry do |builder| -%> @@ -14,12 +14,17 @@
<%= l(:text_external_url) %>

+

+ <%= f.text_field :doi, :size => 70 %> +
+ <%= l(:text_doi) %> +

-

<%= l(:authors) %>

+

<%= l(:authors) %>

<% f.fields_for :authorships do |builder| -%> <%= render "authorship_fields", :f => builder %> diff -r 01076ed49ffc -r 5577ef946dc8 vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb --- 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 @@

Publication Info

<%= show_cite_proc_entry(@publication)%>

- +

BIBTEX Format

<%=h print_bibtex_entry(@publication) %>
@@ -14,7 +14,7 @@
    <% 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 -%> [drag to reorder] <%- end -%> <%= link_to_authorship authorship %> <%= h authorship.institution %>
    @@ -30,17 +30,21 @@ <%= show_bibtex_fields(@publication.bibtex_entry) %> <%- end -%> -<% unless @publication.external_url.blank? %> -

    - <%= l(:field_external_url) %> -

    +<%- unless @publication.external_url.blank? -%>

    - <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} %> + <%= l(:field_external_url) %>: <%= link_to h(@publication.external_url), @publication.external_url, {:target => "_blank"} -%> +

    +<%- end -%> + + +<% unless @publication.doi.blank? %> +

    + <%= l(:field_doi)-%>: <%= link_to h(@publication.doi), "http://dx.doi.org/#{@publication.doi}", {:target => "_blank"} -%>

    <% end %>
    - <% 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 @@
<% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %> - + <% content_for :sidebar do %>

<%=l(:label_publication_project_index)%>

<%= render :partial => 'list_projects' %>

- + <%- if User.current.allowed_to?(:edit_publication, @project) -%> - <%= render :partial => 'add_project_form' %> + <%= render :partial => 'add_project_form' %> <%- end -%> <% end %> diff -r 01076ed49ffc -r 5577ef946dc8 vendor/plugins/redmine_bibliography/config/locales/en.yml --- 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}.'" - - - + + + diff -r 01076ed49ffc -r 5577ef946dc8 vendor/plugins/redmine_bibliography/db/migrate/008_add_doi_and_timestamp_columns_to_publications.rb --- /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 diff -r 01076ed49ffc -r 5577ef946dc8 vendor/plugins/redmine_bibliography/db/migrate/009_add_timestamp_columns_to_authors.rb --- /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