From fd9c8401f8701ce3176eaa372c8bed3611d5ba80 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 17 Jun 2020 15:35:51 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20"no=20items"=20me?= =?UTF-8?q?ssaging=20when=20sets=20are=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/layout/_centered.scss | 1 + .../app/templates/orgs/org/projects/index.hbs | 42 ++++++++--- .../projects/project/host-catalogs/index.hbs | 71 ++++++++++++------- ui/core/translations/en-us.yaml | 2 + 4 files changed, 79 insertions(+), 37 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/layout/_centered.scss b/addons/rose/addon/styles/rose/components/layout/_centered.scss index 10844c8ae..71d058f1e 100644 --- a/addons/rose/addon/styles/rose/components/layout/_centered.scss +++ b/addons/rose/addon/styles/rose/components/layout/_centered.scss @@ -3,4 +3,5 @@ .rose-layout-centered { display: flex; justify-content: center; + padding: sizing.rems(xl) 0; } diff --git a/ui/core/app/templates/orgs/org/projects/index.hbs b/ui/core/app/templates/orgs/org/projects/index.hbs index 0ddef022c..1723da8a6 100644 --- a/ui/core/app/templates/orgs/org/projects/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/index.hbs @@ -13,17 +13,37 @@ - - {{#each @model as |project|}} - - {{/each}} - + + {{#if @model}} + + + {{#each @model as |project|}} + + {{/each}} + + + {{else}} + + + + + {{t 'descriptions.empty-set'}} + + + + {{t 'titles.new'}} + + + + + {{/if}} + diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs index d164728eb..898c4159c 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs @@ -6,6 +6,7 @@

{{t 'resources.host-catalogs'}}

+

{{t 'descriptions.host-catalogs'}}

@@ -17,33 +18,51 @@ -

{{t 'descriptions.host-catalogs'}}

- - - - {{t 'form.label.name'}} - {{t 'form.label.type'}} - {{t 'form.label.description'}} - - - - {{#each @model as |hostCatalog|}} - - - - {{hostCatalog.name}} - - - {{hostCatalog.type}} - {{hostCatalog.description}} - - {{/each}} - - + {{#if @model}} + + + + + {{t 'form.label.name'}} + {{t 'form.label.type'}} + {{t 'form.label.description'}} + + + + {{#each @model as |hostCatalog|}} + + + + {{hostCatalog.name}} + + + {{hostCatalog.type}} + {{hostCatalog.description}} + + {{/each}} + + + + {{else}} + + + + + {{t 'descriptions.empty-set'}} + + + + {{t 'titles.new'}} + + + + + {{/if}} +
diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 4b51a1dc2..fa0873322 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -12,8 +12,10 @@ titles: new: New overview: Overview settings: Settings + empty-set: No Items Yet descriptions: host-catalogs: Overview of collections of hosts and host sets. + empty-set: There are no items to display yet. You may be able to add items or try back later. states: info: Info success: Success