<commit_before>{% extends "XvolutionsAdminBundle:template:backoffice.html.twig" %}

{% block title %}Páginas - Backoffice{% endblock %}

{% block maincontent %}
    <h1>{{ "Páginas"|trans }}</h1>
        <div id="status" class="alert alert-success alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <div id="text"></div>
        </div>
        <div id="error" class="alert alert-danger alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <div id="text-error"></div>
        </div>
    {% if status %}
        <div class="alert alert-success alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ status|trans }}
        </div>
    {% endif %}
    {% if error %}
        <div class="alert alert-danger alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ error|trans }}
        </div>
    {% endif %}
    <table class="table table-hover">
        <tr>
            <th></th>
            <th>{{ "Nome da Página"|trans }}</th>
            <th>{{ "Secção"| trans }}</th>
            <th>{{ "Language"| trans }}</th>
            <th>{{ "Data de criação"| trans }}</th>
            <th>{{ "Opções"|trans }}</th>
        </tr>
        {% if pageList|length > 0 %}
 
            {% for page in pageList %}
                <tr class="tr{{page.id}}">
                    <td><input type="checkbox" id="{{page.id}}" onclick="SelectForRemoval('{{page.id}}');"></td>
                    <td>{{page.title}}</td>
                    <td>{{page.section}}</td>
                    <td>{{page.language}}</td>
                    <td>{{page.date|date('d/m/Y H:m:s') }}</td>
                    <td>
                        <a href="{{path('editpages', {'id': page.id})}}" type="submit" class="btn btn-primary btn-xs">{{ "Editar"|trans }}</a> 
                        <a class="btn btn-danger btn-xs" name="{{path('pagesoption', {'option': 'remove','id': page.id})}}">{{ "Apagar"|trans }}</a>
                    </td>
                </tr>
            {% endfor %}
        {% else %}
            <tr>
                <td colspan="6" >{{"Não existem páginas definidas"|trans}}</td>
            <tr>
        {% endif %}
    </table>
        <div style="text-align: center;">{{pagination|raw}}</div>
    <p>
        <a href="{{path('addpages')}}" type="submit" class="btn btn-primary btn-sm">{{ "Criar uma nova página"|trans }}</a>
        <a class="btn btn-danger btn-sm" name="{{path('pagesoption', {'option': 'removeselected'})}}" id="RemoveMany">{{ "Apagar"|trans }}</a>
    </p> 
{% endblock %}<commit_msg>- Trial #1 to fix Website should be protected against XSSVulnerability<commit_after>{% extends "XvolutionsAdminBundle:template:backoffice.html.twig" %}

{% block title %}Páginas - Backoffice{% endblock %}

{% block maincontent %}
    <h1>{{ "Páginas"|trans }}</h1>
        <div id="status" class="alert alert-success alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <div id="text"></div>
        </div>
        <div id="error" class="alert alert-danger alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <div id="text-error"></div>
        </div>
    {% if status %}
        <div class="alert alert-success alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ status|trans }}
        </div>
    {% endif %}
    {% if error %}
        <div class="alert alert-danger alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ error|trans }}
        </div>
    {% endif %}
    <table class="table table-hover">
        <tr>
            <th></th>
            <th>{{ "Nome da Página"|trans }}</th>
            <th>{{ "Secção"| trans }}</th>
            <th>{{ "Language"| trans }}</th>
            <th>{{ "Data de criação"| trans }}</th>
            <th>{{ "Opções"|trans }}</th>
        </tr>
        {% if pageList|length > 0 %}
 
            {% for page in pageList %}
                <tr class="tr{{page.id}}">
                    <td><input type="checkbox" id="{{page.id}}" onclick="SelectForRemoval('{{page.id}}');"></td>
                    <td>{{page.title}}</td>
                    <td>{{page.section}}</td>
                    <td>{{page.language}}</td>
                    <td>{{page.date|date('d/m/Y H:m:s') }}</td>
                    <td>
                        <a href="{{path('editpages', {'id': page.id})}}" type="submit" class="btn btn-primary btn-xs">{{ "Editar"|trans }}</a> 
                        <a class="btn btn-danger btn-xs" name="{{path('pagesoption', {'option': 'remove','id': page.id})}}">{{ "Apagar"|trans }}</a>
                    </td>
                </tr>
            {% endfor %}
        {% else %}
            <tr>
                <td colspan="6" >{{"Não existem páginas definidas"|trans}}</td>
            <tr>
        {% endif %}
    </table>
        <div style="text-align: center;">
            {% autoescape 'html' %}
                {{pagination|raw}}
            {% endautoescape %}
        </div>
    <p>
        <a href="{{path('addpages')}}" type="submit" class="btn btn-primary btn-sm">{{ "Criar uma nova página"|trans }}</a>
        <a class="btn btn-danger btn-sm" name="{{path('pagesoption', {'option': 'removeselected'})}}" id="RemoveMany">{{ "Apagar"|trans }}</a>
    </p> 
{% endblock %}
{'fraction_non_alphanumeric': 0.2096528365791702, 'fraction_numerical': 0.0015241320914479255, 'mean_word_length': 2.139819245082403, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1889698', 'n_tokens_mistral': 1943, 'n_tokens_neox': 1754, 'n_words': 375}