Revision 448:0a5d997578da vendor/plugins

View differences:

vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb
23 23
  def create
24 24
    @publication = Publication.new(params[:publication])
25 25

  
26
    if @publication.save
26
    if @publication.save 
27 27
      flash[:notice] = "Successfully created publication."
28 28
      redirect_to @publication
29 29
    else
......
43 43

  
44 44
    # method for creating "pasted" bibtex entries
45 45
    if bibtex_entry
46
      logger.error "ANTES PARSE"      
47 46
      parse_bibtex_list bibtex_entry    
48
      logger.error "DEPOIS PARSE"
49 47
    end
50 48

  
51 49
    # form's flow control
......
65 63
  end
66 64

  
67 65
  def update    
68
    @publication = Publication.find(params[:id])
69
        
66
    @publication = Publication.find(params[:id])        
70 67
    if @publication.update_attributes(params[:publication])
71 68
      flash[:notice] = "Successfully updated Publication."
69
      redirect_to @publication
72 70
    else
73
      flash[:notice] = "Could not Update Publication."
74
    end
75
    
71
      render :action => 'edit'
72
    end   
76 73
  end
77 74

  
78 75
  def show

Also available in: Unified diff