summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-06-13 15:42:13 +0200
committerhukl <contact@smyck.org>2009-06-13 15:42:13 +0200
commitedd450502f74dcbe8175dfddee8b50d14424a390 (patch)
treec5b8c1b9b4ba57151cc72a6235e10807916ddeb4 /app/controllers
parent4b60f3637c63c40f7b542bcb89cc48f0a6315e0b (diff)
added js search widget with clickable results that will take the user to the brand new "show" version of the page. so the user doesn't create new revisions and locks all the time when he / she only wants to take a look at it.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_controller.rb2
-rw-r--r--app/controllers/nodes_controller.rb8
2 files changed, 1 insertions, 9 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 8d7d2ea..517506f 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -19,7 +19,7 @@ class AdminController < ApplicationController
19 format.html 19 format.html
20 format.js do 20 format.js do
21 render( :json => @results.map do |node| 21 render( :json => @results.map do |node|
22 {:id => node.id, :title => node.title} 22 {:id => node.id, :title => node.title, :edit_path => node_path(node)}
23 end 23 end
24 ) 24 )
25 25
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index 1c7278c..09d0c52 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -40,14 +40,6 @@ class NodesController < ApplicationController
40 40
41 def show 41 def show
42 @page = Node.find(params[:id]).pages.last 42 @page = Node.find(params[:id]).pages.last
43
44 if @page
45 template = @page.valid_template
46 render(
47 :file => template,
48 :layout => "application"
49 )
50 end
51 end 43 end
52 44
53 def edit 45 def edit