Mercurial > hg > soundsoftware-site
changeset 683:c3e6c51170fa feature_36
Feature #238 - the New Publication now shows all fields correctly.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 16 Sep 2011 11:14:10 +0100 |
parents | 7e887544be06 |
children | cd7e10c4ab86 |
files | vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Thu Sep 15 15:39:07 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Fri Sep 16 11:14:10 2011 +0100 @@ -63,7 +63,7 @@ end def get_bibtex_required_fields - all_fields = ["editor", "publisher", "chapter", "pages", "volume", "series", "address", "edition", "year", "note", "institution", "type", "number", "month", "journal", "howpublished", "key", "school"] + all_fields = [ "editor", "publisher", "chapter", "pages", "volume", "series", "address", "edition", "year", "type", "note", "number", "journal", "howpublished", "key", "school", "month" ] fields = Hash.new fields[ 'article' ] = [ 'journal', 'year', 'volume', 'number', 'pages', 'month', 'note' ] @@ -78,7 +78,7 @@ fields[ 'misc' ] = [ 'howpublished', 'month', 'year', 'note' ] fields[ 'phdthesis' ] = [ 'school', 'year', 'address', 'month', 'note' ] fields[ 'proceedings' ] = [ 'booktitle', 'year', 'editor', 'pages', 'organization', 'publisher', 'address', 'month', 'note' ] - fields[ 'techreport' ] = [ 'institution', 'year', 'type', 'number', 'address', 'month', 'note' ] + fields[ 'techreport' ] = [ 'year', 'type', 'number', 'address', 'month', 'note' ] fields[ 'unpublished' ] = [ 'note', 'month', 'year' ] entrytype = BibtexEntryType.find(params[:value]).name @@ -86,14 +86,11 @@ respond_to do |format| format.js { render(:update) {|page| - all_fields.each do |field| - - - + all_fields.each_with_index do |field, idx| unless fields[entrytype].include? field - page["publication_bibtex_entry_attributes_#{field}"].up('p').hide() - else - page["publication_bibtex_entry_attributes_#{field}"].up('p').show() + page["publication_bibtex_entry_attributes_#{field}"].up('p').hide() + else + page["publication_bibtex_entry_attributes_#{field}"].up('p').show() end end }
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb Thu Sep 15 15:39:07 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb Fri Sep 16 11:14:10 2011 +0100 @@ -12,6 +12,9 @@ <%= f.text_field :year, :size => 4, :class => 'bibtex' %> </p> <p> + <%= f.text_field :month, :size => 4, :class => 'bibtex' %> +</p> +<p> <%= f.text_field :chapter, :size => 15, :class => 'bibtex' %> </p> <p>