brewery-website/yeast/templates/yeast/propogation_list.html
2024-06-07 13:51:15 -04:00

43 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% load mathfilters %}
{% block title %}Sample Batches{% endblock %}
{% block jumbotron %}Yeast Sample Batches{% endblock %}
{% block content %}
<div class="container">
<ul>
{% for batch in object_list %}
{% if batch.remaining_samples %}
<li><a href="{% url 'yeast:batch' batch.id %}">{{ batch }}</a></li>
<ul>
{% for sample in batch.yeast_set.all %}
{% if sample.pitched %}<strike>{% endif %}
<li><a href="{% url 'yeast:yeast' sample.id %}">Sample #{{ sample.id }}</a> Age: {{ sample.age }} days, Viability: {{ sample.viability|mul:100|floatformat:1 }}%</li>
{% if sample.pitched %}</strike>{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
<p><p>
<ul>
{% for batch in object_list %}
{% if not batch.remaining_samples %}
<li><a href="{% url 'yeast:batch' batch.id %}">{{ batch }}</a></li>
<ul>
{% for sample in batch.yeast_set.all %}
{% if sample.pitched %}<strike>{% endif %}
<li><a href="{% url 'yeast:yeast' sample.id %}">Sample #{{ sample.id }}</a> Age: {{ sample.age }} days, Viability: {{ sample.viability|mul:100|floatformat:1 }}%</li>
{% if sample.pitched %}</strike>{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
<p><p>
<a href="{% url 'yeast:addbatch' %}">Add Batch</a><br>
<a href="{% url 'yeast:addstrain' %}">Add Yeast Strain</a>
</div> <!-- /container -->
{% endblock %}