<commit_before>extends base

- load i18n

block media
    style.
        #ticket-list .fa-check-circle-o {
            color: #00a900;
        }

        #ticket-list .fa-exclamation-circle {
            color: darkred;
        }

        @media (min-width: 500px) {
            #container {
                display: flex;
                flex-direction: row-reverse;
            }

            #container > main {
                flex: 1;
            }

            #container > aside {
                flex: 1;
                max-width: 200px;
                margin-left: 1em;
            }

            #container > aside > div {
                position: sticky;
                top: 60px;
            }
        }

    if has_select2
        link(href='{{ SELECT2_CSS_URL }}', type='text/css', media='screen', rel='stylesheet')
        style.
            .select2-selection__arrow { display: none; }
            .select2-selection__rendered { cursor: text; }
            .select2-results__option {  position: relative; }
            .select2-results__option--highlighted { background-color: #DEDEDE !important; }
            li.select2-results__option--highlighted a.user-redirect { display: inline-block; }

            a.user-redirect {
                color: #2980b9;
                vertical-align: middle;
                font-size: 1.2em;
                position: absolute;
                right: 0.8em;
                display: none;
            }

            a.user-redirect:hover { text-shadow: 0 0 2px blue; }

block js_media
    script(type='text/javascript').
        $(function () {
            $('input#own').click(function () {
                ($('<form>').attr('action', window.location.pathname + '?' + $('form#filter-form').serialize())
                        .append($('<input>').attr('type', 'hidden').attr('name', 'csrfmiddlewaretoken')
                                .attr('value', $.cookie('csrftoken')))
                        .attr('method', 'POST').appendTo($('body')).submit());
            });
        });
    if has_select2
        script(type='text/javascript', src='{{ SELECT2_JS_URL }}')
        script(type='text/javascript').
            $(function () {
                $('#filter-user').select2({
                    ajax: { url: '{% url "ticket_user_select2_ajax" %}' },
                    escapeMarkup: function (markup) {
                        return markup;
                    },
                    templateResult: function (data, container) {
                        return $('<span>')
                                .append($('<img>', {
                                    'class': 'user-search-image', src: data.gravatar_url,
                                    width: 24, height: 24
                                }))
                                .append($('<span>', {'class': data.display_rank + ' user-search-name'}).text(data.text));
                    }
                });
            });

block body
    #container
        aside: div
            form#filter-form(name='form', action='', method='get')
                div#own-box.filter-check
                    input#own(type='checkbox', name='own', checked=('checked' if filter_status['own'] else undefined), value='1')
                    label(for='own') {% trans "Show my tickets only" %}
                div#user-box.filter-select2
                    label(for='filter-user') {% trans "Filing user:" %}
                    select#filter-user(style='width: 100%', multiple)
                button.submit(type='submit', style='margin-left: auto') {% trans "Go" %}

        main
            if page_obj.num_pages > 1
                div(style='margin-bottom:6px; margin-top:3px')
                    include list_pages

            table#ticket-list.table
                thead: tr<commit_msg>Define name for select2; #327<commit_after>extends base

- load i18n

block media
    style.
        #ticket-list .fa-check-circle-o {
            color: #00a900;
        }

        #ticket-list .fa-exclamation-circle {
            color: darkred;
        }

        @media (min-width: 500px) {
            #container {
                display: flex;
                flex-direction: row-reverse;
            }

            #container > main {
                flex: 1;
            }

            #container > aside {
                flex: 1;
                max-width: 200px;
                margin-left: 1em;
            }

            #container > aside > div {
                position: sticky;
                top: 60px;
            }
        }

    if has_select2
        link(href='{{ SELECT2_CSS_URL }}', type='text/css', media='screen', rel='stylesheet')
        style.
            .select2-selection__arrow { display: none; }
            .select2-selection__rendered { cursor: text; }
            .select2-results__option {  position: relative; }
            .select2-results__option--highlighted { background-color: #DEDEDE !important; }
            li.select2-results__option--highlighted a.user-redirect { display: inline-block; }

            a.user-redirect {
                color: #2980b9;
                vertical-align: middle;
                font-size: 1.2em;
                position: absolute;
                right: 0.8em;
                display: none;
            }

            a.user-redirect:hover { text-shadow: 0 0 2px blue; }

block js_media
    script(type='text/javascript').
        $(function () {
            $('input#own').click(function () {
                ($('<form>').attr('action', window.location.pathname + '?' + $('form#filter-form').serialize())
                        .append($('<input>').attr('type', 'hidden').attr('name', 'csrfmiddlewaretoken')
                                .attr('value', $.cookie('csrftoken')))
                        .attr('method', 'POST').appendTo($('body')).submit());
            });
        });
    if has_select2
        script(type='text/javascript', src='{{ SELECT2_JS_URL }}')
        script(type='text/javascript').
            $(function () {
                $('#filter-user').select2({
                    ajax: { url: '{% url "ticket_user_select2_ajax" %}' },
                    escapeMarkup: function (markup) {
                        return markup;
                    },
                    templateResult: function (data, container) {
                        return $('<span>')
                                .append($('<img>', {
                                    'class': 'user-search-image', src: data.gravatar_url,
                                    width: 24, height: 24
                                }))
                                .append($('<span>', {'class': data.display_rank + ' user-search-name'}).text(data.text));
                    }
                });
            });

block body
    #container
        aside: div
            form#filter-form(name='form', action='', method='get')
                div#own-box.filter-check
                    input#own(type='checkbox', name='own', checked=('checked' if filter_status['own'] else undefined), value='1')
                    label(for='own') {% trans "Show my tickets only" %}
                div#user-box.filter-select2
                    label(for='filter-user') {% trans "Filing user:" %}
                    select#filter-user(style='width: 100%', multiple, name='user')
                button.submit(type='submit', style='margin-left: auto') {% trans "Go" %}

        main
            if page_obj.num_pages > 1
                div(style='margin-bottom:6px; margin-top:3px')
                    include list_pages

            table#ticket-list.table
                thead: tr
{'fraction_non_alphanumeric': 0.13776908023483367, 'fraction_numerical': 0.014350945857795172, 'mean_word_length': 1.3371951219512195, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6582688', 'n_tokens_mistral': 2157, 'n_tokens_neox': 1955, 'n_words': 372}