aboutsummaryrefslogtreecommitdiff
path: root/templates/beerpage.jinja2
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-28 14:40:18 -0400
committerBen Burwell <ben@benburwell.com>2019-07-28 14:49:32 -0400
commit3705adfeeb7ec9bf25275eab214c134ae289b7cc (patch)
tree72d218c21e26d08738b28878c2b0126bcf009b79 /templates/beerpage.jinja2
parent40e89f4e43b6270e8d4717289e390303f805dfe5 (diff)
Add brewery_id, id to BeerInfo
Diffstat (limited to 'templates/beerpage.jinja2')
-rw-r--r--templates/beerpage.jinja242
1 files changed, 22 insertions, 20 deletions
diff --git a/templates/beerpage.jinja2 b/templates/beerpage.jinja2
index 0e96dec..f6e0b2e 100644
--- a/templates/beerpage.jinja2
+++ b/templates/beerpage.jinja2
@@ -18,30 +18,32 @@
</tr>
</table>
</div>
- <form action="" method="post" class="form-inline">
- <p>
- Show me beers which are
- <select name="direction" class="form-control">
- <option {% if direction == '3' %}selected{% endif %} value="3">Much more</option>
- <option {% if direction == '2' %}selected{% endif %} value="2">More</option>
- <option {% if direction == '1' %}selected{% endif %} value="1">Little more</option>
- <option {% if direction == '-1' %}selected{% endif %} value="-1">Little less</option>
- <option {% if direction == '-2' %}selected{% endif %} value="-2">Less</option>
- <option {% if direction == '-3' %}selected{% endif %} value="-3">Much less</option>
- </select>
- <select name="attr" class="form-control">
- {% for a in attrs %}
- <option {% if a == attr %}selected{% endif %} value="{{ a }}">{{ a }}</option>
- {% endfor %}
- </select>
- <input type="submit" value="Go" class="btn btn-outline-primary">
- </p>
+ <form action="" method="post" class="form-inline alert alert-secondary">
+ Show me beers which are
+ <select name="direction" class="form-control">
+ <option {% if direction == '3' %}selected{% endif %} value="3">Much more</option>
+ <option {% if direction == '2' %}selected{% endif %} value="2">More</option>
+ <option {% if direction == '1' %}selected{% endif %} value="1">Little more</option>
+ <option {% if direction == '-1' %}selected{% endif %} value="-1">Little less</option>
+ <option {% if direction == '-2' %}selected{% endif %} value="-2">Less</option>
+ <option {% if direction == '-3' %}selected{% endif %} value="-3">Much less</option>
+ </select>
+ <select name="attr" class="form-control">
+ {% for a in attrs %}
+ <option {% if a == attr %}selected{% endif %} value="{{ a }}">{{ a }}</option>
+ {% endfor %}
+ </select>
+ <input type="submit" value="Go" class="btn btn-outline-primary">
</form>
{% if direction and attr %}
<h5>Beers like {{ beer_data.name }} but {{ direction }} {{ attr }}</h5>
<ul>
- {% for similar_beer in similar_beers %}
- <li>{{ similar_beer }}</li>
+ {% for sb in similar_beers %}
+ <li>
+ <a href="{{ url_for('get_beer_details', brewery_id=sb.brewery_id, beer_id=sb.id) }}">
+ {{ sb.name }} ({{ sb.base_style }} by {{ sb.brewer }})
+ </a>
+ </li>
{% endfor %}
</ul>
{% endif %}