Revision 444:b461f84ed41a vendor/plugins
| vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb | ||
|---|---|---|
| 5 | 5 |
unloadable |
| 6 | 6 |
|
| 7 | 7 |
def new |
| 8 |
# we always try to create at least one publication |
|
| 9 |
@publication = Publication.new |
|
| 8 |
@publication = Publication.new |
|
| 10 | 9 |
|
| 11 | 10 |
# the step we're at in the form |
| 12 | 11 |
@publication.current_step = session[:publication_step] |
| 13 | 12 |
|
| 14 | 13 |
@new_publications = [] |
| 15 | 14 |
session[:publications] ||= {}
|
| 16 |
|
|
| 17 | 15 |
end |
| 18 | 16 |
|
| 19 | 17 |
def create |
| ... | ... | |
| 53 | 51 |
end |
| 54 | 52 |
|
| 55 | 53 |
def edit |
| 54 |
|
|
| 56 | 55 |
@publication = Publication.find(params[:id]) |
| 57 | 56 |
|
| 58 | 57 |
end |
| ... | ... | |
| 145 | 144 |
end |
| 146 | 145 |
|
| 147 | 146 |
author.authorships.create!( |
| 148 |
:publication => @publication, |
|
| 149 |
:institution => institution, |
|
| 150 |
:email => email, |
|
| 151 |
:order => idx) |
|
| 147 |
:publication => @publication,
|
|
| 148 |
:institution => institution,
|
|
| 149 |
:email => email,
|
|
| 150 |
:order => idx)
|
|
| 152 | 151 |
|
| 153 | 152 |
end |
| 154 | 153 |
end |
| ... | ... | |
| 158 | 157 |
|
| 159 | 158 |
end |
| 160 | 159 |
|
| 160 |
def import |
|
| 161 |
@publication = Publication.new |
|
| 162 |
|
|
| 163 |
|
|
| 164 |
end |
|
| 161 | 165 |
|
| 162 | 166 |
def review_new_entries |
| 163 | 167 |
|
| vendor/plugins/redmine_bibliography/app/views/publications/import.html.erb | ||
|---|---|---|
| 1 |
<h1>New Publication</h1> |
|
| 2 |
|
|
| 3 |
<% form_for @publication, :url => { :action => "create" } do |f| %>
|
|
| 4 |
<% f.error_messages %> |
|
| 5 |
|
|
| 6 |
<%= render :partial => "#{@publication.current_step}_bibtex_step", :locals => { :f => f } %>
|
|
| 7 |
|
|
| 8 |
<p><%= f.submit "Submit" %></p> |
|
| 9 |
<p><%= f.submit "Back", :name => "back_button" unless @publication.first_step? %></p> |
|
| 10 |
|
|
| 11 |
<% end %> |
|
| 12 |
|
|
| vendor/plugins/redmine_bibliography/app/views/publications/new.html.erb | ||
|---|---|---|
| 1 | 1 |
<h1>New Publication</h1> |
| 2 | 2 |
|
| 3 |
<% form_for @publication, :url => { :action => "create" } do |f| %>
|
|
| 4 |
<% f.error_messages %> |
|
| 3 |
<%= render :partial => 'edit' %> |
|
| 5 | 4 |
|
| 6 |
<%= render :partial => "#{@publication.current_step}_bibtex_step", :locals => { :f => f } %>
|
|
| 7 |
|
|
| 8 |
<p><%= f.submit "Submit" %></p> |
|
| 9 |
<p><%= f.submit "Back", :name => "back_button" unless @publication.first_step? %></p> |
|
| 10 |
|
|
| 11 |
<% end %> |
|
| 12 |
|
|
| vendor/plugins/redmine_bibliography/config/routes.rb | ||
|---|---|---|
| 1 |
ActionController::Routing::Routes.draw do |map| |
|
| 2 |
map.resources :publications |
|
| 3 |
end |
|
Also available in: Unified diff