diff vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 951:010291c90b0b bibplugin_bibtex

Fixes a bug with the authors div - it was being replicated for each author; added a fieldset in order to better handle each author; simulates a click for each author in the parsing of the bibtex file.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 03 Aug 2012 18:33:08 +0100
parents be4106d14a35
children ef882e222003
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Wed Jul 18 16:57:54 2012 +0100
+++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb	Fri Aug 03 18:33:08 2012 +0100
@@ -43,10 +43,21 @@
             bibtex_entry_no = BibtexEntryType.find_by_name(bib[0].type.to_s).id
             page["publication_title"].value = bib[0][:title]
             page["publication_bibtex_entry_attributes_entry_type"].value = bibtex_entry_no
-
+            
             BibtexEntryType.fields(bibtex_entry_no).each do |field|
               page["publication_bibtex_entry_attributes_#{field}"].value = bib[0][field]
             end
+
+            # for each author simulates a click and fills the author info                        
+            bib[0].authors.each do |author|            
+              page["add_another_author"].click
+#              page.alert(bib[0].authors.length)
+#              page.alert(page["authors"].first.id)
+            
+            end
+            
+
+
           }
         }
       end