{% extends "base.html" %} {% from "components/pagination.html" import render_pagination %} {% from "components/empty_state.html" import empty_state %} {% block title %}Listing Management ยท Admin{% endblock %} {% macro card(label, value, icon, color) %}
{{ value }}
{{ label }}
{% endmacro %} {% block content %}

Listing Management

Monitor and manage every marketplace listing.

Analytics
{# ---------- Summary ---------- #} {% set s = summary %}
{{ card('Total', "{:,}".format(s.total_listings), 'bi-box-seam-fill', 'primary') }} {{ card('Active', "{:,}".format(s.active_listings), 'bi-bag-check-fill', 'success') }} {{ card('Reserved', "{:,}".format(s.reserved_listings), 'bi-bookmark-check-fill', 'warning') }} {{ card('Sold', "{:,}".format(s.sold_listings), 'bi-cart-check-fill', 'secondary') }} {{ card('Featured', "{:,}".format(s.featured_listings), 'bi-stars', 'warning') }} {{ card('Deleted', "{:,}".format(s.deleted_listings), 'bi-trash3-fill', 'danger') }} {{ card('Avg Views', s.avg_views, 'bi-eye-fill', 'info') }} {{ card('Avg Favorites', s.avg_favorites, 'bi-heart-fill', 'danger') }}
{% if seller %}
Showing listings for a single seller. Clear seller filter
{% endif %} {# ---------- Filters (sticky) ---------- #}
{% if seller %}{% endif %}
{# ---------- Table + bulk toolbar ---------- #}
0 selected
{% for r in rows %} {% set detail_url = url_for('admin.listing_detail', public_id=r.public_id) %} {% else %} {% endfor %}
ListingSellerCategory PriceCondition ViewsFavsOffers StatusCreatedActions
{% if r.thumbnail %} {% else %}{% endif %}
{{ r.title }} {% if r.is_featured %} Featured{% endif %} {% if r.is_reported %} Reported{% endif %}
{{ r.seller_name }}{% if r.seller_is_premium %} {% endif %} {{ r.seller_email }}
{{ r.category }} ₹{{ "{:,.0f}".format(r.price) }} {{ r.condition }} {{ "{:,}".format(r.views) }} {{ "{:,}".format(r.favorites) }} {{ "{:,}".format(r.offers) }} {{ r.status|title }} {{ r.created.strftime('%d %b %Y') }} Manage
{{ empty_state('bi-box-seam', 'No listings found.', 'No listings match the current search and filters.', reset_label='Reset filters', reset_url=url_for('admin.listings'), compact=true) }}
{{ render_pagination(pagination, 'admin.listings', filter_args) }}
{% endblock %}