Skip to content

Commit

Permalink
Don't show other tag if it's empty
Browse files Browse the repository at this point in the history
Closes #271.
  • Loading branch information
ppannuto committed Jun 24, 2016
1 parent d10d8e1 commit ab9b190
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chezbetty/templates/terminal/terminal.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@
{% for tag in tags_with_nobarcode_items %}
<button type="button" class="btn btn-nobarcode-tag btn-default" data-tagid="{{ tag.id }}">{{ tag.name }}</button>
{% endfor %}
{% if nobarcode_notag_items %}
<button type="button" class="btn btn-nobarcode-tag btn-default" data-tagid="other">Other</button>
{% endif %}

<div>
<button type="button" id="btn-nobarcode-tags-back" class="btn btn-warning btn-back">Back</button>
Expand Down
1 change: 1 addition & 0 deletions chezbetty/views_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def terminal(request):
'purchase_pools': purchase_pools,
'purchase_fee_percent': purchase_fee_percent,
'tags_with_nobarcode_items': tags_with_nobarcode_items,
'nobarcode_notag_items': Item.get_nobarcode_notag_items(),
'existing_items': cart_html,
'deposit': deposit}

Expand Down

0 comments on commit ab9b190

Please sign in to comment.