1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/components/modal-theme-warnings.hbs
Kevin Ansfield d6058dbf27 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00

65 lines
2.2 KiB
Handlebars

<div class="theme-validation-container">
<header class="modal-header">
<h1 data-test-theme-warnings-title>
{{#unless this.canActivate}}
{{this.title}}
{{else}}
{{this.title}} with {{#if this.errors}}errors{{else}}warnings{{/if}}
{{/unless}}
</h1>
</header>
<a class="close" href="#" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<div class="modal-body">
{{#if this.fatalErrors}}
<div>
<h2 class="mb0 mt4 f5 fw6 red">Fatal Errors</h2>
<p class="mb2 red">Must-fix to activate theme</p>
</div>
<ul class="pa0" data-test-theme-fatal-errors>
{{#each this.fatalErrors as |error|}}
<li class="theme-validation-item theme-fatal-error">
<GhThemeErrorLi @error={{error}} />
</li>
{{/each}}
</ul>
{{/if}}
{{#if this.errors}}
<div>
<h2 class="mb0 mt4 f5 fw6">Errors</h2>
<p class="mb2">Highly recommended to fix, functionality <span>could</span> be restricted</p>
</div>
<ul class="pa0" data-test-theme-errors>
{{#each this.errors as |error|}}
<li class="theme-validation-item theme-error">
<GhThemeErrorLi @error={{error}} />
</li>
{{/each}}
</ul>
{{/if}}
{{#if (and this.warnings (or this.fatalErrors this.errors))}}
<div>
<h2 class="mb0 mt4 f5 fw6">Warnings</h2>
</div>
{{/if}}
{{#if this.warnings}}
<ul class="pa0" data-test-theme-warnings>
{{#each this.warnings as |error|}}
<li class="theme-validation-item theme-warning">
<GhThemeErrorLi @error={{error}} />
</li>
{{/each}}
</ul>
{{/if}}
</div>
</div>
<div class="modal-footer">
<button {{action "closeModal"}} class="gh-btn" data-test-modal-close-button>
<span>Ok</span>
</button>
</div>