<commit_before>/**
 * Defines a box of admins and inherited admins on a basenode.
 * */
Ext.define('devilry_subjectadmin.view.AdminsBox', {
    extend: 'Ext.Container',
    alias: 'widget.adminsbox',
    cls: 'devilry_subjectadmin_adminsbox bootstrap',
    requires: [
        'devilry_subjectadmin.utils.UrlLookup',
        'devilry_subjectadmin.view.ManageAdminsPanel',
        'devilry_extjsextras.AutoSizedWindow',
        'devilry_extjsextras.MarkupMoreInfoBox'
    ],

    layout: 'anchor',
    defaults: {
        anchor: '100%'
    },

    adminsTpl: [
        '<h4>', gettext('Administrator rights'), '</h4>',
        '<p class="muted">',
            '<small>',
                gettext('{admincount} users have administrator rights on this item.'),
                ' {MORE_BUTTON}',
            '</small>',
        '</p>',
        '<div {MORE_ATTRS}>',
            '<h5>', gettext('How administrator rights work'), '</h5>',
            '<p>',
                gettext('Devilry has a very simple permission system for administrators. You are either administrator on an item, or you have no access to the administrator views for an item.'),
            '</p>',
            '<p>',
                gettext('Administrators can be set anywhere in the hierarchy, from nodes on the top, to assignments at the bottom, and permissions propagate downwards in the hierarchy.'),
            '</p>',

            '<h5>', gettext('Administrators on this item') ,'</h5>',
            '<tpl if="admins.length &gt; 0">',
                '<p><small class="muted">',
                    gettext('These are the administrators on this item.'),
                '</small></p>',
                '<ul class="devilry_subjectadmin_administratorlist unstyled">',
                    '<tpl for="admins">',
                        '<li class="administratorlistitem administratorlistitem_{username}">',
                            '<a href="mailto:{email}" class="mail-link-right">',
                                '<tpl if="full_name != null">',
                                    '{full_name}',
                                '</tpl>',
                                '<tpl if="full_name == null">',
                                    '{username}',
                                '</tpl>',
                            '</a>',
                        '</li>',
                    '</tpl>',
                '</ul>',
                '<p>',
                    ' <a href="#" class="btn editadmins_link">',
                        gettext('Add or edit administrators'),
                    '</a>',
                '</p>',
            '<tpl else>',
                '<p>',
                    '<small class="muted">', gettext('No administrators') ,'</small>',
                '</p>',
                '<p>',
                    ' <a href="#" class="btn editadmins_link">',
                        gettext('Add administrators'),
                    '</a>',
                '</p>',
            '</tpl>',

            '<tpl if="inherited_admins.length &gt; 0">',
                '<h5>', gettext('Other administrators'), '</h5>',
                '<ul class="devilry_subjectadmin_inherited_administratorlist unstyled">',
                    '<tpl for="inherited_admins">',
                        '<li class="inherited_administratorlistitem inherited_administratorlistitem_{user.username}">',
                            '<a href="mailto:{user.email}" class="mail-link-right">',
                                '<tpl if="user.full_name != null">',
                                    '{user.full_name}',
                                '</tpl>',
                                '<tpl if="user.full_name == null">',
                                    '{user.username}',
                                '</tpl>',
                            '</a>',
                            ' <tpl if="basenode.is_admin">',
                                '<small>(<a href="{url}">{basenode.path})</a>',
                            '<tpl else>',
                                '<small class="muted">({basenode.path})</small>',
                            '</tpl>',
                        '</li>',
                    '</tpl>',
                '</ul>',
            '</tpl>',
        '<div>'
    ],
<commit_msg>subjectadmin...AdminsBox: Closed small-tag around name.<commit_after>/**
 * Defines a box of admins and inherited admins on a basenode.
 * */
Ext.define('devilry_subjectadmin.view.AdminsBox', {
    extend: 'Ext.Container',
    alias: 'widget.adminsbox',
    cls: 'devilry_subjectadmin_adminsbox bootstrap',
    requires: [
        'devilry_subjectadmin.utils.UrlLookup',
        'devilry_subjectadmin.view.ManageAdminsPanel',
        'devilry_extjsextras.AutoSizedWindow',
        'devilry_extjsextras.MarkupMoreInfoBox'
    ],

    layout: 'anchor',
    defaults: {
        anchor: '100%'
    },

    adminsTpl: [
        '<h4>', gettext('Administrator rights'), '</h4>',
        '<p class="muted">',
            '<small>',
                gettext('{admincount} users have administrator rights on this item.'),
                ' {MORE_BUTTON}',
            '</small>',
        '</p>',
        '<div {MORE_ATTRS}>',
            '<h5>', gettext('How administrator rights work'), '</h5>',
            '<p>',
                gettext('Devilry has a very simple permission system for administrators. You are either administrator on an item, or you have no access to the administrator views for an item.'),
            '</p>',
            '<p>',
                gettext('Administrators can be set anywhere in the hierarchy, from nodes on the top, to assignments at the bottom, and permissions propagate downwards in the hierarchy.'),
            '</p>',

            '<h5>', gettext('Administrators on this item') ,'</h5>',
            '<tpl if="admins.length &gt; 0">',
                '<p><small class="muted">',
                    gettext('These are the administrators on this item.'),
                '</small></p>',
                '<ul class="devilry_subjectadmin_administratorlist unstyled">',
                    '<tpl for="admins">',
                        '<li class="administratorlistitem administratorlistitem_{username}">',
                            '<a href="mailto:{email}" class="mail-link-right">',
                                '<tpl if="full_name != null">',
                                    '{full_name}',
                                '</tpl>',
                                '<tpl if="full_name == null">',
                                    '{username}',
                                '</tpl>',
                            '</a>',
                        '</li>',
                    '</tpl>',
                '</ul>',
                '<p>',
                    ' <a href="#" class="btn editadmins_link">',
                        gettext('Add or edit administrators'),
                    '</a>',
                '</p>',
            '<tpl else>',
                '<p>',
                    '<small class="muted">', gettext('No administrators') ,'</small>',
                '</p>',
                '<p>',
                    ' <a href="#" class="btn editadmins_link">',
                        gettext('Add administrators'),
                    '</a>',
                '</p>',
            '</tpl>',

            '<tpl if="inherited_admins.length &gt; 0">',
                '<h5>', gettext('Other administrators'), '</h5>',
                '<ul class="devilry_subjectadmin_inherited_administratorlist unstyled">',
                    '<tpl for="inherited_admins">',
                        '<li class="inherited_administratorlistitem inherited_administratorlistitem_{user.username}">',
                            '<a href="mailto:{user.email}" class="mail-link-right">',
                                '<tpl if="user.full_name != null">',
                                    '{user.full_name}',
                                '</tpl>',
                                '<tpl if="user.full_name == null">',
                                    '{user.username}',
                                '</tpl>',
                            '</a>',
                            ' <tpl if="basenode.is_admin">',
                                '<small>(<a href="{url}">{basenode.path})</a></small>',
                            '<tpl else>',
                                '<small class="muted">({basenode.path})</small>',
                            '</tpl>',
                        '</li>',
                    '</tpl>',
                '</ul>',
            '</tpl>',
        '<div>'
    ],

{'fraction_non_alphanumeric': 0.15532509904451178, 'fraction_numerical': 0.0030295968305756233, 'mean_word_length': 1.2808929045973958, 'pattern_counts': {'":': 0, '<': 146, '<?xml version=': 0, '>': 146, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '145413', 'n_tokens_mistral': 2223, 'n_tokens_neox': 2318, 'n_words': 470}