32 lines
1.3 KiB
Twig
32 lines
1.3 KiB
Twig
|
{% if result %}
|
||
|
<div class="alert warning"><strong>YAML Linting:</strong> Found <strong>{{ result|length }}</strong> linting errors</div>
|
||
|
<table>
|
||
|
{% for path, error in result %}
|
||
|
{% set page_url = base_url_simple ~ '/' ~ admin_route %}
|
||
|
{% set bits = path|pathinfo %}
|
||
|
{% if admin.multilang %}
|
||
|
{% set lang = (bits.filename|pathinfo).extension %}
|
||
|
{% set page_url = base_url_simple ~ '/' ~ lang ~ '/' ~ admin_route %}
|
||
|
{% endif %}
|
||
|
{% set page_path = base_path ~ bits.dirname %}
|
||
|
{% set page = grav.pages.get(page_path) %}
|
||
|
<tr>
|
||
|
<td><i class="fa fa-file-text-o"></i>
|
||
|
{% if page.url %}
|
||
|
<a href="{{ page_url ~ '/pages' ~ page.rawRoute }}/mode:expert">{{ page.route }}</a>
|
||
|
{% else %}
|
||
|
{{ path }}
|
||
|
{% endif %}
|
||
|
{% if lang %}
|
||
|
<span class="badge">{{ lang }}</span>
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
<td class="double">{{ error }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</table>
|
||
|
{% else %}
|
||
|
<div class="alert info"><strong>YAML Linting:</strong> No errors found.</div>
|
||
|
{% endif %}
|
||
|
|