Mercurial > hg > soundsoftware-site
diff vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 444:b461f84ed41a feature_36
Publications: Routes for regular REST behaviour; Import view and controller action; New beahviour for new action.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Sat, 04 Jun 2011 18:08:01 +0100 |
parents | 27930c9b424d |
children | 77f88379115a |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Thu Jun 02 14:39:11 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Sat Jun 04 18:08:01 2011 +0100 @@ -5,15 +5,13 @@ unloadable def new - # we always try to create at least one publication - @publication = Publication.new + @publication = Publication.new # the step we're at in the form @publication.current_step = session[:publication_step] @new_publications = [] session[:publications] ||= {} - end def create @@ -53,6 +51,7 @@ end def edit + @publication = Publication.find(params[:id]) end @@ -145,10 +144,10 @@ end author.authorships.create!( - :publication => @publication, - :institution => institution, - :email => email, - :order => idx) + :publication => @publication, + :institution => institution, + :email => email, + :order => idx) end end @@ -158,6 +157,11 @@ end + def import + @publication = Publication.new + + + end def review_new_entries