From edd450502f74dcbe8175dfddee8b50d14424a390 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 13 Jun 2009 15:42:13 +0200 Subject: 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. --- app/views/nodes/edit.html.erb | 7 ++++++- app/views/nodes/show.html.erb | 40 +++++++++++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 10 deletions(-) (limited to 'app/views/nodes') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index e957b5d..f37a24b 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -1,6 +1,7 @@ <% content_for :subnavigation do %> <%= link_to 'metadata', '#', :id => 'button', :class => "unselected" %> - <%= link_to 'Preview', @node %> + <%= link_to 'Show', @node %> + <%= link_to 'Preview', preview_page_path(@draft) %> <%= link_to 'Publish', publish_node_path, :method => :put, :confirm => "Publish this draft?" %> <%= link_to 'Revisions', revision_path(params[:id]) %> <% end %> @@ -35,6 +36,10 @@ + + + + diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index bbbefe9..8aaedc5 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -1,9 +1,31 @@ -

Node

-

-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 %>. -

-

- View the revisions of this node -

\ No newline at end of file +<% content_for :subnavigation do %> + <%= link_to 'Edit', edit_node_path(@node), :id => 'button', :class => "unselected" %> + <%= link_to 'Preview', preview_page_path(@page) %> + <%= link_to 'Revisions', revision_path(params[:id]) %> +<% end %> + + +
+
Title <%= d.text_field :title %>
+ + + + + + + + + + + + + + + + + + + + +
Title<%= @page.title %>
Abstract<%= @page.abstract %>
Body<%= @page.body %>
+ \ No newline at end of file -- cgit v1.3