aboutsummaryrefslogtreecommitdiff
path: root/app/templates/packages/list.html
blob: 057fe22a4d69f67a9f41709480677f21ad986bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% extends "base.html" %}

{% block title %}
{{ title }}
{% endblock %}

{% block content %}
	{% if authors %}
		<p class="alert alert-primary">
			Did you mean to search for packages by

			{% 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 %}
			?
		</p>
	{% endif %}


	{% from "macros/packagegridtile.html" import render_pkggrid %}
	{{ render_pkggrid(packages) }}

	<ul class="pagination mt-4">
		<li class="page-item {% if not prev_url %}disabled{% endif %}">
			<a class="page-link" {% if prev_url %}href="{{ prev_url }}"{% endif %}>&laquo;</a>
		</li>
		{% for n in range(1, page_max+1) %}
			<li class="page-item {% if n == page %}active{% endif %}">
				<a class="page-link"
						href="{{ url_for('packages.list_all', type=type, q=query, page=n) }}">
					{{ n }}
				</a>
			</li>
		{% endfor %}
		<li class="page-item {% if not next_url %}disabled{% endif %}">
			<a class="page-link" {% if next_url %}href="{{ next_url }}"{% endif %}>&raquo;</a>
		</li>
	</ul>

	{% if topics %}
		<h2 style="margin-top:2em;">More content from the forums</h2>

		{% from "macros/topics.html" import render_topics %}
		{{ render_topics(topics, current_user) }}
	{% endif %}

{% endblock %}