<commit_before><head>
    <title>Portfolios</title>
</head>

<body>
    {{> controls}}
    {{> content}}
</body>

<template name="controls">
    {{#if currentUser }}
        <div id="controls" class="hidden-xs">
            {{> loginButtons }}
            {{> fileUpload }}
            {{> uploadedStatus}}
        </div>
    {{else}}
        <div id="unauth">
            {{> loginButtons }}
        </div>
    {{/if}}
</template>

<template name="fileUpload">
    {{#if currentUser}}
        {{#if currentUser.canUpload }}
            {{#if currentUser.isAdmin }}
                <div>
                    <label for="ownerUsername">File Owner</label>
                    <select name="ownerUsername" id="ownerUsername">
                            <option value="" selected></option>
                        {{#each users}}
                            <option value="{{username}}">{{profile.name}}</option>
                        {{/each}}
                    </select>
                </div>
            {{/if}}
            <div>
                <input class="userFile" type="file" name="userFile" multiple/>
                <input class="submit" type="submit" value="Upload" name="submit">
            </div>
        {{/if}}
    {{/if}}
</template>

<template name="uploadedStatus">
    {{#if currentUser}}
        {{message}}
        {{#each results}}<commit_msg>Show username to disambiguate students<commit_after><head>
    <title>Portfolios</title>
</head>

<body>
    {{> controls}}
    {{> content}}
</body>

<template name="controls">
    {{#if currentUser }}
        <div id="controls" class="hidden-xs">
            {{> loginButtons }}
            {{> fileUpload }}
            {{> uploadedStatus}}
        </div>
    {{else}}
        <div id="unauth">
            {{> loginButtons }}
        </div>
    {{/if}}
</template>

<template name="fileUpload">
    {{#if currentUser}}
        {{#if currentUser.canUpload }}
            {{#if currentUser.isAdmin }}
                <div>
                    <label for="ownerUsername">File Owner</label>
                    <select name="ownerUsername" id="ownerUsername">
                            <option value="" selected></option>
                        {{#each users}}
                            <option value="{{username}}">{{profile.name}} ({{username}})</option>
                        {{/each}}
                    </select>
                </div>
            {{/if}}
            <div>
                <input class="userFile" type="file" name="userFile" multiple/>
                <input class="submit" type="submit" value="Upload" name="submit">
            </div>
        {{/if}}
    {{/if}}
</template>

<template name="uploadedStatus">
    {{#if currentUser}}
        {{message}}
        {{#each results}}
{'fraction_non_alphanumeric': 0.17410071942446043, 'fraction_numerical': 0.0, 'mean_word_length': 1.5845724907063197, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 73, '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': '5168764', 'n_tokens_mistral': 761, 'n_tokens_neox': 741, 'n_words': 150}