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

Share the target segment view page between the admin and afis accounts

parent b3d1e751
No related branches found
No related tags found
No related merge requests found
......@@ -47,9 +47,17 @@ def list_folders():
folder_list = folder_list
)
@afis_view.route( "/admin/target/<uuid>" )
@admin_required
def admin_show_target( uuid ):
return show_folder_inner( uuid, True )
@afis_view.route( "/afis/<uuid>" )
@login_required
def show_folder( uuid ):
return show_folder_inner( uuid, False )
def show_folder_inner( uuid, admin ):
sql = """
SELECT
cnm_assignment.folder_uuid,
......@@ -75,7 +83,7 @@ def show_folder( uuid ):
annotation_list = config.db.query_fetchall( sql, ( uuid, ) )
return my_render_template(
"afis/segment.html",
"shared/segment.html",
segments_list = segments_list,
annotation_list = annotation_list
)
......@@ -100,8 +108,3 @@ def admin_show_target_list( uuid ):
segments_position_code = segments_position_code
)
@afis_view.route( "/admin/target/<uuid>" )
@admin_required
def admin_show_target( uuid ):
return "{}".format( uuid )
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