Code cleanup and documentation

This commit is contained in:
Landon Wark
2024-02-09 14:03:35 -06:00
parent eda62fba5a
commit a534d229a8
30 changed files with 1558 additions and 1347 deletions

View File

@@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
{% block head %}
<style>
/* Tooltip container */
.tooltip {
@@ -34,11 +35,13 @@
}
</style>
<title>Submission Details for {{ sub['Plate Number'] }}</title>
{% endblock %}
</head>
{% set excluded = ['reagents', 'samples', 'controls', 'extraction_info', 'pcr_info', 'comment', 'barcode', 'platemap', 'export_map', 'equipment'] %}
<body>
{% block body %}
<!-- {% set excluded = ['reagents', 'samples', 'controls', 'extraction_info', 'pcr_info', 'comment', 'barcode', 'platemap', 'export_map', 'equipment'] %} -->
<h2><u>Submission Details for {{ sub['Plate Number'] }}</u></h2>&nbsp;&nbsp;&nbsp;{% if sub['barcode'] %}<img align='right' height="30px" width="120px" src="data:image/jpeg;base64,{{ sub['barcode'] | safe }}">{% endif %}
<p>{% for key, value in sub.items() if key not in excluded %}
<p>{% for key, value in sub.items() if key not in sub['excluded'] %}
&nbsp;&nbsp;&nbsp;&nbsp;<b>{{ key }}: </b>{% if key=='Cost' %}{% if sub['Cost'] %} {{ "${:,.2f}".format(value) }}{% endif %}{% else %}{{ value }}{% endif %}<br>
{% endfor %}</p>
<h3><u>Reagents:</u></h3>
@@ -111,5 +114,6 @@
<h3><u>Plate map:</u></h3>
<img height="300px" width="650px" src="data:image/jpeg;base64,{{ sub['export_map'] | safe }}">
{% endif %}
{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,38 @@
{% extends "basicsubmission_details.html" %}
<head>
{% block head %}
{{ super() }}
{% endblock %}
</head>
<body>
{% block body %}
{{ super() }}
{% if sub['gel_info'] %}
<br/>
<h3><u>Gel Box:</u></h3>
{% if sub['gel_image'] %}
<br/>
<img align='left' height="400px" width="600px" src="data:image/jpeg;base64,{{ sub['gel_image'] | safe }}">
{% endif %}
<br/>
<table style="width:100%; border: 1px solid black; border-collapse: collapse;">
<tr>
{% for header in sub['headers'] %}
<th>{{ header }}</th>
{% endfor %}
</tr>
{% for field in sub['gel_info'] %}
<tr>
<td>{{ field['name'] }}</td>
{% for item in field['values'] %}
<td>{{ item['value'] }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
<br/>
{% endif %}
{% endblock %}
</body>