comparison vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 620:df7551a82bbe feature_36

Fixed issue with "default" user list in the Author Search select.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 24 Aug 2011 13:56:47 +0100
parents 712324fee0c0
children e2663e0bd5a6
comparison
equal deleted inserted replaced
618:18e0709fd0d9 620:df7551a82bbe
19 # we'll always want a new publication to have its bibtex entry 19 # we'll always want a new publication to have its bibtex entry
20 @publication.build_bibtex_entry 20 @publication.build_bibtex_entry
21 21
22 # and at least one author 22 # and at least one author
23 # @publication.authorships.build.build_author 23 # @publication.authorships.build.build_author
24 @author_options = [User.current] 24 @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]]
25 25
26 26
27 end 27 end
28 28
29 def create 29 def create
30 @project = Project.find(params[:project_id]) 30 @project = Project.find(params[:project_id])
31 31
32 @author_options = [User.current] 32 @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]]
33 33
34 @publication = Publication.new(params[:publication]) 34 @publication = Publication.new(params[:publication])
35 @publication.projects << @project unless @project.nil? 35 @publication.projects << @project unless @project.nil?
36 36
37 if @publication.save 37 if @publication.save
77 def edit 77 def edit
78 find_project_by_project_id unless params[:project_id].nil? 78 find_project_by_project_id unless params[:project_id].nil?
79 79
80 @edit_view = true; 80 @edit_view = true;
81 81
82 @author_options = [] 82 @options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]]
83 @publication = Publication.find(params[:id]) 83 @publication = Publication.find(params[:id])
84 @selected_bibtex_entry_type_id = @publication.bibtex_entry.entry_type 84 @selected_bibtex_entry_type_id = @publication.bibtex_entry.entry_type
85 end 85 end
86 86
87 def update 87 def update