2018-03-19 18:08:41 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2022-01-07 23:27:00 +00:00
|
|
|
{{ query_hint or _("Packages") }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block author_links %}
|
|
|
|
{% if authors %}
|
|
|
|
{% for author in authors %}
|
|
|
|
<a href="{{ url_for('packages.list_all', type=type, author=author[0], q=author[1]) }}">{{ author[0] }}</a>
|
|
|
|
{% if not loop.last %}
|
|
|
|
,
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2018-03-19 18:08:41 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-03-28 18:09:20 +00:00
|
|
|
{% if authors %}
|
|
|
|
<p class="alert alert-primary">
|
2022-01-07 23:27:00 +00:00
|
|
|
{{ _("Did you mean to search for packages by %(authors)s?", authors=self.author_links()) }}
|
2020-03-28 18:09:20 +00:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-07-12 20:19:00 +01:00
|
|
|
<aside class="mb-5">
|
2022-01-07 23:27:00 +00:00
|
|
|
<p class="text-muted">{{ _("Filter by tags") }}</p>
|
2020-07-12 20:19:00 +01:00
|
|
|
|
|
|
|
{% for pair in tags %}
|
|
|
|
{% set count = pair[0] %}
|
|
|
|
{% set tag = pair[1] %}
|
|
|
|
|
|
|
|
{% if tag in selected_tags %}
|
2020-07-18 02:48:22 +01:00
|
|
|
<a class="btn btn-sm btn-primary m-1" rel="nofollow"
|
2020-07-18 02:54:40 +01:00
|
|
|
title="{{ tag.description or '' }}"
|
2020-07-12 20:19:00 +01:00
|
|
|
href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
|
|
|
|
{{ tag.title }}
|
2020-07-18 02:48:22 +01:00
|
|
|
<span class="badge badge-pill badge-light ml-1">{{ count }}</span>
|
2020-07-12 20:19:00 +01:00
|
|
|
</a>
|
|
|
|
{% else %}
|
2020-07-18 02:48:22 +01:00
|
|
|
<a class="btn btn-sm btn-secondary m-1" rel="nofollow"
|
2020-07-18 02:54:40 +01:00
|
|
|
title="{{ tag.description or '' }}"
|
2020-07-12 20:19:00 +01:00
|
|
|
href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
|
|
|
|
{{ tag.title }}
|
2020-07-18 02:48:22 +01:00
|
|
|
<span class="badge badge-pill badge-light ml-1">{{ count }}</span>
|
2020-07-12 20:19:00 +01:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</aside>
|
2020-07-10 22:08:52 +01:00
|
|
|
|
2020-07-12 20:19:00 +01:00
|
|
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
|
|
|
{{ render_pkggrid(packages) }}
|
2018-08-25 18:20:45 +01:00
|
|
|
|
|
|
|
|
2020-07-12 20:19:00 +01:00
|
|
|
{% from "macros/pagination.html" import render_pagination %}
|
|
|
|
{{ render_pagination(pagination, url_set_query) }}
|
2020-07-12 20:10:19 +01:00
|
|
|
|
|
|
|
|
2020-07-12 20:19:00 +01:00
|
|
|
{% if topics %}
|
2022-01-07 23:27:00 +00:00
|
|
|
<h2 style="margin-top:2em;">{{ _("More content from the forums") }}</h2>
|
2020-07-12 20:10:19 +01:00
|
|
|
|
2020-07-12 20:19:00 +01:00
|
|
|
{% from "macros/topics.html" import render_topics %}
|
|
|
|
{{ render_topics(topics, current_user) }}
|
|
|
|
{% endif %}
|
2020-07-12 20:10:19 +01:00
|
|
|
|
2018-08-25 18:20:45 +01:00
|
|
|
|
2018-03-19 18:08:41 +00:00
|
|
|
{% endblock %}
|