diff options
| author | erdgeist <erdgeist@bauklotz.local> | 2009-03-10 19:59:02 +0100 |
|---|---|---|
| committer | erdgeist <erdgeist@bauklotz.local> | 2009-03-10 19:59:02 +0100 |
| commit | d6049aeffc7de43393a9a7a1d2f95f26422a046f (patch) | |
| tree | 7036f509aa4f4a518a00ddb0e12fe8a6eb4d563a /app/controllers/nodes_controller.rb | |
| parent | 3b3158199f147646348fae0008d3f63062967a87 (diff) | |
| parent | 14ada6b405dac2bea27a2959f6f73a7398776b0b (diff) | |
Merge branch 'master' of ssh://git@svn.medienhaus.udk-berlin.de/usr/local/git/cccms
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 81ead62..0c961b7 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -32,7 +32,7 @@ class NodesController < ApplicationController | |||
| 32 | 32 | ||
| 33 | if parent and @node.save | 33 | if parent and @node.save |
| 34 | @node.move_to_child_of parent | 34 | @node.move_to_child_of parent |
| 35 | redirect_to(@node) | 35 | redirect_to(edit_node_path(@node)) |
| 36 | else | 36 | else |
| 37 | @node.errors.add("Parent node") | 37 | @node.errors.add("Parent node") |
| 38 | render :action => :new | 38 | render :action => :new |
| @@ -40,7 +40,15 @@ class NodesController < ApplicationController | |||
| 40 | end | 40 | end |
| 41 | 41 | ||
| 42 | def show | 42 | def show |
| 43 | @nodes = Node.find(params[:id]).children | 43 | @page = Node.find(params[:id]).draft |
| 44 | |||
| 45 | if @page | ||
| 46 | template = @page.valid_template | ||
| 47 | render( | ||
| 48 | :file => template, | ||
| 49 | :layout => "application" | ||
| 50 | ) | ||
| 51 | end | ||
| 44 | end | 52 | end |
| 45 | 53 | ||
| 46 | def edit | 54 | def edit |
