{% extends "page.html" %}

{% block subtitle %}{{ _('Tags') }}{% endblock %}

{% block breadcrumb_content %}
  <li class="active"><a href="">{{ _('Tags') }}</a></li>
{% endblock %}

{% block primary_content %}
  <article class="module">
    <div class="module-content">
      <h1 class="page-heading">{{ _('Tags') }}</h1>
      <ul class="unstyled">
        {% for tag in c.page.items %}
          <li>{{ h.link_to(tag.display_name, h.url_for(controller='package', action='search', tags=tag.name), class_='tag') }}</li>
        {% endfor %}
      </ul>
    </div>
    {{ c.page.pager(q=c.q) }}
  </article>
{% endblock %}

{% block secondary_content %}
  <section class="module module-narrow module-shallow simple-input">
    <form class="module-content field-bordered" action="{% url_for controller='tag', action='index' %}" method="get">
      <div class="field">
        <label for="field-tag-search">{{ _('Search') }}</label>
        <input id="field-tag-search" type="text" class="field" name="q" placeholder="{{ _('Search') }}" />
        <button class="btn-search" type="submit">{{ _('Search') }}</button>
      </div>
    </form>
  </section>
{% endblock %}
