brewery-website/templates/yeast/batch_list.html
2024-05-30 16:26:55 -04:00

40 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% load mathfilters %}
{% block title %}Sample Batches{% endblock %}
{% block content %}
<main role="main">
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Yeast Sample Batches</h1>
</div>
</div>
<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>
Test
<a href="{% url 'yeast:addbatch' %}">Add Batch</a>
<a href="{% url 'yeast:addstrain' %}">Add Yeast Strain</a>
</div> <!-- /container -->
</main>
{% endblock %}