Various bug fixes.
This commit is contained in:
@@ -42,11 +42,11 @@
|
||||
{% block body %}
|
||||
<h2><u>Sample Details for {{ sample['Submitter ID'] }}</u></h2>
|
||||
<p>{% for key, value in sample.items() if key not in sample['excluded'] %}
|
||||
<b>{{ key }}: </b>{{ value }}<br>
|
||||
<b>{{ key | replace("_", " ") | title }}: </b>{{ value }}<br>
|
||||
{% endfor %}</p>
|
||||
{% if sample['submissions'] %}<h2>Submissions:</h2>
|
||||
{% for submission in sample['submissions'] %}
|
||||
<p id="{{ submission['Plate Name'] }}"><b>{{ submission['Plate Name'] }}:</b> {{ submission['Well'] }}</p>
|
||||
<p id="{{ submission['plate_name'] }}"><b>{{ submission['plate_name'] }}:</b> {{ submission['well'] }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -57,8 +57,8 @@
|
||||
backend = channel.objects.backend;
|
||||
});
|
||||
{% for submission in sample['submissions'] %}
|
||||
document.getElementById("{{ submission['Plate Name'] }}").addEventListener("dblclick", function(){
|
||||
backend.submission_details("{{ submission['Plate Name'] }}");
|
||||
document.getElementById("{{ submission['plate_name'] }}").addEventListener("dblclick", function(){
|
||||
backend.submission_details("{{ submission['plate_name'] }}");
|
||||
});
|
||||
{% endfor %}
|
||||
</script>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<!-- {% 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> {% 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 sub['excluded'] %}
|
||||
<b>{{ key }}: </b>{% if key=='Cost' %}{% if sub['Cost'] %} {{ "${:,.2f}".format(value) }}{% endif %}{% else %}{{ value }}{% endif %}<br>
|
||||
<b>{{ key | replace("_", " ") | title | replace("Pcr", "PCR") }}: </b>{% if key=='Cost' %}{% if sub['cost'] %} {{ "${:,.2f}".format(value) }}{% endif %}{% else %}{{ value }}{% endif %}<br>
|
||||
{% endfor %}</p>
|
||||
<h3><u>Reagents:</u></h3>
|
||||
<p>{% for item in sub['reagents'] %}
|
||||
@@ -58,7 +58,7 @@
|
||||
{% if sub['samples'] %}
|
||||
<h3><u>Samples:</u></h3>
|
||||
<p>{% for item in sub['samples'] %}
|
||||
<b>{{ item['Well'] }}:</b> {% if item['Organism'] %} {{ item['Name'] }} - ({{ item['Organism']|replace('\n\t', '<br> ') }}){% else %} {{ item['Name']|replace('\n\t', '<br> ') }}{% endif %}<br>
|
||||
<b>{{ item['well'] }}:</b> {% if item['organism'] %} {{ item['name'] }} - ({{ item['organism']|replace('\n\t', '<br> ') }}){% else %} {{ item['name']|replace('\n\t', '<br> ') }}{% endif %}<br>
|
||||
{% endfor %}</p>
|
||||
{% endif %}
|
||||
{% if sub['controls'] %}
|
||||
@@ -129,12 +129,12 @@
|
||||
backend = channel.objects.backend;
|
||||
});
|
||||
{% for sample in sub['samples'] %}
|
||||
document.getElementById("{{sample['Submitter ID']}}").addEventListener("dblclick", function(){
|
||||
backend.sample_details("{{ sample['Submitter ID'] }}");
|
||||
document.getElementById("{{ sample['submitter_id'] }}").addEventListener("dblclick", function(){
|
||||
backend.sample_details("{{ sample['submitter_id'] }}");
|
||||
});
|
||||
{% endfor %}
|
||||
document.getElementById("sign_btn").addEventListener("click", function(){
|
||||
backend.sign_off("{{ sub['Plate Number'] }}");
|
||||
backend.sign_off("{{ sub['plate_number'] }}");
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<div class="gallery" style="display: grid;grid-template-columns: repeat({{ PLATE_COLUMNS }}, 7.5vw);grid-template-rows: repeat({{ PLATE_ROWS }}, 7.5vw);grid-gap: 2px;">
|
||||
{% for sample in samples %}
|
||||
<div class="well" id="{{sample['Submitter ID']}}" style="background-color: {{sample['background_color']}};
|
||||
<div class="well" id="{{sample['submitter_id']}}" style="background-color: {{sample['background_color']}};
|
||||
border: 1px solid #000;
|
||||
padding: 20px;
|
||||
grid-column-start: {{sample['Column']}};
|
||||
grid-column-end: {{sample['Column']}};
|
||||
grid-row-start: {{sample['Row']}};
|
||||
grid-row-end: {{sample['Row']}};
|
||||
grid-column-start: {{sample['column']}};
|
||||
grid-column-end: {{sample['column']}};
|
||||
grid-row-start: {{sample['row']}};
|
||||
grid-row-end: {{sample['row']}};
|
||||
display: flex;
|
||||
">
|
||||
<div class="tooltip" style="font-size: 0.5em; text-align: center; word-wrap: break-word;">{{ sample['Name'] }}
|
||||
<div class="tooltip" style="font-size: 0.5em; text-align: center; word-wrap: break-word;">{{ sample['name'] }}
|
||||
<span class="tooltiptext">{{ sample['tooltip'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Sample name: {{ fields['Submitter ID'] }}<br>
|
||||
{% if fields['Organism'] %}Organism: {{ fields['Organism'] }}<br>{% endif %}
|
||||
{% if fields['Concentration'] %}Concentration: {{ fields['Concentration'] }}<br>{% endif %}
|
||||
Well: {{ fields['Well'] }}<!--{{ fields['column'] }}-->
|
||||
Sample name: {{ fields['submitter_id'] }}<br>
|
||||
{% if fields['organism'] %}Organism: {{ fields['organism'] }}<br>{% endif %}
|
||||
{% if fields['concentration'] %}Concentration: {{ fields['concentration'] }}<br>{% endif %}
|
||||
Well: {{ fields['well'] }}<!--{{ fields['column'] }}-->
|
||||
Reference in New Issue
Block a user