<commit_before><h3>Erabiltzaileak ez dauka Udala definitua</h3>

<h3>El usuario no tiene asignado un Ayuntamineto</h3><commit_msg>SUPER_ADMIN rola duenean udala atalean zerrenda erakutsi<commit_after>{% extends 'base.html.twig' %}
{% block menua %}
    {{ parent() }}
    <nav class="navbar navbar-default navbar-lower" data-spy="affix" data-offset-top="5">
        <div class="container">
            <div class="navbar-header">
                <a class="navbar-brand">{{ 'messages.udalak'|trans }}</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse navbar-right">
                <ul class="nav navbar-nav">
                    <li><a href="{{ path('udala_new') }}" class="fa fa-plus"> {{ 'messages.udalberria'|trans }}</a></li>
                </ul>
            </div>
        </div>
    </nav>
{% endblock %}
{% block body %}
    <table class="table">
        <thead>
        <tr>
            <th>{{ 'messages.kodea'|trans }}</th>
            <th>{{ 'messages.ifk'|trans }}</th>
            <th>{{ 'messages.udala'|trans }}</th>
            <th></th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {% for udala in udalas %}
            <tr>
                <td>{{ udala.kodea }}</td>
                <td>{{ udala.ifk }}</td>
                <td>
                    {% if app.request.locale == 'es'%}{{ udala.izenaes }}
                    {% else %}{{ udala.izenaeu }}
                    {% endif %}
                </td>
                <td>
                    {% if app.request.locale == 'es'%}{{ udala.izendapenaes }}
                    {% else %}{{ udala.izendapenaeu }}
                    {% endif %}
                </td>
                <td NOWRAP class="text-right">
                    <ul class="list-inline">
                        <li><a href="{{ path('udala_show', { 'id': udala.id }) }}" class="fa fa-search"></a></li>
                        {% if is_granted('ROLE_ADMIN') %}
                            {#<li>{{ form_start(deleteforms[udala.id],{'attr': {'id': udala.id}}) }}#}
                            {#<a href="#" onclick="document.getElementById({{ udala.id }}).submit();" ><i class="fa fa-trash text-danger"></i></a>#}
                            {#{{ form_end(deleteforms[udala.id]) }}</li>#}
                            <li>{{ form_start(deleteforms[udala.id],{'attr': {'id': udala.id}}) }}
                                <a href="#" onclick="ezabatu({{ udala.id }},'{{ 'messages.ziurzaude'|trans }}');" ><i class="fa fa-trash text-danger"></i></a>
                                {{ form_end(deleteforms[udala.id]) }}</li>
                        {% endif %}

                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <div class="text-center">
        {% if udalas is not empty %}
            {% if pager.haveToPaginate %}
                {{ pagerfanta(pager, 'twitter_bootstrap3_translated', {'routeName': 'udala_index_paginated'}) }}
            {% endif %}
        {% else %}
            <p>{{ 'messages.emaitzarikez'|trans }}</p>
        {% endif %}
    </div>
{% endblock %}
{% block javascripts %}
    {{ parent() }}
    <script type="text/javascript">
        function ezabatu (id,mezua)
        {
//            var r = confirm("Udala EZABATU. Ziur zaude? Ekintza honek udalaren erregistro guztiak ezabatuko ditu!!");
            var r = confirm(mezua);
            if (r == true)
            {
                document.getElementById(id).submit()
            }else
            {
            }
        };
    </script>
{% endblock %}
{'fraction_non_alphanumeric': 0.18396226415094338, 'fraction_numerical': 0.001664816870144284, 'mean_word_length': 1.5157013258897418, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5649240', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1116, 'n_words': 210}