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.
<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>
{% endif %}
<div class="divider"></div>
<ol class="group-list">
{% for group in groups %}
{# nest a list if it's a sub-group #}
{% if loop.previtem and group.path|length > loop.previtem.path|length %}<ol>{% endif %}
{# check in this order so logged-out users get the "subscribed" style #}
{% if request.user and not group.user_subscribed %}
{% 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>