1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 15:09:42 +00:00

Add sort to fermentables

This commit is contained in:
Emma 2019-07-11 11:59:55 -06:00
parent c128d78f5f
commit 304f4c6d7e
No known key found for this signature in database
GPG key ID: 68434BFE85360755
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ function getSpecsURL() {
-#}
<div class="row"><div class="col"><h3>Fermentables</h3></div></div>
<div id="ferms" data-length="{{ form.fermentables|length }}">
{% for fermentable in form.fermentables %}
{% for fermentable in form.fermentables|sort(attribute='amount.data', reverse=True) %}
<div class="border pl-2 pr-2 pt-1 pb-1 ferm-form" data-index="{{ loop.index0 }}">
<div class="row">
<div class="col">

View file

@ -124,7 +124,7 @@
<th>Color</th>
</tr>
</thead>
{%- for fermentable in recipe.fermentables -%}
{%- for fermentable in recipe.fermentables|sort(attribute='amount', reverse=True) -%}
<tr>
<td>{{ fermentable.name }}</td>
<td>{{ fermentable.amount|float|round(2) }} lb.</td>