{% extends "base.html" %}

{% block title %}Templates{% endblock %}

{% block content %}
    <h1>Templates</h1>

    <h3>First run</h3>
    <p>This page presumes that you've already setup all appropriate locales in .env file (or docker.env when relevant).</p>
    <p>If you're starting to use Importer but did use Scan2Report previously, you can <a href="{{ url_for('api_templates.import_scan2report_templates_to_pwndoc') }}">import scan2report templates to PwnDoc.</a>
    </p>

    <h3>Work with templates</h3>

    <p>The regular work with templates happens fully inside <a href="/vulnerabilities">PwnDoc</a>. However, if you want to access full history (not just proposed/accepted templates), you have to do it through Importer.
    There are tools for
        <a href="{{ url_for('api_templates.compare_versions') }}">comparison of two templates</a> and
        also a <a href="{{ url_for('api_templates.whole_history') }}">chronological list of all template versions</a>.
    </p>

    <p>Because templates are manually edited, there is also page that <a href="{{ url_for('api_templates.warnings') }}">checks for errors in templates</a></p>

    <p>If you find that some findings are too similar and should be grouped, you can <a href="{{ url_for('api_root.json_editor') }}">edit scan2report config files (plugins.json, groups.json, aliases.json)</a>.</p>

    <h3>Other actions</h3>

    You can download templates (including content of plugins folder) as a ZIP archive. This is useful if for some reason you want to run scan2report manually and locally.
    <ul>
        <li><a href="{{ url_for('api_templates.export_as_scan2report_native', output_format='scan2report_with_pwndoc_formatting') }}">Scan2Report template with PwnDoc formatting and escaping</a></li>
        <li><a href="{{ url_for('api_templates.export_as_scan2report_native', output_format='scan2report_native') }}">Scan2Report native format (i.e. without HTML - best effort only)</a></li>
    </ul>

{% endblock %}