[PATCH conductor 02/10] Hides build and upload buttons for imported images

Matt Wagner matt.wagner at redhat.com
Thu Dec 15 18:53:48 UTC 2011


---
 src/app/views/images/show.html.haml |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 898ba16..9da24ab 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -5,6 +5,7 @@
     =t'return_to'
     = link_to t('images.index.images'), images_path, :class => 'rounded-link'
     .button-group
+    - unless @image.imported?
       = link_to t('.new_deployable_from_image'), new_deployable_path(:create_from_image => @image.id), :class => 'button pill'
       = button_to t("delete"), image_path(@image.id), :method => 'delete', :confirm => "Are you sure you want to delete?", :class => 'button pill danger', :id => 'delete'
 
@@ -16,7 +17,8 @@
       = form_tag image_path(@image.id), :method => :get do
         = select_tag :build, options_for_build_select(@builds, @build, @latest_build)
         = submit_tag t('.select_build'), :id => 'seletect_build_button'
-      = button_to t('.rebuild_all'), rebuild_all_image_path(@image.id), :class => 'button pill'
+      - unless @image.imported?
+        = button_to t('.rebuild_all'), rebuild_all_image_path(@image.id), :class => 'button pill'
   .content
     %ul.image_builds
       - @account_groups.each do |driver, group|
-- 
1.7.6.4




More information about the aeolus-devel mailing list