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 }}";
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% if admin %}
var update_users_in_db = function()
{
update_users_in_db_sub( "mark" );
update_users_in_db_sub( "reference" );
}
var update_users_in_db_sub = function( type )
{
var users = [];
$.each( $( "#users_" + type + " > select > option:checked" ), function() {
users.push( parseInt( $( this ).val() ) );
} );
$.ajax( {
url: "{{ url_for( 'afis.admin_update_users_in_afis_folder', target_uuid = target_uuid ) }}",
dataType: "json",
method: "POST",
data: {
users: JSON.stringify( users ),
type: type
},
success: function( data )
{
if( data.error )
toastr.error( "Server side error" );
},
error: function( data )
{
toastr.error( "Network error" );
}
} );
}
{% endif %}
</script>
<style type="text/css">
:root {
--imgsize: 200px;
}
.icnml_list_of_boxes {
grid-template-columns: repeat( auto-fill, calc( var( --imgsize ) + 2 * var( --imgmargin ) ) );
}
.icnml_list_of_boxes_outer {
border: 1px solid #ccc;
border-radius: 10px;
padding: 10px;
margin-top: 10px;
margin-bottom: 20px;
}
.icnml_list_of_boxes_desc {
position: relative;
top: -19px;
padding-left: 10px;
padding-right: 20px;
width: fit-content;
width: -moz-fit-content;
background-color: rgb( 238, 238, 238 );
}
.list_of_assignee {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 3px 20px;
margin-bottom: 30px;
}
</head>
<body class="icnml_main_layout">
{% include "header.html" %}
{% include navigation %}
<div class="icnml_content">
{% if admin %}
<div class="list_of_assignee">
<div>Marks</div>
<div id="users_mark">
<select multiple id="users_select_marks" data-placeholder="Add a user to this folder..." class="chosen-select">
{% for user in all_afis_users %}
<option id="user_{{ user[ 'id' ] }}_mark_chosen" value="{{ user[ 'id' ] }}">{{ user[ 'username' ] }}</option>
{% endfor %}
</select>
</div>
<div>References</div>
<div id="users_reference">
<select multiple id="users_select_refs" data-placeholder="Add a user to this folder..." class="chosen-select">
{% for user in all_afis_users %}
<option id="user_{{ user[ 'id' ] }}_ref_chosen" value="{{ user[ 'id' ] }}">{{ user[ 'username' ] }}</option>
{% endfor %}
</select>
</div>
</div>
{% endif %}
{% if annotation_list != None %}
<div class="icnml_list_of_boxes_outer">
<div class="icnml_list_of_boxes_desc">Target annotations ({{ annotation_list|length }})</div>
<div class="icnml_list_of_boxes">
{% for s in annotation_list %}
<div id="segment_{{ s[ 'uuid' ] }}_outer">
<div class="ui-widget-header ui-corner-top icnml_box_top" id="segment_{{ s[ 'uuid' ] }}_filename">{{ s[ 'uuid' ][ 0:18 ] }}</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div
id="segment_{{ s[ 'uuid' ] }}"
class="icnml_pointer"
style="background-image: url( {{ url_for( 'image.image_annotation_serve', uuid = s[ 'uuid' ] ) }} )">
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% else %}
<div>No annotations for this finger at the moment</div>
{% endif %}
{% if segments_list != None %}
<div class="icnml_list_of_boxes_outer">
<div class="icnml_list_of_boxes_desc">Non annotated images ({{ segments_list|length }})</div>
<div class="icnml_list_of_boxes">
{% for s in segments_list %}
<div id="segment_{{ s[ 'folder_uuid' ] }}_outer">
<div class="ui-widget-header ui-corner-top icnml_box_top" id="segment_{{ s[ 'uuid' ] }}_filename">{{ s[ 'uuid' ][ 0:18 ] }}</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div
id="segment_{{ s[ 'uuid' ] }}"
class="icnml_pointer"
style="background-image: url( {{ url_for( 'image.image_segment_serve', tenprint_id = s[ 'tenprint' ], pc = s[ 'pc' ] ) }} )">
{% elif admin %}
<div>No segment images in this folder at the moment</div>
{% endif %}
{% if marks_list != None %}
<div class="icnml_list_of_boxes_outer">
<div class="icnml_list_of_boxes_desc">Marks ({{ marks_list|length }})</div>
<div class="icnml_list_of_boxes">
{% for mark in marks_list %}
<div id="mark_{{ mark[ 'uuid' ] }}_outer">
<div class="ui-widget-header ui-corner-top icnml_box_top" id="mark_{{ mark[ 'uuid' ] }}_filename">{{ mark[ 'uuid' ][ 0:18 ] }}</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div
id="mark_{{ mark[ 'uuid' ] }}"
class="icnml_pointer"
style="background-image: url( {{ url_for( 'image.image_file_serve', file_id = mark[ 'uuid' ] ) }} )">
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% elif admin %}
<div>No mark images in this folder at the moment</div>
{% endif %}
<div id="zoom_slider"></div>
</div>
<script type="text/javascript">
{% if admin %}
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
var users_assigned_refs = [];
{% for user in users_assigned_refs %}
users_assigned_refs.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_refs" )
.val( users_assigned_refs ).trigger( "chosen:updated" );
var users_assigned_marks = [];
{% for user in users_assigned_marks %}
users_assigned_marks.push( "{{ user[ 'id' ] }}" );
{% endfor %}
$( "#users_select_marks" )
.val( users_assigned_marks ).trigger( "chosen:updated" );
{% if admin %}
$( "#users_select_marks" ).on( "change", update_users_in_db )
$( "#users_select_refs" ).on( "change", update_users_in_db )
{% endif %}
$( "#users_select_marks" )
.chosen( {
search_contains: true,
width: "50%"
} );
$( "#users_select_refs" )
.chosen( {
search_contains: true,
width: "50%"
} );
{% endif %}
$( "#icnml_navigation_afis" )
.addClass( "activated" );
$( "#navloc" ).append(
$( "<a />" )
.attr( "href", "{{ url_for( 'afis.list_folders' ) }}" )
.text( "Submissions" )
)
.append(
$( "<span />" ).text( ">" )
)
{% if admin %}
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.admin_submission_home', submission_id = submission_id ) }}" )
.text( "{{ username }}" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<a />" )
.attr( "href", "{{ url_for( 'afis.admin_show_target_list', uuid = submission_id ) }}" )
.text( "Targets" )
)
.append(
$( "<span />" ).text( ">" )
)
.append(
$( "<span />" ).text( "{{ finger_name }}" )
)
{% else %}
.append(
$( "<span />" ).text( "{{ target_uuid[ 0:18 ] }}" )
)
</script>
</body>
</html>