{% extends "base.html" %} {% from "components/pagination.html" import render_pagination %} {% from "components/empty_state.html" import empty_state %} {% block title %}Activity · CampusCart{% endblock %} {% block content %}
{# ---------- Header (matches shared page-title styling) ---------- #}

Activity

Stay updated with everything happening on your account.

{# ---------- Filters + search ---------- #}
{% for value, label, icon in categories %} {{ label }} {% endfor %} Unread{% if unread_count %} ({{ unread_count }}){% endif %}
{# ---------- Timeline (grouped by date) ---------- #} {% if items %}
{% for label, section_items in sections %}

{{ label }}

{% for item in section_items %}
{{ item.title }}{% if item.count and item.count > 1 %} ×{{ item.count }}{% endif %} {% if not item.is_read %}NEW{% endif %} {% if item.status_label %}{{ item.status_label }}{% endif %}
{% if item.message %}

{{ item.message }}

{% endif %}
{% if item.action_url %} {% endif %} {% if item.id and not item.is_read %}
{% endif %}
{% endfor %}
{% endfor %}
{# Client-side search "no matches" notice (JS toggles it) #}
{{ render_pagination(pagination, 'activity.index', {'unread': '1' if unread_only else none, 'category': category if category != 'all' else none}) }}
{% else %} {{ empty_state('bi-bell', ('No unread activity' if unread_only else 'No activity yet'), "You'll see messages, offers, listing updates and important notifications here.", cta_label='Browse Marketplace', cta_url=url_for('main.marketplace'), cta_icon='bi-shop') }} {% endif %}
{% endblock %}