diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/page_translations_controller.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index bff1733..9c5d228 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -147,7 +147,7 @@ class NodesController < ApplicationController | |||
| 147 | end | 147 | end |
| 148 | 148 | ||
| 149 | def publish | 149 | def publish |
| 150 | @node.publish_draft! | 150 | @node.publish_draft!(current_user) |
| 151 | flash[:notice] = "Draft has been published" | 151 | flash[:notice] = "Draft has been published" |
| 152 | redirect_to node_path(@node) | 152 | redirect_to node_path(@node) |
| 153 | end | 153 | end |
diff --git a/app/controllers/page_translations_controller.rb b/app/controllers/page_translations_controller.rb index 38a7c4f..be4f488 100644 --- a/app/controllers/page_translations_controller.rb +++ b/app/controllers/page_translations_controller.rb | |||
| @@ -63,6 +63,9 @@ class PageTranslationsController < ApplicationController | |||
| 63 | draft.translations.where(:locale => @locale).delete_all | 63 | draft.translations.where(:locale => @locale).delete_all |
| 64 | draft.reload | 64 | draft.reload |
| 65 | 65 | ||
| 66 | NodeAction.record!(:node => @node, :page => draft, :user => current_user, | ||
| 67 | :action => "translation_destroy", :locale => @locale) | ||
| 68 | |||
| 66 | flash[:notice] = "#{@locale.upcase} translation removed from the draft. Publish to make this permanent." | 69 | flash[:notice] = "#{@locale.upcase} translation removed from the draft. Publish to make this permanent." |
| 67 | redirect_to node_path(@node) | 70 | redirect_to node_path(@node) |
| 68 | rescue LockedByAnotherUser => e | 71 | rescue LockedByAnotherUser => e |
