{% load kirppu_tags %}

{% if tag_type == "list" %}
    <div class="item_container item_list">
{% elif tag_type == "long" %}
    <div class="item_container">
{% elif tag_type == "template" %}
    <div class="item_container item_template">
{% elif tag_type == "tiny" %}
    <div class="item_container item_tiny">
{% else %}
    <div class="item_container item_short">
{% endif %}

        <div class="item_head">
            <span class="item_head_price">{{ price }}</span>
        </div>
        <div class="item_body">
            <div class="item_name">{{ name }}</div>
            <div class="item_price">{{ price }}</div>
            <div class="barcode_container">
                <img class="barcode_img" src="{% barcode_dataurl code bar_type %}" alt="Barcode: {{ code }}" />
                <div class="item_extra_code">{{ code }}</div>
            </div>

            <div class="item_vendor_id">{{ vendor_id }}</div>
        </div>

        <button class="item_button_delete" type="button">&times;</button>
        <button class="item_button_toggle" type="button">&lt;&gt;</button>
    </div>

{% load kirppu_tags %}

    <div class="item_container item_{{ tag_type }}" id="{{ code }}">
        <div class="item_head">
            <span class="item_head_price">{{ price }}</span>
        </div>
        <div class="item_body">
            <div class="item_name">{{ name }}</div>
            <div class="item_price">{{ price }}</div>
            <div class="barcode_container">
                <img class="barcode_img" src="{% barcode_dataurl code bar_type %}" alt="Barcode: {{ code }}" />
                <div class="item_extra_code">{{ code }}</div>
            </div>

            <div class="item_vendor_id">{{ vendor_id }}</div>
        </div>

        <button class="item_button_delete" type="button">&times;</button>
        <button class="item_button_toggle" type="button">&lt;&gt;</button>
    </div>

Set barcode as items id.
Set barcode as items id.

- Helps with debugging and should be useful in other ways too.
