Skip to content
Commits on Source (4)
......@@ -1462,22 +1462,24 @@ def admin_tenprint_list( submission_id = "all" ):
if submission_id != "all":
sql = """
SELECT users.username
SELECT users.username, submissions.uuid
FROM submissions
LEFT JOIN users ON submissions.donor_id = users.id
WHERE submissions.uuid = %s
"""
selector = config.db.query_fetchone( sql, ( submission_id, ) )[ "username" ]
selector, submission_uuid = config.db.query_fetchone( sql, ( submission_id, ) )
else:
selector = "all"
submission_uuid = None
current_app.logger.info( "{} tenprints cards found".format( len( tenprint_cards ) ) )
return my_render_template(
"admin/tenprint_list.html",
tenprint_cards = tenprint_cards,
selector = selector
selector = selector,
submission_uuid = submission_uuid
)
@submission_view.route( "/admin/<submission_id>/tenprint/<tenprint_id>" )
......
......@@ -66,7 +66,13 @@
$( "<span />" ).text( ">" )
)
.append(
$( "<span />" ).text( "{{ selector }}" )
{% if submission_uuid != null %}
$( "<a />" )
.attr( "href", "{{ url_for( 'submission.admin_submission_home', submission_id = submission_uuid ) }}" )
.text( "{{ selector }}" )
{% else %}
$( "<span />" ).text( "{{ selector }}" )
{% endif %}
)
.append(
$( "<span />" ).text( ">" )
......
......@@ -379,19 +379,20 @@
var next_fpc = function()
{
current_fpc = null;
current_fpc_pointer += 1;
if( current_fpc_pointer >= to_annotate.length )
while( current_fpc_pointer < to_annotate.length )
{
current_fpc = null;
} else {
while( $( "#segment_fpc_" + to_annotate[ current_fpc_pointer ] ).length === 1 )
if( $( "#segment_fpc_" + to_annotate[ current_fpc_pointer ] ).length === 0 )
{
return next_fpc();
current_fpc = to_annotate[ current_fpc_pointer ];
break;
}
current_fpc = to_annotate[ current_fpc_pointer ];
current_fpc_pointer += 1;
}
move_text = current_fpc;
}
......@@ -611,7 +612,10 @@
$( "#move_text" )
.attr( "x", event.offsetX + 10 )
.attr( "y", event.offsetY - 10 )
.text( "finger " + move_text + " (" + segments_position_code[ move_text ] + ")" )
.text( "segment " + move_text + " (" + segments_position_code[ move_text ] + ")" )
} else {
$( "#move_text" )
.text( "" )
}
}
......@@ -792,7 +796,7 @@
.attr( "x", x )
.attr( "y", y - 5 )
.attr( "fill", colour )
.text( "finger " + fpc )
.text( "segment " + fpc + " (" + segments_position_code[ fpc ] + ")" )
.appendTo( svggroup );
return svggroup;
......