# HG changeset patch # User luisf # Date 1354830334 0 # Node ID e48a7a36491be5fa57242ac0eb0d35e861db42e0 # Parent dfa5d63d40b4b37431e57ca8738a38573036723b adds the parsed publication fields to hidden fields in the form (incomplete) diff -r dfa5d63d40b4 -r e48a7a36491b vendor/plugins/redmine_bibliography/app/views/publications/new/_bibtex.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/new/_bibtex.html.erb Thu Dec 06 18:09:40 2012 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/new/_bibtex.html.erb Thu Dec 06 21:45:34 2012 +0000 @@ -15,11 +15,14 @@

Preview and correct

Preview

-

Authors

+ +
- <%= hidden_field_tag "bibtex_pub_id" %> + <%= hidden_field_tag "pub_bibtex_title" -%> + <%= hidden_field_tag "pub_bibtex_entry_type" -%> + <%= hidden_field_tag "pub_bibtex_year" -%>
<%= f.submit %> diff -r dfa5d63d40b4 -r e48a7a36491b vendor/plugins/redmine_bibliography/app/views/publications/parse_bibtex.rjs --- a/vendor/plugins/redmine_bibliography/app/views/publications/parse_bibtex.rjs Thu Dec 06 18:09:40 2012 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/parse_bibtex.rjs Thu Dec 06 21:45:34 2012 +0000 @@ -6,10 +6,10 @@ page.insert_html :bottom, :suggest_bibtex_authors, :partial => "suggest_author", :locals => {:suggestions => auth, :index => idx} end - page[:publication_title].value = @publication.title + page[:pub_bibtex_title].value = @publication.title @publication.bibtex_entry.attributes.each do |k,v| - page["publication_bibtex_entry_attributes_#{k}"].value = v.to_s unless v.nil? + page["pub_bibtex_#{k}"].value = v.to_s unless v.nil? end else