<table class="table table-striped element-list">
    <thead>
        <tr>
            <th>Element</th>
            <th>Quantity</th>
            {% if purity %}
                <th>Purity</th>
            {% endif %}
            {% if error %}
                <th>Error</th>
            {% endif %}
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        {% if data|length > 0 %}
            {% for item in data %}
                <tr>
                    <td class="name">{{ item.name }}</td>
                    <td class="qty">
                        <input type="text" value="{{ item.quantity }}" />
                    </td>
                    {% if purity %}
                        <td class="pur">
                            <input type="text" value="{{ item.purity }}" />
                        </td>
                    {% endif %}
                    {% if error %}
                        <td class="err">
                            <input type="text" value="{{ item.error }}" />
                        </td>
                    {% endif %}
                    <td><span href="#" class="remove-element btn btn-default">Remove</span></td>
                </tr>
            {% endfor %}
        {% else %}
            <tr class="empty">
                <td colspan="5">
                    No selected element. Please use the periodic table above.
                </td>
            </tr>
        {% endif %}
    </tbody>
    <tfoot>
        <tr class="sample-row">
            <td class="name"></td>
            <td class="qty">
                <input type="text" />
            </td>
            {% if purity %}
                <td class="pur">
                    <input type="text" />
                </td>
            {% endif %}
            {% if error %}
                <td class="err">
                    <input type="text" />
                </td>
            {% endif %}
            <td><span href="#" class="remove-element btn btn-default">Remove</span></td>
        </tr>
    </tfoot>
</table>