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

Add the annotation list to the afis segment show page

parent 9a840254
No related branches found
No related tags found
No related merge requests found
...@@ -67,9 +67,17 @@ def show_folder( uuid ): ...@@ -67,9 +67,17 @@ def show_folder( uuid ):
""" """
segments_list = config.db.query_fetchall( sql, ( uuid, ) ) segments_list = config.db.query_fetchall( sql, ( uuid, ) )
sql = """
SELECT uuid
FROM cnm_data
WHERE folder_uuid = %s
"""
annotation_list = config.db.query_fetchall( sql, ( uuid, ) )
return my_render_template( return my_render_template(
"afis/segment.html", "afis/segment.html",
segments_list = segments_list segments_list = segments_list,
annotation_list = annotation_list
) )
@afis_view.route( "/admin/<uuid>/target/list" ) @afis_view.route( "/admin/<uuid>/target/list" )
......
...@@ -55,6 +55,28 @@ ...@@ -55,6 +55,28 @@
<input id="search_bar" placeholder="Search for a file..."/> <input id="search_bar" placeholder="Search for a file..."/>
</div> </div>
{% 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 %} {% if segments_list != None %}
<div class="icnml_list_of_boxes_outer"> <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_desc">Non annotated images ({{ segments_list|length }})</div>
......
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