# HG changeset patch # User luisf # Date 1315578896 -3600 # Node ID d2a3716160880b672790b5243218e08128ccdcfa # Parent 65749e700af096c572a0e4888361ade395d7c8a7# Parent 70c163e49aeac6f9b316f74fef53835b759d4391 Merge from 658:70c163e49aea diff -r 70c163e49aea -r d2a371616088 vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Fri Sep 09 15:13:43 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Fri Sep 09 15:34:56 2011 +0100 @@ -8,6 +8,13 @@ <% f.fields_for :bibtex_entry do |builder| -%> <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> <%- end -%> + +

+ <%= f.text_field :external_url, :size => 70 %> +
+ <%= l(:text_external_url) %> +

+ diff -r 70c163e49aea -r d2a371616088 vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Fri Sep 09 15:13:43 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Fri Sep 09 15:34:56 2011 +0100 @@ -26,6 +26,16 @@ <%= show_bibtex_fields(@publication.bibtex_entry) %> <%- end -%> + +<% unless @publication.external_url.blank? %> +

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

+

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

+<% end %> +
<% if User.current.allowed_to?(:add_publication, @project) %> <%= link_to l(:label_publication_edit), { :controller => "publications", :action => "edit", :id => @publication, :project_id => @project } %> | diff -r 70c163e49aea -r d2a371616088 vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 09 15:13:43 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 09 15:34:56 2011 +0100 @@ -24,6 +24,7 @@ field_authorship_email: "Email Address" field_authorship_institution: "Institution" + field_external_url: "External URL" field_publication_title: Title field_publication_authors: Authors field_publication_projects: "Associated projects" @@ -59,6 +60,7 @@ label_publication_index: "View all publications" label_publication_other_details: "Details" + text_external_url: "Link to the publication itself." 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." diff -r 70c163e49aea -r d2a371616088 vendor/plugins/redmine_bibliography/db/migrate/007_add_external_url_column_to_publications.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_bibliography/db/migrate/007_add_external_url_column_to_publications.rb Fri Sep 09 15:34:56 2011 +0100 @@ -0,0 +1,9 @@ +class AddExternalUrlColumnToPublications < ActiveRecord::Migration + def self.up + add_column :publications, :external_url, :string + end + + def self.down + remove_column :publications, :external_url + end +end