diff --git a/templates/_types/cart/_main_panel.html b/templates/_types/cart/_main_panel.html deleted file mode 100644 index 3872387..0000000 --- a/templates/_types/cart/_main_panel.html +++ /dev/null @@ -1,4 +0,0 @@ -
- {% from '_types/cart/_cart.html' import show_cart with context %} - {{ show_cart() }} -
\ No newline at end of file diff --git a/templates/_types/cart/_mini.html b/templates/_types/cart/_mini.html deleted file mode 100644 index aa64d36..0000000 --- a/templates/_types/cart/_mini.html +++ /dev/null @@ -1,42 +0,0 @@ -{% macro mini(oob=False) %} -
- {# cart_count is set by the context processor in all apps. - Cart app computes it from g.cart + calendar_cart_entries; - other apps get it from the cart internal API. #} - {% if cart_count is defined and cart_count is not none %} - {% set _count = cart_count %} - {% elif cart is defined and cart is not none %} - {% set _count = (cart | sum(attribute="quantity")) + ((calendar_cart_entries | length) if calendar_cart_entries else 0) %} - {% else %} - {% set _count = 0 %} - {% endif %} - - {% if _count == 0 %} -
- - - -
- {% else %} - - - - - - {{ _count }} - - - {% endif %} -
-{% endmacro %} diff --git a/templates/_types/cart/_nav.html b/templates/_types/cart/_nav.html deleted file mode 100644 index f5c504d..0000000 --- a/templates/_types/cart/_nav.html +++ /dev/null @@ -1,2 +0,0 @@ -{% from 'macros/admin_nav.html' import placeholder_nav %} -{{ placeholder_nav() }} diff --git a/templates/_types/cart/_oob_elements.html b/templates/_types/cart/_oob_elements.html deleted file mode 100644 index 6e54a8b..0000000 --- a/templates/_types/cart/_oob_elements.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends 'oob_elements.html' %} - -{# OOB elements for HTMX navigation - all elements that need updating #} - -{% from '_types/root/_oob_menu.html' import mobile_menu with context %} - -{# Header with app title - includes cart-mini, navigation, and market-specific header #} - -{% block oobs %} - - {% from '_types/root/_n/macros.html' import oob_header with context %} - {{oob_header('root-header-child', 'cart-header-child', '_types/cart/header/_header.html')}} - - {% from '_types/root/header/_header.html' import header_row with context %} - {{ header_row(oob=True) }} -{% endblock %} - - -{% block mobile_menu %} - {% include '_types/cart/_nav.html' %} -{% endblock %} - - -{% block content %} - {% include "_types/cart/_main_panel.html" %} -{% endblock %} - - diff --git a/templates/_types/cart/checkout_error.html b/templates/_types/cart/checkout_error.html deleted file mode 100644 index a15b1e9..0000000 --- a/templates/_types/cart/checkout_error.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends '_types/root/index.html' %} - -{% block filter %} -
-

- Checkout error -

-

- We tried to start your payment with SumUp but hit a problem. -

-
-{% endblock %} - -{% block content %} -
-
-

Something went wrong.

-

- {{ error or "Unexpected error while creating the hosted checkout session." }} -

- {% if order %} -

- Order ID: #{{ order.id }} -

- {% endif %} -
- -
- - - Back to cart - -
-
-{% endblock %} diff --git a/templates/_types/cart/checkout_return.html b/templates/_types/cart/checkout_return.html deleted file mode 100644 index 326a469..0000000 --- a/templates/_types/cart/checkout_return.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends '_types/root/index.html' %} - -{% block filter %} -
-
-

- {% if order.status == 'paid' %} - Payment received - {% elif order.status == 'failed' %} - Payment failed - {% elif order.status == 'missing' %} - Order not found - {% else %} - Payment status: {{ order.status|default('pending')|capitalize }} - {% endif %} -

-

- {% if order.status == 'paid' %} - Thanks for your order. - {% elif order.status == 'failed' %} - Something went wrong while processing your payment. You can try again below. - {% elif order.status == 'missing' %} - We couldn't find that order – it may have expired or never been created. - {% else %} - We’re still waiting for a final confirmation from SumUp. - {% endif %} -

-
- -
-{% endblock %} - -{% block aside %} - {# no aside content for now #} -{% endblock %} - -{% block content %} -
- {% if order %} -
- {% include '_types/order/_summary.html' %} -
- {% else %} -
- We couldn’t find that order. If you reached this page from an old link, please start a new order. -
- {% endif %} - {% include '_types/order/_items.html' %} - {% include '_types/order/_calendar_items.html' %} - - - {% if order.status == 'failed' and order %} -
-

Your payment was not completed.

-

- You can go back to your cart and try checkout again. If the problem persists, - please contact us and mention order #{{ order.id }}. -

-
- {% elif order.status == 'paid' %} -
-

All done!

-

We’ll start processing your order shortly.

-
- {% endif %} - -
-{% endblock %} diff --git a/templates/_types/cart/header/_header.html b/templates/_types/cart/header/_header.html deleted file mode 100644 index b5d913d..0000000 --- a/templates/_types/cart/header/_header.html +++ /dev/null @@ -1,12 +0,0 @@ -{% import 'macros/links.html' as links %} -{% macro header_row(oob=False) %} - {% call links.menu_row(id='cart-row', oob=oob) %} - {% call links.link(cart_url('/'), hx_select_search ) %} - -

cart

- {% endcall %} - {% call links.desktop_nav() %} - {% include '_types/cart/_nav.html' %} - {% endcall %} - {% endcall %} -{% endmacro %} \ No newline at end of file diff --git a/templates/_types/cart/index.html b/templates/_types/cart/index.html deleted file mode 100644 index 78570d9..0000000 --- a/templates/_types/cart/index.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends '_types/root/_index.html' %} - -{% block root_header_child %} - {% from '_types/root/_n/macros.html' import index_row with context %} - {% call index_row('cart-header-child', '_types/cart/header/_header.html') %} - {% block cart_header_child %} - {% endblock %} - {% endcall %} -{% endblock %} - - -{% block _main_mobile_menu %} -{% include '_types/cart/_nav.html' %} -{% endblock %} - - -{% block aside %} -{% endblock %} - -{% block content %} - {% include '_types/cart/_main_panel.html' %} -{% endblock %} diff --git a/templates/_types/order/_calendar_items.html b/templates/_types/order/_calendar_items.html deleted file mode 100644 index 019f048..0000000 --- a/templates/_types/order/_calendar_items.html +++ /dev/null @@ -1,43 +0,0 @@ -{# --- NEW: calendar bookings in this order --- #} - {% if order and calendar_entries %} -
-

- Calendar bookings in this order -

- - -
- {% endif %} \ No newline at end of file diff --git a/templates/_types/order/_items.html b/templates/_types/order/_items.html deleted file mode 100644 index 27b2a9f..0000000 --- a/templates/_types/order/_items.html +++ /dev/null @@ -1,51 +0,0 @@ -{# Items list #} -{% if order and order.items %} -
-

- Items -

- -
-{% endif %} \ No newline at end of file diff --git a/templates/_types/order/_main_panel.html b/templates/_types/order/_main_panel.html deleted file mode 100644 index 679b846..0000000 --- a/templates/_types/order/_main_panel.html +++ /dev/null @@ -1,7 +0,0 @@ -
- {# Order summary card #} - {% include '_types/order/_summary.html' %} - {% include '_types/order/_items.html' %} - {% include '_types/order/_calendar_items.html' %} - -
\ No newline at end of file diff --git a/templates/_types/order/_nav.html b/templates/_types/order/_nav.html deleted file mode 100644 index f5c504d..0000000 --- a/templates/_types/order/_nav.html +++ /dev/null @@ -1,2 +0,0 @@ -{% from 'macros/admin_nav.html' import placeholder_nav %} -{{ placeholder_nav() }} diff --git a/templates/_types/order/_oob_elements.html b/templates/_types/order/_oob_elements.html deleted file mode 100644 index 31d1e17..0000000 --- a/templates/_types/order/_oob_elements.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends 'oob_elements.html' %} - -{# OOB elements for HTMX navigation - all elements that need updating #} - -{# Import shared OOB macros #} -{% from '_types/root/header/_oob.html' import root_header_start, root_header_end with context %} -{% from '_types/root/_oob_menu.html' import mobile_menu with context %} - -{# Header with app title - includes cart-mini, navigation, and market-specific header #} - -{% block oobs %} - - {% from '_types/root/_n/macros.html' import oob_header with context %} - {{oob_header('orders-header-child', 'order-header-child', '_types/order/header/_header.html')}} - - {% from '_types/order/header/_header.html' import header_row with context %} - {{ header_row(oob=True) }} -{% endblock %} - - -{% block mobile_menu %} - {% include '_types/order/_nav.html' %} -{% endblock %} - - -{% block content %} - {% include "_types/order/_main_panel.html" %} -{% endblock %} - - diff --git a/templates/_types/order/_summary.html b/templates/_types/order/_summary.html deleted file mode 100644 index ffe560b..0000000 --- a/templates/_types/order/_summary.html +++ /dev/null @@ -1,52 +0,0 @@ -
-

- Order ID: - #{{ order.id }} -

- -

- Created: - {% if order.created_at %} - {{ order.created_at.strftime('%-d %b %Y, %H:%M') }} - {% else %} - — - {% endif %} -

- -

- Description: - {{ order.description or '–' }} -

- -

- Status: - - {{ order.status or 'pending' }} - -

- -

- Currency: - {{ order.currency or 'GBP' }} -

- -

- Total: - {% if order.total_amount %} - {{ order.currency or 'GBP' }} {{ '%.2f'|format(order.total_amount) }} - {% else %} - – - {% endif %} -

- -
- - \ No newline at end of file diff --git a/templates/_types/order/header/_header.html b/templates/_types/order/header/_header.html deleted file mode 100644 index 4d7f74b..0000000 --- a/templates/_types/order/header/_header.html +++ /dev/null @@ -1,17 +0,0 @@ -{% import 'macros/links.html' as links %} -{% macro header_row(oob=False) %} - {% call links.menu_row(id='order-row', oob=oob) %} - {% call links.link(url_for('orders.order.order_detail', order_id=order.id), hx_select_search ) %} - -
- Order -
-
- {{ order.id }} -
- {% endcall %} - {% call links.desktop_nav() %} - {% include '_types/order/_nav.html' %} - {% endcall %} - {% endcall %} -{% endmacro %} \ No newline at end of file diff --git a/templates/_types/order/index.html b/templates/_types/order/index.html deleted file mode 100644 index c3d301e..0000000 --- a/templates/_types/order/index.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends '_types/orders/index.html' %} - - -{% block orders_header_child %} - {% from '_types/root/_n/macros.html' import index_row with context %} - {% call index_row('order-header-child', '_types/order/header/_header.html') %} - {% block order_header_child %} - {% endblock %} - {% endcall %} -{% endblock %} - -{% block _main_mobile_menu %} - {% include '_types/order/_nav.html' %} -{% endblock %} - - - -{% block filter %} -
-
-

- Placed {% if order.created_at %}{{ order.created_at.strftime('%-d %b %Y, %H:%M') }}{% else %}—{% endif %} · Status: {{ order.status or 'pending' }} -

-
-
- - - All orders - - - {# Re-check status button #} -
- - -
- - {% if order.status != 'paid' %} - - - Open payment page - - {% endif %} -
-
-{% endblock %} - -{% block content %} - {% include '_types/order/_main_panel.html' %} -{% endblock %} - -{% block aside %} -{% endblock %} diff --git a/templates/_types/orders/_main_panel.html b/templates/_types/orders/_main_panel.html deleted file mode 100644 index 01ad410..0000000 --- a/templates/_types/orders/_main_panel.html +++ /dev/null @@ -1,26 +0,0 @@ -
- {% if not orders %} -
- No orders yet. -
- {% else %} -
- - - - - - - - - - - - - {# rows + infinite-scroll sentinel #} - {% include "_types/orders/_rows.html" %} - -
OrderCreatedDescriptionTotalStatus
-
- {% endif %} -
diff --git a/templates/_types/orders/_nav.html b/templates/_types/orders/_nav.html deleted file mode 100644 index f5c504d..0000000 --- a/templates/_types/orders/_nav.html +++ /dev/null @@ -1,2 +0,0 @@ -{% from 'macros/admin_nav.html' import placeholder_nav %} -{{ placeholder_nav() }} diff --git a/templates/_types/orders/_oob_elements.html b/templates/_types/orders/_oob_elements.html deleted file mode 100644 index ab50cb1..0000000 --- a/templates/_types/orders/_oob_elements.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends 'oob_elements.html' %} - -{# OOB elements for HTMX navigation - all elements that need updating #} - -{# Import shared OOB macros #} -{% from '_types/root/header/_oob.html' import root_header_start, root_header_end with context %} -{% from '_types/root/_oob_menu.html' import mobile_menu with context %} - -{# Header with app title - includes cart-mini, navigation, and market-specific header #} - -{% block oobs %} - - {% from '_types/root/_n/macros.html' import oob_header with context %} - {{oob_header('auth-header-child', 'orders-header-child', '_types/orders/header/_header.html')}} - - {% from '_types/auth/header/_header.html' import header_row with context %} - {{ header_row(oob=True) }} -{% endblock %} - -{% block aside %} - {% import '_types/browse/desktop/_filter/search.html' as s %} - {{ s.search(current_local_href, search, search_count, hx_select) }} -{% endblock %} - -{% block filter %} -{% include '_types/orders/_summary.html' %} -{% endblock %} - -{% block mobile_menu %} - {% include '_types/orders/_nav.html' %} -{% endblock %} - - -{% block content %} - {% include "_types/orders/_main_panel.html" %} -{% endblock %} - - diff --git a/templates/_types/orders/_rows.html b/templates/_types/orders/_rows.html deleted file mode 100644 index 33a459c..0000000 --- a/templates/_types/orders/_rows.html +++ /dev/null @@ -1,164 +0,0 @@ -{# suma_browser/templates/_types/order/_orders_rows.html #} - -{# --- existing rows, but split into desktop/tablet vs mobile --- #} -{% for order in orders %} - {# Desktop / tablet table row #} - - - #{{ order.id }} - - - {% if order.created_at %} - {{ order.created_at.strftime('%-d %b %Y, %H:%M') }} - {% else %} - — - {% endif %} - - - {{ order.description or '' }} - - - - {{ order.currency or 'GBP' }} - {{ '%.2f'|format(order.total_amount or 0) }} - - - {# status pill, roughly matching existing styling #} - - {{ order.status or 'pending' }} - - - - - View - - - - - {# Mobile card row #} - - -
-
- - #{{ order.id }} - - - - {{ order.status or 'pending' }} - -
- -
- {{ order.created_at or '' }} -
- -
-
- {{ order.currency or 'GBP' }} - {{ '%.2f'|format(order.total_amount or 0) }} -
- - - View - -
-
- - -{% endfor %} - -{# --- sentinel / end-of-results --- #} -{% if page < total_pages|int %} - - - {# Mobile sentinel content #} -
- {% include "sentinel/mobile_content.html" %} -
- - {# Desktop sentinel content #} - - - -{% else %} - - - End of results - - -{% endif %} diff --git a/templates/_types/orders/_summary.html b/templates/_types/orders/_summary.html deleted file mode 100644 index 824a235..0000000 --- a/templates/_types/orders/_summary.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
-

- Recent orders placed via the checkout. -

-
-
- {% import '_types/browse/mobile/_filter/search.html' as s %} - {{ s.search(current_local_href, search, search_count, hx_select) }} -
-
\ No newline at end of file diff --git a/templates/_types/orders/header/_header.html b/templates/_types/orders/header/_header.html deleted file mode 100644 index 32c1659..0000000 --- a/templates/_types/orders/header/_header.html +++ /dev/null @@ -1,14 +0,0 @@ -{% import 'macros/links.html' as links %} -{% macro header_row(oob=False) %} - {% call links.menu_row(id='orders-row', oob=oob) %} - {% call links.link(url_for('orders.list_orders'), hx_select_search, ) %} - -
- Orders -
- {% endcall %} - {% call links.desktop_nav() %} - {% include '_types/orders/_nav.html' %} - {% endcall %} - {% endcall %} -{% endmacro %} \ No newline at end of file diff --git a/templates/_types/orders/index.html b/templates/_types/orders/index.html deleted file mode 100644 index 8744c13..0000000 --- a/templates/_types/orders/index.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends '_types/auth/index.html' %} - - -{% block auth_header_child %} - {% from '_types/root/_n/macros.html' import index_row with context %} - {% call index_row('orders-header-child', '_types/orders/header/_header.html') %} - {% block orders_header_child %} - {% endblock %} - {% endcall %} - -{% endblock %} - -{% block _main_mobile_menu %} - {% include '_types/orders/_nav.html' %} -{% endblock %} - -{% block aside %} - {% import '_types/browse/desktop/_filter/search.html' as s %} - {{ s.search(current_local_href, search, search_count, hx_select) }} -{% endblock %} - - -{% block filter %} - {% include '_types/orders/_summary.html' %} -{% endblock %} - -{% block content %} -{% include '_types/orders/_main_panel.html' %} -{% endblock %}