feat: show markets in post nav bar and admin panel
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s

- Post context processor loads MarketPlace rows for the page
- Nav bar displays market links (shopping-bag icon) alongside calendars
- Admin panel includes markets CRUD when market feature is enabled
- Updated shared_lib submodule with nav_entries template change

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 18:37:06 +00:00
parent 24d3860952
commit 3376e4e990
4 changed files with 17 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ from quart import (
from .services.post_data import post_data
from .services.post_operations import toggle_post_like
from models.calendars import Calendar
from models.market_place import MarketPlace
from sqlalchemy import select
from suma_browser.app.redis_cacher import cache_page, clear_cache
@@ -74,6 +75,14 @@ def register():
)
).scalars().all()
markets = (
await g.s.execute(
select(MarketPlace)
.where(MarketPlace.post_id == db_post_id, MarketPlace.deleted_at.is_(None))
.order_by(MarketPlace.name.asc())
)
).scalars().all()
# Fetch associated entries for nav display
associated_entries = await get_associated_entries(g.s, db_post_id)
@@ -81,6 +90,7 @@ def register():
**p_data,
"base_title": f"{config()['title']} {p_data['post']['title']}",
"calendars": calendars,
"markets": markets,
"associated_entries": associated_entries,
}
else: