This replaces the groups page with a new list style that doesn't include
the ability to subscribe/unsubscribe directly on the page, and also
shows approximate activity statistics (daily topics/comments) for each
group.
{% from 'macros/groups.jinja2' import render_group_subscription_box with context %}
{% from 'macros/groups.jinja2' import render_group_subscription_box with context %}
{% from 'macros/links.jinja2' import link_to_group with context %}
{% from 'macros/links.jinja2' import link_to_group with context %}
{% from 'macros/utils.jinja2' import pluralize %}
{% block title %}Browse groups{% endblock %}
{% block title %}Browse groups{% endblock %}
@ -13,25 +14,49 @@
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
<table class="table group-list">
<thead>
<tr>
<th>Group</th>
<th class="text-center">Subscribe</th>
</tr>
</thead>
<tbody>
{% if request.user %}
<small>Group name colors: <span class="text-link">subscribed</span> / <span class="text-warning">not subscribed</span>. You can change your subscription status to a group in its sidebar when you are viewing it directly.</small>
{% if loop.nextitem and group.path|length > loop.nextitem.path|length %}
</ol>
{% elif not loop.nextitem %}
{% for _ in range(group.path|length - 1) %}
</ol>
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
</ol>
<div class="divider"></div>
<small class="text-secondary">Activity numbers are based on posts in the group over the last week, and only update once per day, shortly after 00:00 UTC.</small>