mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 16:09:44 +00:00
Add sort to fermentables
This commit is contained in:
parent
c128d78f5f
commit
304f4c6d7e
2 changed files with 2 additions and 2 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue