Mercurial > hg > soundsoftware-site
comparison vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 652:0c872fe77797 feature_36
Merge from 649:525f48af3f54
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 09 Sep 2011 14:19:25 +0100 |
parents | 525f48af3f54 |
children | 6246ad0f9e98 |
comparison
equal
deleted
inserted
replaced
651:f029431de4dd | 652:0c872fe77797 |
---|---|
15 # we'll always want a new publication to have its bibtex entry | 15 # we'll always want a new publication to have its bibtex entry |
16 @publication.build_bibtex_entry | 16 @publication.build_bibtex_entry |
17 | 17 |
18 # and at least one author | 18 # and at least one author |
19 # @publication.authorships.build.build_author | 19 # @publication.authorships.build.build_author |
20 @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] | 20 @author_options = [["#{User.current.name} (@#{User.current.mail.partition('@')[2]})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] |
21 | 21 |
22 | 22 |
23 end | 23 end |
24 | 24 |
25 def create | 25 def create |
77 | 77 |
78 @options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] | 78 @options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] |
79 @publication = Publication.find(params[:id]) | 79 @publication = Publication.find(params[:id]) |
80 @selected_bibtex_entry_type_id = @publication.bibtex_entry.entry_type | 80 @selected_bibtex_entry_type_id = @publication.bibtex_entry.entry_type |
81 | 81 |
82 # todo: should be removed? | 82 @author_options = [] |
83 @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] | |
84 end | 83 end |
85 | 84 |
86 def update | 85 def update |
87 @publication = Publication.find(params[:id]) | 86 @publication = Publication.find(params[:id]) |
88 | 87 |