From: Imre Farkas<ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=770807
---
.../views/deployables/_new_from_image.html.haml | 16 ++++++++++------
src/config/locales/en.yml | 1 +
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/app/views/deployables/_new_from_image.html.haml
b/src/app/views/deployables/_new_from_image.html.haml
index d11ff29..d57c5ed 100644
--- a/src/app/views/deployables/_new_from_image.html.haml
+++ b/src/app/views/deployables/_new_from_image.html.haml
@@ -26,12 +26,16 @@
 
%div.catalog_list
%ul.more
- - @catalogs.each do |catalog|
- %li.catalog
- .catalog_with_checkbox
- = check_box_tag 'catalog_id[]', catalog.id,
@selected_catalogs.any?{|c| c.id == catalog.id}
- = catalog.name
- .clear
+ - if @catalogs.empty?
+ = t('deployables.new_from_image.no_available_catalog')
+ - else
+ - @catalogs.each do |catalog|
+ %li.catalog
+ .catalog_with_checkbox
+ = check_box_tag 'catalog_id[]', catalog.id,
@selected_catalogs.any?{|c| c.id == catalog.id}
+ = catalog.name
+ .clear
+
.clear
.centered
%fieldset.align-center
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 4be4510..adbbf04 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -792,6 +792,7 @@ en:
catalog_entry_name: "%{name}"
title: Create Deployable
description: "Creating a deployable from the \"%{name}\" component
outline will allow it to be built and launched. Simply choose a catalog in which to store
the deployable, and define a default cloud resource profile."
+ no_available_catalog: 'No available catalog exists'
show:
images: "Images"
launch: "Launch"