{# htmx partial: paginated companies table #} {% macro sort_link(col, label) %} {% set new_dir = 'asc' if sort_by == col and sort_dir == 'desc' else 'desc' %} {% if sort_by == col %} {% set arrow = ' ▲' if sort_dir == 'asc' else ' ▼' %} {% set active = ' sort-active' %} {% else %} {% set arrow = ' ↕' %} {% set active = '' %} {% endif %} {{ label }}{{ arrow }} {% endmacro %}
{{ total }} companies found — page {{ page }} of {{ pages }}
{% for c in companies %} {% else %} {% endfor %}
{{ sort_link('company', 'Company') }} {{ sort_link('tier', 'Tier') }} {{ sort_link('icp_count', 'ICP Contacts') }} {{ sort_link('total_interactions', 'Total Interactions') }} {{ sort_link('last_30d', has_date_filter and 'In Period' or 'Last 30d') }} {{ sort_link('first_seen', 'First Seen') }} {{ sort_link('last_active', 'Last Active') }}
{{ c.company }} {% if c.tier %} {% set tier_css = 'tier' + c.tier|lower|replace(' ', '') %} {{ tier_labels.get(c.tier, c.tier) }} {% else %} — {% endif %} {{ c.icp_count }} {{ c.total_interactions }} {{ c.last_30d }} {{ c.first_seen or "—" }} {{ c.last_active or "—" }}
No companies found.
{# ── Pagination ── #} {% if pages > 1 %}
{% if page > 1 %} « Prev {% endif %} {% for p in range(1, pages + 1) %} {% if p == page %} {{ p }} {% elif p <= 3 or p > pages - 3 or (p >= page - 2 and p <= page + 2) %} {{ p }} {% elif p == 4 or p == pages - 3 %} {% endif %} {% endfor %} {% if page < pages %} Next » {% endif %}
{% endif %}