Revision 951:010291c90b0b vendor/plugins/redmine_bibliography/app/controllers
| vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb | ||
|---|---|---|
| 43 | 43 |
bibtex_entry_no = BibtexEntryType.find_by_name(bib[0].type.to_s).id |
| 44 | 44 |
page["publication_title"].value = bib[0][:title] |
| 45 | 45 |
page["publication_bibtex_entry_attributes_entry_type"].value = bibtex_entry_no |
| 46 |
|
|
| 46 |
|
|
| 47 | 47 |
BibtexEntryType.fields(bibtex_entry_no).each do |field| |
| 48 | 48 |
page["publication_bibtex_entry_attributes_#{field}"].value = bib[0][field]
|
| 49 | 49 |
end |
| 50 |
|
|
| 51 |
# for each author simulates a click and fills the author info |
|
| 52 |
bib[0].authors.each do |author| |
|
| 53 |
page["add_another_author"].click |
|
| 54 |
# page.alert(bib[0].authors.length) |
|
| 55 |
# page.alert(page["authors"].first.id) |
|
| 56 |
|
|
| 57 |
end |
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 50 | 61 |
} |
| 51 | 62 |
} |
| 52 | 63 |
end |
Also available in: Unified diff