Add clarifying text to pages.

Fixes #10
This commit is contained in:
Chris Giacofei 2024-06-17 10:25:53 -04:00
parent 61b5a860e1
commit d31d53ca9b
3 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h1>{{ batch.strain.name }}</h1> <h1>{{ batch.strain.manufacturer }}, {{ batch.strain.name }}</h1>
<b>Source:</b> {{ batch.get_source_display }} <b>Source:</b> {{ batch.get_source_display }}
{% if batch.source_batch %} {% if batch.source_batch %}
from <a href="{{ batch.beer_url }}" target="_blank" rel="noopener noreferrer">#{{ batch.beer_num }}: {{ batch.beer_name }}</a> from <a href="{{ batch.beer_url }}" target="_blank" rel="noopener noreferrer">#{{ batch.beer_num }}: {{ batch.beer_name }}</a>

View File

@ -25,7 +25,7 @@ input, label {
<div class="container m-2"> <div class="container m-2">
<label for="strain-select">Choose a strain:</label> <label for="strain-select">Choose a strain:</label>
<select name="strain" id="strain-select"> <select name="strain" id="strain-select">
<option value="">--Please choose an option--</option> <option value="{% for b in batches %}{{ b.id }},{% endfor %}">--All Available--</option>
{% for strain in strains %} {% for strain in strains %}
{% if strain.batches_available|length > 0 %} {% if strain.batches_available|length > 0 %}
<option value="{{ strain.batches_available|get_value_in_qs:strain }}">{{ strain }}</option> <option value="{{ strain.batches_available|get_value_in_qs:strain }}">{{ strain }}</option>
@ -39,9 +39,9 @@ input, label {
<div class="col-md-4"> <div class="col-md-4">
<label for="batch-select">Choose a propogation:</label> <label for="batch-select">Choose a propogation:</label>
<select name="batch" id="batch-select" size="10" style="min-width:100%;"> <select name="batch" id="batch-select" size="10" style="min-width:100%;">
{% for batch in batches %} {% for batch in batches|dictsort:"production_date"|dictsort:"strain.name" %}
{% if not batch.consumed %} {% if not batch.consumed %}
<option value="{{ batch.id }}">{{ batch.id }} {{ batch.production_date|date:"Y-m-d" }}</option> <option value="{{ batch.id }}">{{ batch.strain.name }} -- {{ batch.production_date|date:"Y-m-d" }}</option>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</select> </select>
@ -50,6 +50,7 @@ input, label {
{% for batch in batches %} {% for batch in batches %}
{% if not batch.consumed %} {% if not batch.consumed %}
<div id="data-{{ batch.id }}" style="display: none;" class="datatable"> <div id="data-{{ batch.id }}" style="display: none;" class="datatable">
<h3>{{ batch.strain.manufacturer }}, {{ batch.strain.name }}</h3>
<table class="table"> <table class="table">
<tbody> <tbody>
<tr> <tr>

View File

@ -14,7 +14,7 @@
{% block jumbotronsub %} {% block jumbotronsub %}
<table class="table table-borderless"> <table class="table table-borderless">
<tbody> <tbody>
<tr><th class="fit">{{ batch.strain.manufacturer.name }} {{ batch.strain.name }}</th><td><a href="{% url 'admin:yeast_yeast_change' sample.id %}">{{ sample.id }}</a></td></tr> <tr><th class="fit">{{ batch.strain.manufacturer.name }}, {{ batch.strain.name }}</th><td><a href="{% url 'admin:yeast_yeast_change' sample.id %}">Admin</a></td></tr>
<tr><th class="fit">Batch Source</th> <tr><th class="fit">Batch Source</th>
<td>{{ batch.get_source_display }} <td>{{ batch.get_source_display }}
{% if batch.source_batch %} {% if batch.source_batch %}