{% extends 'layouts/master-page' %}
{% block title %}Vendor browsing{% endblock %}
{% block content %}
  <!-- breadcrumb -->
  <ol class="breadcrumb">
    {% if product != None%}
      <li> <a href="/browse">Vendors</a></li>
      <li class="active">{{vendor|htmlDecode}}</li>
    {% elif product == None %}
      <li class="active"> Vendors</li>
    {% endif %}
  </ol>
  <!-- browse -->
  <table class="table table-hover table-striped">
    <tbody>
      <tr>
        {% if product != None %}
          <td class="warning">Products for {{ vendor|htmlDecode }}</td>
        {% elif product == None %}
          <td class="warning">Vendors</td>
        {% endif %}
      </tr>
      {% if product != None %}
        {% for p in product %}
          <tr>
            <td><a href="/search/{{ vendor }}/{{ p|htmlEncode }}">{{ p|htmlDecode }}</a></td>
          </tr>
        {% endfor %}
      {% else  %}
        {% for v in vendor %}
          <tr>
            <td><a href="/browse/{{ v }}">{{ v|htmlDecode }}</a></td>
          </tr>
        {% endfor %}
      {% endif %}
    </tbody>
  </table>
{% endblock %}
