Spaces:
Sleeping
Sleeping
Download templates/admin/orders.html from Swapnilbpatil/website: direct link, hf CLI and curl.
- Browser
- Download file 2.25 kB
-
https://huggingface.co/spaces/Swapnilbpatil/website/resolve/main/templates/admin/orders.html
- Command line
-
hf download hf://spaces/Swapnilbpatil/website/templates/admin/orders.html
-
curl -L -o orders.html https://huggingface.co/spaces/Swapnilbpatil/website/resolve/main/templates/admin/orders.html
2.25 kB
| <!-- templates/admin/orders.html --> | |
| {% extends 'admin/layout.html' %} | |
| {% block content %} | |
| <div class="bg-white rounded-2xl shadow-lg p-8 mb-32 max-w-7xl mx-auto"> | |
| <h1 class="text-4xl font-bold text-[var(--main-green)] mb-8">Order Management</h1> | |
| <div class="overflow-x-auto rounded-xl border border-gray-200"> | |
| <table class="min-w-full bg-white text-sm"> | |
| <thead class="bg-[var(--main-green)] text-white uppercase text-left"> | |
| <tr> | |
| <th class="py-3 px-4">Order ID</th> | |
| <th class="py-3 px-4">Date</th> | |
| <th class="py-3 px-4">Customer</th> | |
| <th class="py-3 px-4">Product</th> | |
| <th class="py-3 px-4">Quantity</th> | |
| <th class="py-3 px-4">Total</th> | |
| <th class="py-3 px-4">Payment</th> | |
| <th class="py-3 px-4">Contact</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {% for order in orders %} | |
| <tr class="border-b hover:bg-gray-50 transition"> | |
| <td class="py-3 px-4 font-medium">{{ order.id }}</td> | |
| <td class="py-3 px-4">{{ order.order_date.strftime('%Y-%m-%d %H:%M') }}</td> | |
| <td class="py-3 px-4"> | |
| <div class="font-semibold">{{ order.customer_name }}</div> | |
| <div class="text-gray-500 text-xs">{{ order.address }}</div> | |
| </td> | |
| <td class="py-3 px-4"> | |
| <div class="font-semibold">{{ order.product_name }}</div> | |
| <div class="text-gray-500 text-xs">{{ order.category|capitalize }}</div> | |
| </td> | |
| <td class="py-3 px-4">{{ order.quantity }}</td> | |
| <td class="py-3 px-4 text-green-700 font-semibold">₹{{ "%.2f"|format(order.price * order.quantity) }}</td> | |
| <td class="py-3 px-4">{{ order.payment_method }}</td> | |
| <td class="py-3 px-4">{{ order.mobile }}</td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| {% endblock %} | |