{% extends "base.html" %}

{% block title %}Template - warnings{% endblock %}

{% block headerEnd %}
<style>
    th { padding-right: 2em; }
</style>
{% endblock %}

{% block content %}

    This page shows a list of problems found inside the database. They also mention recommended resolution.

    <br><br><hr>
    <h4>PwnDoc templates without FID</h4>

    For all rows in the table it's highly suggested to find the <a href="/vulnerabilities" target="_blank">PwnDoc Templates</a>
    and fill in their FID attribute.

    <table>
        <tr><th>PwnDoc template name</th><th>Locale</th><th>PwnDoc template ID</th></tr>
        {% for templateLocale in templates_without_fids | sort(attribute='title') %}
            <tr>
                <td>{{ templateLocale.title }}</td>
                <td>{{ templateLocale.locale }}</td>
                <td>{{ templateLocale.pwndoc_id }}</td>
            </tr>
        {% endfor %}
    </table>
    <br><br><hr>

    <h4>PwnDoc templates with non-shared custom-fields</h4>

    Some fields ({{ shared_fields }}) should be same for all proper-locales (i.e. not OG). However they can become not-synchronized.
    This might be indicate a technical problem but can also be deliberate decision by the analyst. <br>

    For all rows it's recommended to find the <a href="/vulnerabilities" target="_blank">PwnDoc Templates</a>
    and check if the fields should be synchronized.

    <table>
        <tr><th>FID</th><th>Custom field</th></tr>
        {% for templateLocale in templates_with_non_shared_fields %}
            <tr>
                <td>{{ templateLocale[0] }}</td>
                <td>{{ templateLocale[1] }}</td>
            </tr>
        {% endfor %}
    </table>


{% endblock %}
