myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3640] branches/packs/app: added delete button fo


From: noreply
Subject: [myexperiment-hackers] [3640] branches/packs/app: added delete button for resources
Date: Wed, 28 Aug 2013 14:48:17 +0000 (UTC)

Revision
3640
Author
dgc
Date
2013-08-28 14:48:16 +0000 (Wed, 28 Aug 2013)

Log Message

added delete button for resources

Modified Paths

Diff

Modified: branches/packs/app/controllers/packs_controller.rb (3639 => 3640)


--- branches/packs/app/controllers/packs_controller.rb	2013-08-28 13:25:34 UTC (rev 3639)
+++ branches/packs/app/controllers/packs_controller.rb	2013-08-28 14:48:16 UTC (rev 3640)
@@ -508,7 +508,7 @@
     # Delete the resource
     @item.destroy
 
-    render pack_path(@pack)
+    redirect_to @pack
   end
 
   protected

Modified: branches/packs/app/views/packs/show.rhtml (3639 => 3640)


--- branches/packs/app/views/packs/show.rhtml	2013-08-28 13:25:34 UTC (rev 3639)
+++ branches/packs/app/views/packs/show.rhtml	2013-08-28 14:48:16 UTC (rev 3640)
@@ -178,9 +178,7 @@
           <th>Size</th>
           <th>Content type</th>
           <th>Annotations</th>
-          <% if false %>
           <th></th>
-          <% end %>
         </tr>
         <% @pack.research_object.resources.each do |resource| %>
           <% ore_path = resource.ore_path %>
@@ -191,14 +189,12 @@
             <td><%=h resource.size -%></td>
             <td><%=h resource.content_type -%></td>
             <td><%=h resource.annotations.count -%></td>
-            <% if false %>
             <td>
-              <%= link_to_remote("<img src='' />",
-                  :url ="" pack_item_path(@pack, resource.ore_path),
+              <%= link_to("<img src='' />",
+                  pack_item_path(@pack, resource.ore_path),
                   :method => :delete,
-                  :confirm => "Are you sure you want to delete this item?" ) %>
+                  :confirm => "Are you sure you want to delete this item?") %>
             </td>
-            <% end %>
           </tr>
         <% end %>
       </table>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]