[PATCH conductor] Fix catalog dropdown when no catalog exist, bz769279

Jirka Tomasek jtomasek at redhat.com
Wed Dec 21 16:13:44 UTC 2011


On 12/21/2011 01:19 PM, jtomasek at redhat.com wrote:
> From: Jiri Tomasek<jtomasek at redhat.com>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=769279
> ---
>   src/app/views/layouts/_catalog_dropdown.html.haml |    8 ++++++--
>   src/config/locales/en.yml                         |    2 ++
>   2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/app/views/layouts/_catalog_dropdown.html.haml b/src/app/views/layouts/_catalog_dropdown.html.haml
> index 837b349..311cb28 100644
> --- a/src/app/views/layouts/_catalog_dropdown.html.haml
> +++ b/src/app/views/layouts/_catalog_dropdown.html.haml
> @@ -1,5 +1,9 @@
>   &nbsp
>   %div.catalog_list
>     %ul.more
> -    - catalogs.each do |catalog|
> -      %li.catalog= link_to catalog.name, launch_from_catalog_deployments_path(:catalog_id =>  catalog.id)
> \ No newline at end of file
> +    - if catalogs.empty?
> +      %li.catalog
> +        %a= t("catalogs.catalog_list.no_catalogs")
> +    - else
> +      - catalogs.each do |catalog|
> +        %li.catalog= link_to catalog.name, launch_from_catalog_deployments_path(:catalog_id =>  catalog.id)
> diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> index c1526a0..4654de4 100644
> --- a/src/config/locales/en.yml
> +++ b/src/config/locales/en.yml
> @@ -662,6 +662,8 @@ en:
>       preset_filters:
>         all_catalogs: "All Catalogs"
>         belongs_to_default_pool: "Belongs to Default Pool"
> +    catalog_list:
> +      no_catalogs: "-- No Catalogs --"
>     target_images:
>       flash:
>         notice:
Self ACK & Push



More information about the aeolus-devel mailing list