From 7f82b8e23ec9b76d0b8a417b2d2b577aeaf7a55f Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 15 Mar 2009 19:27:37 +0100 Subject: adding revision links to the interface. disabling destroy for now --- app/views/nodes/index.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/nodes') diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index a2a42b1..31cd53c 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb @@ -24,7 +24,8 @@ <%= link_to 'Show', node_path(node) %> <%= link_to 'Edit', edit_node_path(node) %> - <%= link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> + <%= link_to 'Revision', :controller => :revisions, :action => :show, :id => node.id %> + <%# link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> <%= link_to 'Unlock', unlock_node_path(node), :method => :put, :confirm => "Are you sure you want to unlock?" %> -- cgit v1.3 From b7f67dc8527c6b404fa9682f07c7a1068bb83c7f Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 15 Mar 2009 19:45:46 +0100 Subject: interface interlinks --- app/views/nodes/edit.html.erb | 2 ++ app/views/revisions/index.html.erb | 1 - app/views/revisions/show.html.erb | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views/nodes') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 2dade0f..577a075 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -2,6 +2,8 @@ <%= link_to 'Show', @node %> <%= link_to 'Back', nodes_path %> <%= link_to 'Publish', publish_node_path, :method => :put %> + <%= link_to 'Diff revisions', :controller => :revisions, :action => :diff, :id => params[:id] %> +

Editing page

diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index b41a77c..e3134d7 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb @@ -1,2 +1 @@

Revisions#index

-

Find me in app/views/revisions/index.html.erb

diff --git a/app/views/revisions/show.html.erb b/app/views/revisions/show.html.erb index c63e7e8..64979fc 100644 --- a/app/views/revisions/show.html.erb +++ b/app/views/revisions/show.html.erb @@ -1,5 +1,6 @@

Revisions for Node: <%= @node.unique_name %>

-- cgit v1.3 From 2d06e3bd5b484ef06f871b589bfabf6307bca1db Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 15 Mar 2009 20:08:31 +0100 Subject: More linkage for revisions --- app/views/admin/index.html.erb | 2 ++ app/views/nodes/show.html.erb | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'app/views/nodes') diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index 00a5c09..c5bb5de 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -14,6 +14,8 @@ <%= draft.node.unique_name %> <%= draft.user.login rescue "" %> <%= link_to 'Show', node_path(draft.node) %> + <%= link_to "Diff revisions", :controller => :revisions, :action => :diff, :id => draft.node.id %> + <%= link_to "Publish", publish_node_path(draft.node), :method => :put, :confirm => "Do you really want to publish?" %> <% end %> diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index 67dd7fc..bbbefe9 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -1,5 +1,9 @@

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 %>. \ No newline at end of file +<%= link_to_path 'published version', @node.unique_path %>. +

+

+ View the revisions of this node +

\ No newline at end of file -- cgit v1.3 From ca08b36ca6bd874abbb7207495860eeeb53884e0 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 15 Mar 2009 20:19:05 +0100 Subject: this was the wrong revision number --- app/views/nodes/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/nodes') diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index 31cd53c..ad60498 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb @@ -23,7 +23,7 @@ <%= node.unique_name %> <%= link_to 'Show', node_path(node) %> - <%= link_to 'Edit', edit_node_path(node) %> + <%= link_to 'Edit', edit_node_path(node) %> <%= link_to 'Revision', :controller => :revisions, :action => :show, :id => node.id %> <%# link_to 'Destroy', node, :method => :delete, :confirm => "Are you sure you want to delete this node?" %> <%= link_to 'Unlock', unlock_node_path(node), :method => :put, :confirm => "Are you sure you want to unlock?" %> @@ -32,7 +32,7 @@ <%= "#{node.draft.user.login}" if node.draft && node.draft.user %> - <%= node.head.revision if node.head %> + <%= node.pages.length %> <% end %> -- cgit v1.3