<!DOCTYPE html>
<html lang=fr>
    <head>
        % include('head.html')
        <link rel=stylesheet href="/assets/styles/report.css">
        <link rel=stylesheet href="/assets/styles/monokai.css">
        <script src="/assets/scripts/loc.js" defer></script>
        <script src="/assets/scripts/report.js" defer></script>
        <script src="/assets/scripts/change-lang.js" defer></script>
        <noscript>
            <style>
                #lang-selection {
                    display: none;
                }
            </style>
        </noscript>
    </head>
    <body>
{{!codehl}}

        <form id=report title="Signaler" name=report action="/report" method=POST>
            <input name=snippetid hidden value="{{snippetid}}" required>
            <input name=name hidden>
            <label>
                <input type=submit>
                % include('svg.html', name='report')
            </label>
        </form>

        <div class="controls">
            <select id=lang-selection class="control" title="Langage">
                <option disabled>Langage</option>
                % for ext_, lang_ in languages:
                    % if lang_ == lang:
                        <option value="{{ext_}}" selected>{{lang_.title()}}</option>
                    % else:
                        <option value="{{ext_}}">{{lang_.title()}}</option>
                    % end
                % end
            </select>

            % if parentid:
            <a class="control" title="Voir la révision précédente" href="/{{parentid}}.{{ext}}">
                % include('svg.html', name='history')
            </a>
            % end
            <a class="control" title="Modifier" href="/?parentid={{snippetid}}&lang={{lang}}">
                % include('svg.html', name='edit')
            </a>
            <a class="control" title="Nouveau" href="/">
                % include('svg.html', name='new')
            </a>
        </div>
    </body>
</html>
