From 113449eacba67625004b14081f4cc0cc3b984553 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 2 Mar 2009 17:22:48 +0100 Subject: added unlock functionality. not yet hooked up with permissions though. anybody can unlock. put a confirmation in front of it. destroy has to be confirmed as well --- app/views/nodes/index.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index 1429d1a..833ffed 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb @@ -23,7 +23,8 @@ <%= link_to 'Show', node_path(node) %> <%= link_to 'Edit', edit_node_path(node) %> - <%= link_to 'Destroy', node, :method => :delete %> + <%= 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?" %> <%= "#{node.draft.user.login}" if node.draft && node.draft.user %> -- cgit v1.3