{% extends "webshop/base.html" %}
{% block section_title %}Category Overview{% endblock %}
{% block content %}
  {% if articles_list %}
    <table class="table">
      <tr class="table_header">
        <th scope="col">ID</th>
        <th scope="col">NAME</th>
        <th scope="col">CATHEGORY</th>
        <th scope="col">STOCK</th>
        <th scope="col">PRICE</th>
      </tr>
      {% for article in articles_list %}
        <tr class="table_content">
          <td scope="col">{{ article.id }}</td>
          <td scope="col">
            <a href="{% url 'details' article.id %}">
              {{ article.name }}
            </a></td>
          <td scope="col">{{ article.category }}</td>
          <td scope="col">{{ article.stock }}</td>
          <td scope="col">{{ article.price_in_chf }} {{ currency_name }}</td>
        </tr>
      {% endfor %}
    </table>
  {% else %}
    <p class="alert">
      We are sorry but there are currently no articles in this category.
    </p>
  {% endif %}
{% endblock %}
