Skip to content
Snippets Groups Projects
Commit 20be4c2f authored by Marco De Donno's avatar Marco De Donno
Browse files

Use the NIST segments_position_code labels instead of recreating them

parent 0483aa71
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,9 @@ import config ...@@ -7,6 +7,9 @@ import config
from utils.decorator import login_required, admin_required from utils.decorator import login_required, admin_required
from utils.template import my_render_template from utils.template import my_render_template
from NIST.fingerprint.labels import FINGER_POSITION_CODE, PALM_POSITION_CODE
segments_position_code = dict( FINGER_POSITION_CODE, **PALM_POSITION_CODE )
afis_view = Blueprint( "afis", __name__, template_folder = "templates" ) afis_view = Blueprint( "afis", __name__, template_folder = "templates" )
@afis_view.route( "/admin/afis/list" ) @afis_view.route( "/admin/afis/list" )
...@@ -81,15 +84,10 @@ def admin_show_target_list( uuid ): ...@@ -81,15 +84,10 @@ def admin_show_target_list( uuid ):
""" """
segments_list = config.db.query_fetchall( sql, ( uuid, ) ) segments_list = config.db.query_fetchall( sql, ( uuid, ) )
finger_names = []
for laterality in [ "Right", "Left" ]:
for finger in [ "thumb", "index", "middle", "ring", "little" ]:
finger_names.append( "{} {}".format( laterality, finger ) )
return my_render_template( return my_render_template(
"admin/folder_list.html", "admin/folder_list.html",
segments_list = segments_list, segments_list = segments_list,
finger_names = finger_names segments_position_code = segments_position_code
) )
@afis_view.route( "/admin/<uuid>/target/<pc>" ) @afis_view.route( "/admin/<uuid>/target/<pc>" )
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="icnml_list_of_boxes"> <div class="icnml_list_of_boxes">
{% for n in [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 24, 25, 27 ] %} {% for n in [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 24, 25, 27 ] %}
<div style="margin-bottom: 20px" id="segment_outer_div"> <div style="margin-bottom: 20px" id="segment_outer_div">
<div class="ui-widget-header ui-corner-top icnml_box_top">Segment {{ n }}</div> <div class="ui-widget-header ui-corner-top icnml_box_top">{{ segments_position_code.get( n ) }} (F{{ n }})</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content"> <div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div id="segment_{{ n }}" class="icnml_pointer"> <div id="segment_{{ n }}" class="icnml_pointer">
segment not available segment not available
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment