<commit_before>{% load i18n %}
{% load lfc_tags %}

{% ifhasperm edit %}
    {% if parent_for_portlets %}
        <form class="portlets-form"
              action="{% url lfc_update_portlets object_type_id, obj.id %}"
              method="post">
            <h2>{% trans 'Blocked parent slots' %}</h2>

            <table class="lfs-manage-table half">
                <th class="tiny padr">
                    {% trans "Slot" %}
                </th>
                <th>
                    {% trans "Blocked" %}
                </th>
                {% for slot in slots.items %}
                    <tr>
                        <td>
                            <input type="checkbox"
                                   name="block_slot"
                                   value="{{ slot.id }}"
                                   {% if slot.is_blocked %}checked="checked"{% endif %} />
                        </td>
                        <td>
                            {{ slot.name }}
                        </td>
                    </tr>
                {% endfor %}
            </table>    
            <div class="padding-b">
                <input type="submit"
                       class="ajax-save-button"
                       value="{% trans 'Save blocked parent slots' %}" />
            </div>

        </form>
    {% endif %}

    <h2 class="first-heading">{% trans 'Slots' %}</h2>

    {% for slot in slots.items %}
        <h3 {% if forloop.first %}class="first-heading"{% endif %}>
            {% trans 'Slot' %}: {{ slot.name }}
        </h3>

        {% if slot.portlets %}

            <table class="lfs-manage-table half">
                <tr>
                    <th class="middle">
                        {% trans 'Type' %}
                    </th>
                    <th>
                        {% trans 'Title' %}
                    </th>
                    <th class="tiny right-padding">
                        {% trans 'Delete' %}
                    </th>
                </tr>
                {% for portlet in slot.portlets %}
                    <tr>
                        <td>
                            <a class="portlet-edit-button"
                               href="{% url lfc_edit_portlet portlet.pa_id %}">
                                {{ portlet.type }}
                            </a>
                        </td>
                        <td>
                            <a class="portlet-edit-button"
                               href="{% url lfc_edit_portlet portlet.pa_id %}">
                                {{ portlet.title }}
                            </a>
                        </td>
                        <td class="right">
                            <a class="delete delete-link"
                               title='{% trans "Delete" %}'
                               href="{% url lfc_delete_portlet portlet.pa_id %}"></a>
                        </td>
                    </tr>
                {% endfor %}
            </table>
        {% else %}
            <p class="no-portlets">{% trans 'There are no portlets assigend' %}</p>
        {% endif %}
    {% endfor %}


    <h2 class="middle-heading">
        {% trans 'Add new portlet' %}
    </h2>

    <form class="portlet-add-form"
          action="{% url lfc_add_portlet object_type_id, obj.id %}"
          method="get">
        <select name="portlet_type">
            {% for portlet_type in portlet_types %}
                <option value="{{ portlet_type.type }}">
                    {{ portlet_type.name }}
                </option>
            {% endfor %}
        </select>

        <input class="portlet-add-button"
               type="submit"
               value="{% trans 'Add portlet' %}" />
    </form>
{% else %}
    {% if parent_for_portlets %}
        <h2>{% trans 'Blocked parent slots' %}</h2>
        <table class="lfs-manage-table half">
            <th class="small">
                {% trans "Slot" %}
            </th>
            <th>
                {% trans "Blocked" %}
            </th>
        {% for slot in slots.items %}
            <tr>
                <td>
                    {{ slot.name }}
                </td>
                <td>
                    {% if slot.is_blocked %}
                        {% trans "Yes" %}
                    {% else %}
                        {% trans "No" %}
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
        </table>
    {% endif %}

    <h2 class="middle-heading">{% trans 'Slots' %}</h2>

    {% for slot in slots.items %}
        <h3 {% if forloop.first %}class="first-heading"{% endif %}>
            {% trans 'Slot' %}: {{ slot.name }}
        </h3>

        {% if slot.portlets %}

            <table class="lfs-manage-table half">
                <tr>
                    <th class="middle">
                        {% trans 'Type' %}
                    </th>
                    <th class="middle">
                        {% trans 'Title' %}
                    </th>
                </tr>
                {% for portlet in slot.portlets %}
                    <tr>
                        <td>
                            {{ portlet.type }}
                        </td>
                        <td>
                            {{ portlet.title }}
                        </td>
                    </tr>
                {% endfor %}
            </table>
        {% else %}
            <p class="no-portlets">{% trans 'There are no portlets assigend' %}</p>
        {% endif %}
    {% endfor %}
{% endifhasperm %}

<commit_msg>Bugfix: Corrected table titles<commit_after>{% load i18n %}
{% load lfc_tags %}

{% ifhasperm edit %}
    {% if parent_for_portlets %}
        <form class="portlets-form"
              action="{% url lfc_update_portlets object_type_id, obj.id %}"
              method="post">
            <h2>{% trans 'Blocked parent slots' %}</h2>

            <table class="lfs-manage-table half">
                <th class="tiny padr">
                    {% trans "Blocked" %}
                </th>
                <th>
                    {% trans "Slot" %}
                </th>
                {% for slot in slots.items %}
                    <tr>
                        <td>
                            <input type="checkbox"
                                   name="block_slot"
                                   value="{{ slot.id }}"
                                   {% if slot.is_blocked %}checked="checked"{% endif %} />
                        </td>
                        <td>
                            {{ slot.name }}
                        </td>
                    </tr>
                {% endfor %}
            </table>    
            <div class="padding-b">
                <input type="submit"
                       class="ajax-save-button"
                       value="{% trans 'Save blocked parent slots' %}" />
            </div>

        </form>
    {% endif %}

    <h2 class="first-heading">{% trans 'Slots' %}</h2>

    {% for slot in slots.items %}
        <h3 {% if forloop.first %}class="first-heading"{% endif %}>
            {% trans 'Slot' %}: {{ slot.name }}
        </h3>

        {% if slot.portlets %}

            <table class="lfs-manage-table half">
                <tr>
                    <th class="middle">
                        {% trans 'Type' %}
                    </th>
                    <th>
                        {% trans 'Title' %}
                    </th>
                    <th class="tiny right-padding">
                        {% trans 'Delete' %}
                    </th>
                </tr>
                {% for portlet in slot.portlets %}
                    <tr>
                        <td>
                            <a class="portlet-edit-button"
                               href="{% url lfc_edit_portlet portlet.pa_id %}">
                                {{ portlet.type }}
                            </a>
                        </td>
                        <td>
                            <a class="portlet-edit-button"
                               href="{% url lfc_edit_portlet portlet.pa_id %}">
                                {{ portlet.title }}
                            </a>
                        </td>
                        <td class="right">
                            <a class="delete delete-link"
                               title='{% trans "Delete" %}'
                               href="{% url lfc_delete_portlet portlet.pa_id %}"></a>
                        </td>
                    </tr>
                {% endfor %}
            </table>
        {% else %}
            <p class="no-portlets">{% trans 'There are no portlets assigend' %}</p>
        {% endif %}
    {% endfor %}


    <h2 class="middle-heading">
        {% trans 'Add new portlet' %}
    </h2>

    <form class="portlet-add-form"
          action="{% url lfc_add_portlet object_type_id, obj.id %}"
          method="get">
        <select name="portlet_type">
            {% for portlet_type in portlet_types %}
                <option value="{{ portlet_type.type }}">
                    {{ portlet_type.name }}
                </option>
            {% endfor %}
        </select>

        <input class="portlet-add-button"
               type="submit"
               value="{% trans 'Add portlet' %}" />
    </form>
{% else %}
    {% if parent_for_portlets %}
        <h2>{% trans 'Blocked parent slots' %}</h2>
        <table class="lfs-manage-table half">
            <th class="small">
                {% trans "Slot" %}
            </th>
            <th>
                {% trans "Blocked" %}
            </th>
        {% for slot in slots.items %}
            <tr>
                <td>
                    {{ slot.name }}
                </td>
                <td>
                    {% if slot.is_blocked %}
                        {% trans "Yes" %}
                    {% else %}
                        {% trans "No" %}
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
        </table>
    {% endif %}

    <h2 class="middle-heading">{% trans 'Slots' %}</h2>

    {% for slot in slots.items %}
        <h3 {% if forloop.first %}class="first-heading"{% endif %}>
            {% trans 'Slot' %}: {{ slot.name }}
        </h3>

        {% if slot.portlets %}

            <table class="lfs-manage-table half">
                <tr>
                    <th class="middle">
                        {% trans 'Type' %}
                    </th>
                    <th class="middle">
                        {% trans 'Title' %}
                    </th>
                </tr>
                {% for portlet in slot.portlets %}
                    <tr>
                        <td>
                            {{ portlet.type }}
                        </td>
                        <td>
                            {{ portlet.title }}
                        </td>
                    </tr>
                {% endfor %}
            </table>
        {% else %}
            <p class="no-portlets">{% trans 'There are no portlets assigend' %}</p>
        {% endif %}
    {% endfor %}
{% endifhasperm %}


{'fraction_non_alphanumeric': 0.13970260885050306, 'fraction_numerical': 0.0028492565221262577, 'mean_word_length': 0.8485845951283739, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '968716', 'n_tokens_mistral': 3211, 'n_tokens_neox': 2775, 'n_words': 617}