From e055502fe81469d1f96f41e3dbf70d2ed9ac33fe Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Mar 2009 23:45:52 +0100 Subject: added basic preview feature. If a draft exists, the show action renders a proper preview. If not the default show template is rendered. --- app/views/layouts/application.html.erb | 3 ++- app/views/nodes/_preview.html.erb | 5 +++++ app/views/nodes/show.html.erb | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 app/views/nodes/_preview.html.erb (limited to 'app/views') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1446e14..e6317fd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,10 +12,11 @@ + <%= render :partial => 'nodes/preview' if params[:action] == "show" %> - +