add block-error and block-empty components to centralize some bulma markup
This commit is contained in:
parent
7e1268e3ef
commit
439287b88f
2
ui/app/components/block-empty.js
Normal file
2
ui/app/components/block-empty.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import OuterHTML from './outer-html';
|
||||||
|
export default OuterHTML.extend();
|
2
ui/app/components/block-error.js
Normal file
2
ui/app/components/block-error.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import OuterHTML from './outer-html';
|
||||||
|
export default OuterHTML.extend();
|
11
ui/app/templates/components/block-empty.hbs
Normal file
11
ui/app/templates/components/block-empty.hbs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<div class="box is-bottomless has-background-white-bis">
|
||||||
|
<div class="columns is-centered">
|
||||||
|
<div class="column is-half has-text-centered">
|
||||||
|
<div class="box is-shadowless has-background-white-bis">
|
||||||
|
<p class="has-text-grey">
|
||||||
|
{{yield}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
3
ui/app/templates/components/block-error.hbs
Normal file
3
ui/app/templates/components/block-error.hbs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="box is-sideless has-background-white-bis has-text-grey has-text-centered">
|
||||||
|
{{yield}}
|
||||||
|
</div>
|
|
@ -46,27 +46,19 @@
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="box is-bottomless has-background-white-bis">
|
<BlockEmpty>
|
||||||
<div class="columns is-centered">
|
{{#if (eq baseKey.id '')}}
|
||||||
<div class="column is-half has-text-centered">
|
There are currently no {{pluralize options.item}} in this backend.
|
||||||
<div class="box is-shadowless has-background-white-bis">
|
{{else}}
|
||||||
<p class="has-text-grey">
|
{{#if filterIsFolder}}
|
||||||
{{#if (eq baseKey.id '')}}
|
{{#if (eq filter baseKey.id)}}
|
||||||
There are currently no {{pluralize options.item}} in this backend.
|
There are no {{pluralize options.item}} under <code>{{or filter}}</code>.
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if filterIsFolder}}
|
We couldn't find a folder matching <code>{{filter}}</code>.
|
||||||
{{#if (eq filter baseKey.id)}}
|
{{/if}}
|
||||||
There are no {{pluralize options.item}} under <code>{{or filter}}</code>.
|
{{/if}}
|
||||||
{{else}}
|
{{/if}}
|
||||||
We couldn't find a folder matching <code>{{filter}}</code>.
|
</BlockEmpty>
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/with}}
|
{{/with}}
|
||||||
{{#if (gt model.meta.lastPage 1) }}
|
{{#if (gt model.meta.lastPage 1) }}
|
||||||
|
|
|
@ -21,14 +21,14 @@
|
||||||
</h1>
|
</h1>
|
||||||
</p.levelLeft>
|
</p.levelLeft>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<div class="box is-sideless has-background-white-bis has-text-grey has-text-centered">
|
<BlockError>
|
||||||
{{#if model.message}}
|
{{#if model.message}}
|
||||||
<p>{{model.message}}</p>
|
<p>{{model.message}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#each model.errors as |error|}}
|
{{#each model.errors as |error|}}
|
||||||
<p>{{error}}</p>
|
<p>{{error}}</p>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</BlockError>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue