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

Refactoring of the tenprint list page for admins

parent cf0b2ee9
No related branches found
No related tags found
No related merge requests found
...@@ -16,19 +16,8 @@ ...@@ -16,19 +16,8 @@
</script> </script>
<style type="text/css"> <style type="text/css">
#icnml_donor_list { :root {
margin: 10px; --imgsize: 300px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat( auto-fit, 270px );
grid-auto-rows: min-content;
}
img {
display: block;
max-width: 250px;
max-height: 350px;
width: auto;
height: auto;
} }
</style> </style>
</head> </head>
...@@ -37,16 +26,14 @@ ...@@ -37,16 +26,14 @@
{% include navigation %} {% include navigation %}
<div class="icnml_content"> <div class="icnml_content">
<div id="icnml_donor_list"> <div class="icnml_list_of_boxes">
{% for tenprint in tenprint_cards %} {% for tenprint in tenprint_cards %}
<div style="margin-bottom: 20px"> <div style="margin-bottom: 20px">
<div class="ui-widget-header ui-corner-top icnml_box_top" id="tenprint_{{ tenprint[ 'uuid' ] }}_filename">{{ tenprint[ 'username' ] }}</div> <div class="ui-widget-header ui-corner-top icnml_box_top">{{ tenprint[ 'username' ] }}</div>
<div class="ui-widget-content ui-corner-bottom icnml_box_content"> <div class="ui-widget-content ui-corner-bottom icnml_box_content">
<div class="icnml_button"> <div id="edit_{{ tenprint[ 'id' ] }}"
<a id="edit_{{ tenprint[ 'id' ] }}" href="{{ url_for( 'submission.admin_tenprint', submission_id = tenprint[ 'submission_uuid' ], tenprint_id = tenprint[ 'uuid' ] ) }}"> class="icnml_pointer"
<img src="{{ url_for( 'image.image_file_serve', file_id = tenprint[ 'uuid' ] ) }}" loading="lazy"> style="background-image: url( {{ url_for( 'image.image_file_serve', file_id = tenprint[ 'uuid' ] ) }} )"></div>
</a>
</div>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
...@@ -57,6 +44,13 @@ ...@@ -57,6 +44,13 @@
$( "#icnml_navigation_submissions" ) $( "#icnml_navigation_submissions" )
.addClass( "activated" ); .addClass( "activated" );
{% for tenprint in tenprint_cards %}
$( "#edit_{{ tenprint[ 'id' ] }}" ).on( "click", function()
{
window.location.href = "{{ url_for( 'submission.admin_tenprint', submission_id = tenprint[ 'submission_uuid' ], tenprint_id = tenprint[ 'uuid' ] ) }}";
})
{% endfor %}
$( "#navloc" ).append( $( "#navloc" ).append(
$( "<a />" ) $( "<a />" )
.attr( "href", "{{ url_for( 'submission.admin_submission_list' ) }}" ) .attr( "href", "{{ url_for( 'submission.admin_submission_list' ) }}" )
......
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