Diff
Modified: branches/wf4ever/app/controllers/packs_controller.rb (3377 => 3378)
--- branches/wf4ever/app/controllers/packs_controller.rb 2013-01-30 05:48:20 UTC (rev 3377)
+++ branches/wf4ever/app/controllers/packs_controller.rb 2013-01-30 05:50:45 UTC (rev 3378)
@@ -129,6 +129,15 @@
render :resource_show
end
+ def destroy_resource
+
+ session = ROSRS::Session.new(@pack.ro_uri, Conf.rodl_bearer_token)
+
+ session.delete_resource(@pack.ro_uri + params[:resource_path])
+
+ render(:partial => "items", :locals => { :pack => @pack, :authorised_to_edit => @authorised_to_edit })
+ end
+
def transform_wf(ruri)
service_uri = "http://sandbox.wf4ever-project.org/wf-ro/jobs"
format = "application/vnd.taverna.t2flow+xml"
@@ -567,6 +576,7 @@
"create_resource" => "edit",
"destroy" => "destroy",
"destroy_item" => "destroy",
+ "destroy_resource" => "edit",
"download" => "download",
"edit" => "edit",
"edit_item" => "edit",
Modified: branches/wf4ever/app/views/packs/_items.rhtml (3377 => 3378)
--- branches/wf4ever/app/views/packs/_items.rhtml 2013-01-30 05:48:20 UTC (rev 3377)
+++ branches/wf4ever/app/views/packs/_items.rhtml 2013-01-30 05:50:45 UTC (rev 3378)
@@ -107,6 +107,13 @@
<% if not types.empty? %>
(<%= types -%>)
<% end %>
+ <%= link_to_remote("<img src='' />",
+ :update => "pack_items",
+ :url ="" pack_resources_path(pack) + '/' + e.ro_local_uri,
+ :method => :delete,
+ :complete => "new Effect.Highlight('pack_items', { duration: 1.5 });",
+ :confirm => "Are you sure you want to delete this resource?" )
+ %>
</li>
<% end %>
<% end %>
Modified: branches/wf4ever/app/views/packs/show.rhtml (3377 => 3378)
--- branches/wf4ever/app/views/packs/show.rhtml 2013-01-30 05:48:20 UTC (rev 3377)
+++ branches/wf4ever/app/views/packs/show.rhtml 2013-01-30 05:50:45 UTC (rev 3378)
@@ -104,7 +104,9 @@
Items <span class="count_text">(<%= @pack.items_count -%>)</span>
</h4>
- <%= render :partial => "items", :locals => { :pack => @pack, :authorised_to_edit => @authorised_to_edit } -%>
+ <div id="pack_items">
+ <%= render :partial => "items", :locals => { :pack => @pack, :authorised_to_edit => @authorised_to_edit } -%>
+ </div>
<br/><br/>
<h4>