Ghost/ghost/admin/app/templates/components/gh-theme-error-li.hbs
Aileen Nowak 2cbb181866 💄 Theme upload modal style improvements (#784)
no issue

With GScan sending error details now, the modal was a bit overloaded.

This PR adds a toggle for each error rule which - when clicked - shows the details and the affected files.
2017-07-20 11:30:45 +01:00

29 lines
852 B
Handlebars

<a href="" class="theme-validation-toggle-details" {{action "toggleDetails"}} data-test-toggle-details>
<h4 class="theme-validation-rule-text">
{{{error.rule}}}
</h4>
<div class="theme-validation-rule-icon">
{{#if showDetails}}
{{inline-svg "arrow-down"}}
{{else}}
{{inline-svg "arrow-right"}}
{{/if}}
</div>
</a>
{{#if showDetails}}
<p class="theme-validation-details">
{{{error.details}}}
</p>
{{#if error.failures}}
<div class="theme-validation-list">
<h6>Affected files:</h6>
<ul>
{{#each error.failures as |failure|}}
<li><code>{{failure.ref}}</code>{{#if failure.message}}: {{failure.message}}{{/if}}</li>
{{/each}}
</ul>
</div>
{{/if}}
{{/if}}