deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [3/3] git commit: Core: Display :destroy_image link only if driver support this operation
Date Mon, 21 Jan 2013 10:34:00 GMT
Updated Branches:
  refs/heads/master ad9286a34 -> c06f3d2fd


Core: Display :destroy_image link only if driver support this operation


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/204072a4
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/204072a4
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/204072a4

Branch: refs/heads/master
Commit: 204072a4d8f149f17c1c30f7527ddbc339ddda78
Parents: ad9286a
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Jan 17 12:47:11 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Jan 21 11:33:22 2013 +0100

----------------------------------------------------------------------
 server/views/images/show.xml.haml |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/204072a4/server/views/images/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/images/show.xml.haml b/server/views/images/show.xml.haml
index 6350706..db33666 100644
--- a/server/views/images/show.xml.haml
+++ b/server/views/images/show.xml.haml
@@ -15,4 +15,5 @@
         %hardware_profile{ :href => hardware_profile_url(profile.id), :id => profile.id,
:rel => :hardware_profile }
   %actions
     %link{ :rel => 'create_instance', :method => :post, :href => "#{instances_url};image_id=#{@image.id}"}
-    %link{ :rel => 'destroy_image', :method => :delete, :href => "#{destroy_image_url(@image.id)}"
}
+    - if driver.respond_to? :destroy_image
+      %link{ :rel => 'destroy_image', :method => :delete, :href => "#{destroy_image_url(@image.id)}"
}


Mime
View raw message