Mercurial > hg > soundsoftware-site
changeset 1110:e48a7a36491b bibplugin_bibtex
adds the parsed publication fields to hidden fields in the form (incomplete)
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 06 Dec 2012 21:45:34 +0000 |
parents | dfa5d63d40b4 |
children | 7d62d2f497c5 |
files | vendor/plugins/redmine_bibliography/app/views/publications/new/_bibtex.html.erb vendor/plugins/redmine_bibliography/app/views/publications/parse_bibtex.rjs |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <h3>Preview and correct</h3> <div class="box" id="ieee_prev"><h3>Preview</h3></div> - <div class="box" id="suggest_bibtex_authors"><h3>Authors</h3></div> + + <div class="box" id="suggest_bibtex_authors"></div> </div> <div id="publication_info"> - <%= 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" -%> </div> <%= f.submit %>
--- 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