<commit_before>{% extends "theme/base.django.html" %}
{% load extjs %}

{% block title %}Devilry student interface{% endblock %}


{% block nav-class %}student{% endblock %}


{% block headextra %}

<script>

    {% for RestfulCls in restfulclasses %}
        {{ RestfulCls|extjs_combobox_model }}
    {% endfor %}

    var assignmentstore = {{ RestfulSimplifiedAssignment|extjs_store:3 }}
    var assignmentgroupstore = {{ RestfulSimplifiedAssignmentGroup|extjs_store:3 }}
    var deliverystore = {{ RestfulSimplifiedDelivery|extjs_store:3 }}
    var deadlinestore = {{ RestfulSimplifiedDeadline|extjs_store:3 }}
    var listingdeadlinestore = {{ RestfulSimplifiedDeadline|extjs_store:10 }}

    Ext.require('devilry.extjshelpers.searchwidget.SearchWidget');
    Ext.onReady(function() {
        var searchwidget = Ext.create('devilry.extjshelpers.searchwidget.SearchWidget', {
            renderTo: 'searchwidget',
            searchResultItems: [{
                xtype: 'searchresults',
                title: 'Deadlines',
                store: deadlinestore,
                links: [{
                    title: 'Deliver',
                    urlprefix: 'add-delivery/',
                    cssclass: 'button good-button'
                }],
                rowformattpl: '{{ RestfulSimplifiedDeadline.ExtjsModelMeta.combobox_tpl|escapejs }}'
            }, {
                xtype: 'searchresults',
                title: 'Assignment groups',
                store: assignmentgroupstore,
                editorurlprefix: '',
                rowformattpl: '{{ RestfulSimplifiedAssignmentGroup.ExtjsModelMeta.combobox_tpl|escapejs }}'
            }, {
                xtype: 'searchresults',
                title: 'Assignments',
                store: assignmentstore,
                editorurlprefix: '',
                rowformattpl: '{{ RestfulSimplifiedAssignment.ExtjsModelMeta.combobox_tpl|escapejs }}'
            }, {
                xtype: 'searchresults',
                title: 'Deliveries',
                store: deliverystore,
                editorurlprefix: '',
                rowformattpl: '{{ RestfulSimplifiedDelivery.ExtjsModelMeta.combobox_tpl|escapejs }}'
            }]
        });
        searchwidget.loadInitialValues();
        searchwidget.focusOnSearchfield();

    var msg = function(title, msg) {
        Ext.Msg.show({
            title: title,
            msg: msg,
            minWidth: 200,
            modal: true,
            icon: Ext.Msg.INFO,
            buttons: Ext.Msg.OK
        });
    };<commit_msg>apps.student: Fixed dashboard.<commit_after>{% extends "theme/base.django.html" %}
{% load extjs %}

{% block title %}Devilry student interface{% endblock %}


{% block nav-class %}student{% endblock %}


{% block headextra %}

<script>

    {% for RestfulCls in restfulclasses %}
        {{ RestfulCls|extjs_combobox_model }}
    {% endfor %}

    var assignmentstore = {{ RestfulSimplifiedAssignment|extjs_store:3 }}
    var assignmentgroupstore = {{ RestfulSimplifiedAssignmentGroup|extjs_store:3 }}
    var deliverystore = {{ RestfulSimplifiedDelivery|extjs_store:3 }}
    var deadlinestore = {{ RestfulSimplifiedDeadline|extjs_store:3 }}
    var listingdeadlinestore = {{ RestfulSimplifiedDeadline|extjs_store:10 }}

    Ext.require('devilry.extjshelpers.searchwidget.SearchWidget');
    Ext.onReady(function() {
        var searchwidget = Ext.create('devilry.extjshelpers.searchwidget.SearchWidget', {
            renderTo: 'searchwidget',
            searchResultItems: [{
                xtype: 'searchresults',
                title: 'Deadlines',
                store: deadlinestore,
                resultitemConfig: {
                    tpl: '{{ RestfulSimplifiedDeadline.ExtjsModelMeta.combobox_tpl|escapejs }}',
                    defaultbutton: {
                        text: 'Deliver',
                        clickLinkTpl: 'add-delivery/{id}'
                    }
                }
            }, {
                xtype: 'searchresults',
                title: 'Assignment groups',
                store: assignmentgroupstore,
                resultitemConfig: {
                    tpl: '{{ RestfulSimplifiedAssignmentGroup.ExtjsModelMeta.combobox_tpl|escapejs }}'
                }
            }, {
                xtype: 'searchresults',
                title: 'Assignments',
                store: assignmentstore,
                resultitemConfig: {
                    tpl: '{{ RestfulSimplifiedAssignment.ExtjsModelMeta.combobox_tpl|escapejs }}'
                }
            }, {
                xtype: 'searchresults',
                title: 'Deliveries',
                store: deliverystore,
                resultitemConfig: {
                    tpl: '{{ RestfulSimplifiedDelivery.ExtjsModelMeta.combobox_tpl|escapejs }}'
                }
            }]
        });
        searchwidget.loadInitialValues();
        searchwidget.focusOnSearchfield();

    var msg = function(title, msg) {
        Ext.Msg.show({
            title: title,
            msg: msg,
            minWidth: 200,
            modal: true,
            icon: Ext.Msg.INFO,
            buttons: Ext.Msg.OK
        });
    };
{'fraction_non_alphanumeric': 0.1080663836356619, 'fraction_numerical': 0.0034735623311462757, 'mean_word_length': 1.8810450250138966, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6033317', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1390, 'n_words': 220}