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:
@@ -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",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user