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/nodes/_preview.html.erb | 5 +++++ app/views/nodes/show.html.erb | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 app/views/nodes/_preview.html.erb (limited to 'app/views/nodes') diff --git a/app/views/nodes/_preview.html.erb b/app/views/nodes/_preview.html.erb new file mode 100644 index 0000000..e8d7b9f --- /dev/null +++ b/app/views/nodes/_preview.html.erb @@ -0,0 +1,5 @@ +
+ Preview draft. + Clicking on links will redirected you to the public site. + <%= link_to 'Back to admin interface', nodes_path %> +
Node -<%= @node.unique_name %> - -<%= link_to 'Edit', edit_node_path %> \ No newline at end of file +There is no draft to preview. Click <%= link_to 'edit', edit_node_path %> to +create one or view the currently +<%= link_to_path 'published version', @node.unique_path %>. \ No newline at end of file -- cgit v1.3