<commit_before>extends base

- load gravatar
- load markdown_trois_tags
- load reference
- load smart_math
- load camo_proxy
- load i18n
- load staticfiles

block media
    | #{form.media.css}
    style.
        #content > h2:first-child small {
            color: #999;
            font-size: 0.9em;
            margin-left: 0.3em;
        }

        #content > h2:first-child .status {
            display: inline;
        }

        #content > h2:first-child .fa-check-circle-o {
            color: #00a900;
        }

        #content > h2:first-child .fa-exclamation-circle {
            color: darkred;
        }

        .container {
            width: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: row-reverse;
            max-width: 1000px;
        }

        .ticket-sidebar {
            flex: 1;
            padding: 10px 0 0 10px;
            max-width: 200px;
        }

        .ticket-info {
            position: sticky;
            top: 60px;
        }

        .ticket-messages {
            flex: 1;
        }

        .info-box {
            margin: 5px 0 10px;
            border: 1px #999 solid;
            border-radius: 5px;
        }

        .info-title {
            padding: 2px 5px;
            font-weight: 600;
            border-bottom: 1px #999 solid;
            background: #eee;
            border-radius: 5px 5px 0 0;
        }

        .info-data {
            padding: 2px 5px;
        }

        .info-empty {
            color: #999;
            font-style: italic;
        }

        .close-ticket {
            display: block;
            width: 100%;
            background: linear-gradient(to bottom, #4bad00 0%, #278811 100%);
            border-color: #24710e;
            font-weight: 600;
        }

        .close-ticket:hover {
            background: #24710e;
        }

        .open-ticket {
            display: block;
            width: 100%;
            background: linear-gradient(to bottom, #ff130f, #b03d17);
            border-color: #853011;
            font-weight: 600;
        }

        .open-ticket:hover {
            background: #853011;
        }

        a.edit-notes {
            float: right;
        }

        #ticket-notes .info-real :first-child {
            margin-top: 0;
        }

        #ticket-notes .info-real :last-child {
            margin-bottom: 0;
        }

        .message {
            display: flex;
            margin-top: -40px;
            padding-top: 55px;
        }

        .message .info {
            width: 130px;
        }

        .message .username {
            text-align: center;
        }

        .message .gravatar {
            width: 80px;
            display: block;
            margin: 0 auto;
        }

        .message .message-date, .message .message-time {
            display: inline-block;
        }

        .message .detail {
            border: 1px #999 solid;
            border-radius: 5px;
            flex: 1;
        }

        .message .header {
            background: #eee;
            color: #777;
            border-bottom: 1px solid #999;
            border-radius: 5px 5px 0 0;
            padding: 2px 7px;
            text-align: right;
        }

        .message .content {
            padding: 7px;
        }

        .message .content :first-child {
            margin-top: 0;
        }

        .message .content :last-child {
            margin-bottom: 0;
        }

        .new-message .detail {
            padding: 8px 10px;
        }

        .new-message .submit, #edit-notes .submit {
            margin: 10px 0 0 auto;
        }

block js_media
    | #{form.media.js}
    script(src='{% static "libs/featherlight/featherlight.min.js" %}', type='text/javascript')
    script(type='text/javascript').
        $(function () {
            $('.close-ticket, .open-ticket').click(function () {
                $.ajax({
                    url: $(this).attr('data-ajax'), type: 'POST',
                    success: function () {
                        window.location.reload();
                    },
                    error: function (data) {
                        alert('Could not change ticket: ' + data.responseText);
                    }
                });
            });

            $('.edit-notes').featherlight({
                afterOpen: function () {
                    var $form = $('#edit-notes');
                    $form.find('.submit').click(function () {
                        $.post($form.attr('action'), $form.serialize()).done(function (data) {
                            $('#ticket-notes').find('.info-empty').toggle(!data).end().find('.info-real').html(data);
                            $.featherlight.current().close();
                        });
                        return false;
                    });
                }
            });
        });

block content_title
    .status
        if ticket.is_open
            i.fa.fa-exclamation-circle
        else
            i.fa.fa-check-circle-o
    | #{ticket.title}
    small ##{ticket.id}

block body
    .container
        aside.ticket-sidebar: .ticket-info
            .info-box
                .info-title {% trans "Associated object" %}
                .info-data: a(href=ticket.linked_item.get_absolute_url())= ticket.linked_item
            .info-box
                .info-title {% trans "Assignees" %}
                .info-data
                    if assignees
                        each assignee in assignees
                            a(href='{% url "user_page" assignee.user.username %}', class=assignee.display_rank)<commit_msg>Allow main ticket to defer notifications to tabs when possible; #327<commit_after>extends base

- load gravatar
- load markdown_trois_tags
- load reference
- load smart_math
- load camo_proxy
- load i18n
- load staticfiles

block media
    | #{form.media.css}
    style.
        #content > h2:first-child small {
            color: #999;
            font-size: 0.9em;
            margin-left: 0.3em;
        }

        #content > h2:first-child .status {
            display: inline;
        }

        #content > h2:first-child .fa-check-circle-o {
            color: #00a900;
        }

        #content > h2:first-child .fa-exclamation-circle {
            color: darkred;
        }

        .container {
            width: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: row-reverse;
            max-width: 1000px;
        }

        .ticket-sidebar {
            flex: 1;
            padding: 10px 0 0 10px;
            max-width: 200px;
        }

        .ticket-info {
            position: sticky;
            top: 60px;
        }

        .ticket-messages {
            flex: 1;
        }

        .info-box {
            margin: 5px 0 10px;
            border: 1px #999 solid;
            border-radius: 5px;
        }

        .info-title {
            padding: 2px 5px;
            font-weight: 600;
            border-bottom: 1px #999 solid;
            background: #eee;
            border-radius: 5px 5px 0 0;
        }

        .info-data {
            padding: 2px 5px;
        }

        .info-empty {
            color: #999;
            font-style: italic;
        }

        .close-ticket {
            display: block;
            width: 100%;
            background: linear-gradient(to bottom, #4bad00 0%, #278811 100%);
            border-color: #24710e;
            font-weight: 600;
        }

        .close-ticket:hover {
            background: #24710e;
        }

        .open-ticket {
            display: block;
            width: 100%;
            background: linear-gradient(to bottom, #ff130f, #b03d17);
            border-color: #853011;
            font-weight: 600;
        }

        .open-ticket:hover {
            background: #853011;
        }

        a.edit-notes {
            float: right;
        }

        #ticket-notes .info-real :first-child {
            margin-top: 0;
        }

        #ticket-notes .info-real :last-child {
            margin-bottom: 0;
        }

        .message {
            display: flex;
            margin-top: -40px;
            padding-top: 55px;
        }

        .message .info {
            width: 130px;
        }

        .message .username {
            text-align: center;
        }

        .message .gravatar {
            width: 80px;
            display: block;
            margin: 0 auto;
        }

        .message .message-date, .message .message-time {
            display: inline-block;
        }

        .message .detail {
            border: 1px #999 solid;
            border-radius: 5px;
            flex: 1;
        }

        .message .header {
            background: #eee;
            color: #777;
            border-bottom: 1px solid #999;
            border-radius: 5px 5px 0 0;
            padding: 2px 7px;
            text-align: right;
        }

        .message .content {
            padding: 7px;
        }

        .message .content :first-child {
            margin-top: 0;
        }

        .message .content :last-child {
            margin-bottom: 0;
        }

        .new-message .detail {
            padding: 8px 10px;
        }

        .new-message .submit, #edit-notes .submit {
            margin: 10px 0 0 auto;
        }

block js_media
    | #{form.media.js}
    script(src='{% static "libs/featherlight/featherlight.min.js" %}', type='text/javascript')
    script(type='text/javascript').
        $(function () {
            $('.close-ticket, .open-ticket').click(function () {
                $.ajax({
                    url: $(this).attr('data-ajax'), type: 'POST',
                    success: function () {
                        window.location.reload();
                    },
                    error: function (data) {
                        alert('Could not change ticket: ' + data.responseText);
                    }
                });
            });

            $('.edit-notes').featherlight({
                afterOpen: function () {
                    var $form = $('#edit-notes');
                    $form.find('.submit').click(function () {
                        $.post($form.attr('action'), $form.serialize()).done(function (data) {
                            $('#ticket-notes').find('.info-empty').toggle(!data).end().find('.info-real').html(data);
                            $.featherlight.current().close();
                        });
                        return false;
                    });
                }
            });

            localStorage['ticket:open:{{ ticket.id }}'] = true;
            $(window).on('beforeunload', function() {
                delete localStorage['ticket:open:{{ ticket.id }}'];
            });
        });

block content_title
    .status
        if ticket.is_open
            i.fa.fa-exclamation-circle
        else
            i.fa.fa-check-circle-o
    | #{ticket.title}
    small ##{ticket.id}

block body
    .container
        aside.ticket-sidebar: .ticket-info
            .info-box
                .info-title {% trans "Associated object" %}
                .info-data: a(href=ticket.linked_item.get_absolute_url())= ticket.linked_item
            .info-box
                .info-title {% trans "Assignees" %}
                .info-data
                    if assignees
                        each assignee in assignees
                            a(href='{% url "user_page" assignee.user.username %}', class=assignee.display_rank)
{'fraction_non_alphanumeric': 0.11888657648283038, 'fraction_numerical': 0.028182448838015954, 'mean_word_length': 1.1310051736881006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2107662', 'n_tokens_mistral': 3569, 'n_tokens_neox': 3122, 'n_words': 675}