diff options
| author | hukl <contact@smyck.org> | 2009-03-08 23:45:52 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-08 23:45:52 +0100 |
| commit | e055502fe81469d1f96f41e3dbf70d2ed9ac33fe (patch) | |
| tree | 184fb187cd89c27914815a1f8a93d826cc5b07c5 /app/views/nodes | |
| parent | 2aab7eaa19dcd2d86012f71954b8543572f8eaa5 (diff) | |
added basic preview feature. If a draft exists, the show action renders a proper preview. If not the default show template is rendered.
Diffstat (limited to 'app/views/nodes')
| -rw-r--r-- | app/views/nodes/_preview.html.erb | 5 | ||||
| -rw-r--r-- | app/views/nodes/show.html.erb | 6 |
2 files changed, 8 insertions, 3 deletions
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 @@ | |||
| 1 | <div id="preview_disclaimer"> | ||
| 2 | <strong>Preview draft.</strong> | ||
| 3 | Clicking on links will redirected you to the public site. | ||
| 4 | <%= link_to 'Back to admin interface', nodes_path %> | ||
| 5 | </div \ No newline at end of file | ||
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index dd37c28..67dd7fc 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <h1>Node</h1> | 1 | <h1>Node</h1> |
| 2 | 2 | ||
| 3 | <%= @node.unique_name %> | 3 | There is no draft to preview. Click <%= link_to 'edit', edit_node_path %> to |
| 4 | 4 | create one or view the currently | |
| 5 | <%= link_to 'Edit', edit_node_path %> \ No newline at end of file | 5 | <%= link_to_path 'published version', @node.unique_path %>. \ No newline at end of file |
