Skip to content
tenprint_list.html 4.24 KiB
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( 'send_app_files', path = 'functions.js' ) }}"></script>
        <link type="text/css" rel="stylesheet" href="{{ url_for( 'send_app_files', path = 'app.css' ) }}">
        
        <script type="text/javascript">
            baseurl = "{{ baseurl }}";
            var password_local = decrypt( sessionStorage.getItem( "session_key" ), "{{ session_security_key }}" );
            var nickname = decrypt( "{{ nickname }}", password_local );
        </script>
        
        <style type="text/css">
            .icnml_next_buttons {
                margin-top: 20px;
                padding-left: 50px;
                padding-right: 50px;
            }
            .icnml_next_button {
                width: 100%;
                margin-bottom: 5px;
            }
Marco De Donno's avatar
Marco De Donno committed
            #icnml_donor_list > div {
                margin: 10px;
                display: grid;
                grid-gap: 10px;
                grid-template-columns: repeat( auto-fit, minmax( 200px, max-content ) );
                grid-auto-rows: min-content;
            }
Marco De Donno's avatar
Marco De Donno committed
            .icnml_donor_button {
Marco De Donno's avatar
Marco De Donno committed
            .icnml_donor_button > span {
                height: 120px;
                line-height: 120px;
                vertical-align: center;
                text-align: center;
            }
        </style>
    </head>
    <body class="icnml_main_layout">
        {% include "header.html" %}
        {% include "navigations/submitter.html" %}
        
        <div class="icnml_content">
            <div id="icnml_donor_list">
                {% macro tp_box( tenprint ) %}
                    <div style="margin-bottom: 20px">
                        <div class="ui-widget-header ui-corner-top icnml_box_top" id="tenprint_{{ tenprint[ 'uuid' ] }}_filename">-</div>
                        <div class="ui-widget-content ui-corner-bottom icnml_box_content">
                            <div class="icnml_button">
                                <a id="edit_{{ tenprint[ 'id' ] }}" href="{{ url_for( 'submission_tenprint', id = submission_id, tid = tenprint[ 'uuid' ] ) }}">
                                    <img height="350px" src="{{ url_for( 'img_preview', id = tenprint[ 'uuid' ] ) }}">
                                </a>
                            </div>
                {% endmacro %}
                
                <div id="front">
                    {% for tenprint in tenprint_cards_front %}
                        {{ tp_box( tenprint ) }}
                    {% endfor %}
                </div>
                <div id="back">
                    {% for tenprint in tenprint_cards_back %}
                        {{ tp_box( tenprint ) }}
                    {% endfor %}
            {% for tenprint in tenprint_cards_front %}
                $( "#tenprint_{{ tenprint[ 'uuid' ] }}_filename" )
                	.text( decrypt( "{{ tenprint[ 'filename' ] }}", password_local ) );
            {% endfor %}
            {% for tenprint in tenprint_cards_back %}
                $( "#tenprint_{{ tenprint[ 'uuid' ] }}_filename" )
            		.text( decrypt( "{{ tenprint[ 'filename' ] }}", password_local ) );
            {% endfor %}
            
Marco De Donno's avatar
Marco De Donno committed
            $( '#icnml_navigation_updatedonor' )
            
            $( '#navloc' ).append(
        		$( '<a />' )
        			.attr( 'href', "{{ url_for( 'submission_list' ) }}" )
        			.text( "Submissions" )
			)
			.append(
        		$( '<span />' ).text( ">" )
			)
			.append(
				$( '<a />' )
					.attr( 'href', "{{ url_for( 'submission_update', id = submission_id ) }}" )
			)
			.append(
        		$( '<span />' ).text( ">" )
			)
			.append(
        		$( '<span />' ).text( "Tenprints" )
			);