fix: dynamic back button URL for product detail page

- Pass back_url from routes to template
- Letzshop products go back to /admin/marketplace/letzshop
- Marketplace products go back to /admin/marketplace-products

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-25 00:21:16 +01:00
parent 0e27c9029a
commit 87971c5853
2 changed files with 3 additions and 1 deletions

View File

@@ -731,6 +731,7 @@ async def admin_letzshop_product_detail_page(
"request": request,
"user": current_user,
"product_id": product_id,
"back_url": "/admin/marketplace/letzshop",
},
)
@@ -782,6 +783,7 @@ async def admin_marketplace_product_detail_page(
"request": request,
"user": current_user,
"product_id": product_id,
"back_url": "/admin/marketplace-products",
},
)

View File

@@ -9,7 +9,7 @@
{% block alpine_data %}adminMarketplaceProductDetail(){% endblock %}
{% block content %}
{% call detail_page_header("product?.title || 'Product Details'", '/admin/marketplace-products', subtitle_show='product') %}
{% call detail_page_header("product?.title || 'Product Details'", back_url, subtitle_show='product') %}
<span x-text="product?.marketplace || 'Unknown'"></span>
<span class="text-gray-400 mx-2">|</span>
<span x-text="'ID: ' + productId"></span>