<commit_before>

<ul id="drafts-panel">
    <li data-index="2" style="display: block;">
        <ul class="filter-sort-panel">
            <ul class="legend">
                <li class="action" data-load-target="Drafts/create" data-expand>
                    <a>
                        <span class="icon-pencil"></span> <span class="side-legend"> Nouveau</span>
                    </a>
                </li>
            </ul>
            <ul class="legend">
                <li class="legend-title">Afficher</li>
                <li class="filter active" data-filter="all">Tous</li>
                <li class="filter" data-filter=".draft-mine">Mes drafts</li>
                <li class="filter" data-filter=".draft-other">Autres drafts</li>
            </ul>

            <ul class="legend">
                <li class="legend-title">Trier par</li>
                <li class="sort" data-sort="name:desc">Nom</li>
                <li class="sort" data-sort="author:asc">Auteur</li>
                <li class="sort" data-sort="date:asc">Date</li>
                <li class="sort" data-sort="views:asc">Vues</li>
                <li class="sort" data-sort="stars:asc">Étoiles</li>
            </ul>
        </ul>
        {% if not drafts|length %}
            <h1 style="color: rgba(0, 0, 0, 0.2);">
                Aucun draft pour le moment...
            </h1>
        {% else %}
            <ul id="all-drafts-list" class="draft-list read-list">
            {% for draft in drafts %}
            {% if draft.draft_author == webdata.session.muffin_id or draft.public %}
                <li
                    class="mix {{ draft.draft_author == webdata.session.muffin_id ? 'draft-mine' : 'draft-other' }}"
                    id="draft-element-{{ draft.draft_id }}"
                    data-id="{{ draft.draft_id }}"
                    data-stars="{{ draft.c_drafts_like.id_draft_like|length }}"
                    data-author="{{ draft.draft_author }}"
                    data-views="{{ draft.draft_views }}"
                    data-date="{{ draft.draft_date_c }}"
                    data-name="{{ draft.draft_name }}">

                    <a class="draft-item--li">
                    <div class="draft-title">
                        <h1> {{ draft.draft_name }}</h1>
                             <span class="list-visibility">
                                <span class="raw-date" data-date="{{ draft.draft_date_c }}">le {{ draft.draft_date_c }} </span>
                                 · par {{ draft.c_user.c_42_logins.prenom|lower }} {{ draft.c_user.c_42_logins.nom|lower }}
                            </span>
                    </div>
                    <a data-action="star" data-id="{{ draft.draft_id }}" class="right middle">
                        <span data-star
                            class="icon-{{ draft.c_drafts_like.id_draft_like|length ? 'starfull' : 'starempty' }}"></span> {{ draft.c_drafts_like.id_draft_like|length }}
                    </a>
                    <a class="right middle"><span class="icon-eye3"></span> {{ draft.draft_views }} vues</a>
                    {% if draft.draft_author == webdata.session.muffin_id %}
                        <a class="btn-draft-edit" data-draft-load data-draft-id="{{ draft.draft_id }}"><span class="icon-pencil"></span> Editer</a>
                        <a class="btn-draft-read" data-id="{{ draft.draft_id }}"><span class="icon-eye"></span> Lire</a>
                        <!-- <a class="btn-draft-delete" data-id="{{ draft.draft_id }}"><span class="icon-trash"></span> Supprimer</a> -->
                        {% if draft.public == 0 %}
                            <span class="right middle icon-lock"></span>
                        {% elseif draft.public == 1 %}
                            <span class="right middle icon-marvin"></span>
                        {% elseif draft.public == 2 %}
                            <span class="right middle icon-earth"></span>
                        {% endif %}
                    {% endif %}
                    </a>
                </li>
            {% endif %}
            {% endfor %}
            </ul>
        {% endif %}

    </li>
</ul>

<script>
    $("#drafts-panel [data-load-target]").click(function()
    {
        $('#all-drafts-list').mixItUp('destroy');
    });

    $('#all-drafts-list').mixItUp({
        layout: {
            display: "block"
        },
        callbacks:
        {
            onMixEnd: function(){
                Muffin.bindAjaxEvents();
                Muffin.draft.init();
            }
        },
        animation: {
            duration: 400,
            effects: 'translateZ(-360px) stagger(34ms) scale(0.01)',
            easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'
        }
    });
    Muffin.bindAjaxEvents();
    Muffin.draft.init();
    Muffin.draft.watch();
</script>

<commit_msg>Fixing issues<commit_after>

<ul id="drafts-panel">
    <li data-index="2" style="display: block;">
        <ul class="filter-sort-panel">
            <ul class="legend">
                <li class="action" data-load-target="Drafts/create" data-expand>
                    <a>
                        <span class="icon-pencil"></span> <span class="side-legend"> Nouveau</span>
                    </a>
                </li>
            </ul>
            <ul class="legend">
                <li class="legend-title">Afficher</li>
                <li class="filter active" data-filter="all">Tous</li>
                <li class="filter" data-filter=".draft-mine">Mes drafts</li>
                <li class="filter" data-filter=".draft-other">Autres drafts</li>
            </ul>

            <ul class="legend">
                <li class="legend-title">Trier par</li>
                <li class="sort" data-sort="name:desc">Nom</li>
                <li class="sort" data-sort="author:asc">Auteur</li>
                <li class="sort" data-sort="date:asc">Date</li>
                <li class="sort" data-sort="views:asc">Vues</li>
                <li class="sort" data-sort="stars:asc">Étoiles</li>
            </ul>
        </ul>
        {% if not drafts|length %}
            <h1 style="color: rgba(0, 0, 0, 0.2);">
                Aucun draft pour le moment...
            </h1>
        {% else %}
            <ul id="all-drafts-list" class="draft-list read-list">
            {% for draft in drafts %}
            {% if draft.draft_author == webdata.session.muffin_id or draft.public %}
                <li
                    class="mix {{ draft.draft_author == webdata.session.muffin_id ? 'draft-mine' : 'draft-other' }}"
                    id="draft-element-{{ draft.draft_id }}"
                    data-id="{{ draft.draft_id }}"
                    data-stars="{{ draft.c_drafts_like.id_draft_like|length }}"
                    data-author="{{ draft.draft_author }}"
                    data-views="{{ draft.draft_views }}"
                    data-date="{{ draft.draft_date_c }}"
                    data-name="{{ draft.draft_name }}">

                    <a class="draft-item--li">
                    <div class="draft-title">
                        <h1> {{ draft.draft_name }}</h1>
                             <span class="list-visibility">
                                <span class="raw-date" data-date="{{ draft.draft_date_c }}">le {{ draft.draft_date_c }} </span>
                                 · par {{ draft.c_user.c_42_logins.prenom|lower }} {{ draft.c_user.c_42_logins.nom|lower }}
                            </span>
                    </div>
                    <a data-action="star" data-id="{{ draft.draft_id }}" class="right middle">
                        <span data-star
                            class="icon-{{ draft.c_drafts_like.id_draft_like|length ? 'starfull' : 'starempty' }}"></span> {{ draft.c_drafts_like.id_draft_like|length }}
                    </a>
                    <a class="right middle"><span class="icon-eye3"></span> {{ draft.draft_views }} vues</a>
                    {% if draft.draft_author == webdata.session.muffin_id %}
                        <a class="btn-draft-edit" data-draft-load data-draft-id="{{ draft.draft_id }}"><span class="icon-pencil"></span> Editer</a>
                        <a class="btn-draft-read" data-id="{{ draft.draft_id }}"><span class="icon-eye"></span> Lire</a>
                        <!-- <a class="btn-draft-delete" data-id="{{ draft.draft_id }}"><span class="icon-trash"></span> Supprimer</a> -->
                        {% if draft.public == 0 %}
                            <span class="right middle icon-lock"></span>
                        {% elseif draft.public == 1 %}
                            <span class="right middle icon-marvin"></span>
                        {% elseif draft.public == 2 %}
                            <span class="right middle icon-earth"></span>
                        {% endif %}
                    {% endif %}
                    </a>
                </li>
            {% endif %}
            {% endfor %}
            </ul>
        {% endif %}

    </li>
</ul>

<script>
    $("[data-load-target]").click(function()
    {
        $('#all-drafts-list').mixItUp('destroy');
    });
    $('#all-drafts-list').mixItUp({
        layout: {
            display: "block"
        },
        callbacks:
        {
            onMixEnd: function(){
                Muffin.bindAjaxEvents();
                Muffin.draft.init();
            }
        },
        animation: {
            duration: 400,
            effects: 'translateZ(-360px) stagger(34ms) scale(0.01)',
            easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'
        }
    });
    Muffin.bindAjaxEvents();
    Muffin.draft.init();
    Muffin.draft.watch();
</script>


{'fraction_non_alphanumeric': 0.16692363038338986, 'fraction_numerical': 0.008428409908520916, 'mean_word_length': 1.423412204234122, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 173, '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': '3907040', 'n_tokens_mistral': 2992, 'n_tokens_neox': 2751, 'n_words': 480}