<commit_before>{% extends 'DDShopBundle::layout.html.twig' %}
{% block content %}
    {{ parent() }}
    {% block tree %}
        {{  render(controller("DDShopBundle:Categorytree:tree")) }}
    {% endblock %}
    <div class="offset2" >
        {% if products=='1' %}
            <h2> No result or search </h2>
        {% elseif products %}
            <div class="count">
                You have  {{ products.getTotalItemCount }} results :)
            </div>

            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>Image</th>

                    <th>{{ knp_pagination_sortable(products, 'Product A-Z', 'p.name', {'direction': 'ASC'}) }}
                        {{ knp_pagination_sortable(products, 'or Z-A', 'p.name', {'direction': 'DESC'}) }}
                    </th>

                    <th>Description</th>

                    <th>Date</th>
                    <th>Lastdate</th>

                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                {% for product in products %}
                    <tr onClick="document.location='{{ path('product_show', { 'id': product.id }) }}'">
                        <td>{% if product.src %}<img class="img-rounded" style="height: 100px;width: 100px" src="{{ product.src }}"/>{% endif %}</td>
                        <td>{{ product.name }}</td>
                        <td>{{ product.description }}</td>
                        <td>{% if product.date %}{{ product.date|date('Y-m-d H:i:s') }}{% endif %}</td>
                        <td>{% if product.lastdate %}{{ product.lastdate|date('Y-m-d H:i:s') }}{% endif %}</td>

                        <td>
                            <ul>

                                <li>
                                    <a href="{{ path('product_edit', { 'id': product.id }) }}">edit</a>
                                </li>
                            </ul>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>

            <div>
                {{ knp_pagination_render(products) }}
            </div>


        {% else %}

            <h2> This search is non global. Only for search into selected category  </h2>
        {% endif %}
    </div>
{% endblock %}<commit_msg>add back link from product<commit_after>{% extends 'DDShopBundle::layout.html.twig' %}
{% block content %}
    {{ parent() }}
    {% block tree %}
        {{  render(controller("DDShopBundle:Categorytree:tree")) }}
    {% endblock %}
    <div class="offset2" >
        {% if products=='1' %}
            <h2> No result or search </h2>
        {% elseif products %}
            <div class="count">
                You have  {{ products.getTotalItemCount }} results :)
            </div>

            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>Image</th>

                    <th>{{ knp_pagination_sortable(products, 'Product A-Z', 'p.name', {'direction': 'ASC'}) }}
                        {{ knp_pagination_sortable(products, 'or Z-A', 'p.name', {'direction': 'DESC'}) }}
                    </th>

                    <th>Description</th>


                    <th>Lastdate</th>

                    {% if is_granted('ROLE_MODERATOR') %}
                        <th>Actions</th>
                    {% endif %}
                </tr>
                </thead>
                <tbody>
                {% for product in products %}
                    <tr onClick="document.location='{{ path('product_show', { 'id': product.id }) }}'">
                        <td>{% if product.src %}<img class="img-rounded" style="height: 100px;width: 100px" src="{{ product.src }}"/>{% endif %}</td>
                        <td>{{ product.name }}</td>
                        <td>{{ product.description }}</td>

                        <td>{% if product.lastdate %}{{ product.lastdate|date('Y-m-d H:i:s') }}{% endif %}</td>

                        {% if is_granted('ROLE_MODERATOR') %}
                            <td>
                                <ul>
                                    <li>
                                        <a href="{{ path('product_edit', { 'id': product.id }) }}">edit</a>
                                    </li>
                                </ul>
                            </td>
                        {% endif %}
                    </tr>
                {% endfor %}
                </tbody>
            </table>

            <div>
                {{ knp_pagination_render(products) }}
            </div>


        {% else %}

            <h2> This search is non global. Only for search into selected category  </h2>
        {% endif %}
    </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.1616977225672878, 'fraction_numerical': 0.004968944099378882, 'mean_word_length': 1.1433007985803016, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3312754', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1243, 'n_words': 270}