Newer
Older
<!DOCTYPE html>
<html>
<head>
{% for src in js %}
<script type="text/javascript" src="{{ src }}"></script>
{% endfor %}
{% for src in css %}
<link type="text/css" rel="stylesheet" href="{{ src }}">
{% endfor %}
<script type="text/javascript" src="{{ url_for( 'files.send_app_files', subpath = 'functions.js' ) }}"></script>
<link type="text/css" rel="stylesheet" href="{{ url_for( 'files.send_app_files', subpath = 'app.css' ) }}">
<script type="text/javascript">
baseurl = "{{ baseurl }}";

Marco De Donno
committed
{% if not admin %}
var password_local = decrypt( sessionStorage.getItem( "session_key" ), "{{ session_security_key }}" );
var nickname = decrypt( "{{ nickname }}", password_local );
{% endif %}

Marco De Donno
committed

Marco De Donno
committed
{% for file in files %}

Marco De Donno
committed
update_search_result = function()
{
searched = searched.toLowerCase();
var uuid = marks_list[ i ];
var filename = $( "#mark_" + uuid + "_filename" ).text();
filename = filename.toLowerCase();

Marco De Donno
committed
} else {
$( "#mark_" + uuid ).hide();
}

Marco De Donno
committed
}
.icnml_list_of_boxes {
grid-template-columns: repeat( auto-fit, minmax( var( --imgsize ), 220px ) );
grid-auto-rows: min-content;
margin-bottom: 10px;

Marco De Donno
committed
.icnml_search_bar {
margin-left: 10px;
margin-bottom: 20px;
width: 500px;
}
</style>
</head>
<body class="icnml_main_layout">
{% include "header.html" %}

Marco De Donno
committed
{% include navigation %}

Marco De Donno
committed
<div class="icnml_search_bar">
<input id="search_bar" placeholder="Search for a file..."/>
</div>
<div class="icnml_list_of_boxes">
<div id="mark_{{ file[ 'uuid' ] }}">
<div class="ui-widget-header ui-corner-top icnml_box_top" id="mark_{{ file[ 'uuid' ] }}_filename">-</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div
id="mark_{{ file[ 'uuid' ] }}"
style="background-image: url( {{ url_for( 'image.image_file_serve', file_id = file[ 'uuid' ] ) }} )">
$( "#search_bar" ).on( "keyup", update_search_result );
$( "#search_bar" ).focus();
{% for file in files %}
$( "#mark_{{ file[ 'uuid' ] }}" ).on( "click", function()
{
window.location.href = "{{ url_for( 'submission.submission_mark', submission_id = submission_id, mark_id = file[ 'uuid' ] ) }}";
} );
{% endfor %}
$( "#icnml_navigation_submissions" )

Marco De Donno
committed
{% if not admin %}
{% for file in files %}
$( "#mark_{{ file[ 'uuid' ] }}_filename" )
.text( decrypt( "{{ file[ 'filename' ] }}", password_local ) );
{% endfor %}
{% else %}
{% for file in files %}
$( "#mark_{{ file[ 'uuid' ] }}_filename" )
.text( "Mark {{ file[ 'id' ] }}" );
{% endfor %}
{% endif %}

Marco De Donno
committed
{% if not admin %}
$( "#navloc" ).append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.submission_list' ) }}" )
.text( "Submissions" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.submission_upload_tenprintmark', submission_id = submission_id ) }}" )

Marco De Donno
committed
.text( nickname )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.submission_mark_list', submission_id = submission_id, mark_type = 'all' ) }}" )
.text( "Marks" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<span />" ).text( "{{ mark_type }}" )
);
{% else %}
$( "#navloc" ).append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.admin_submission_list' ) }}" )
.text( "Submissions" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.admin_submission_home', submission_id = submission_id ) }}" )
.text( "{{ username }}" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<span />" ).text( "Marks" )
);

Marco De Donno
committed
{% endif %}