diff --git a/app/templates/admin/company-edit.html b/app/templates/admin/company-edit.html
index 5ebd1d6e..9cbc668b 100644
--- a/app/templates/admin/company-edit.html
+++ b/app/templates/admin/company-edit.html
@@ -1,33 +1,19 @@
{# app/templates/admin/company-edit.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/alerts.html' import loading_state %}
+{% from 'shared/macros/inputs.html' import search_autocomplete, selected_item_display %}
+{% from 'shared/macros/headers.html' import edit_page_header %}
{% block title %}Edit Company{% endblock %}
{% block alpine_data %}adminCompanyEdit(){% endblock %}
{% block content %}
-
-
+{% call edit_page_header('Edit Company', '/admin/companies', subtitle_show='company', back_label='Back to Companies') %}
+
+{{ loading_state('Loading company...', show_condition='loadingCompany') }}
+ {# noqa: FE-004 - Complex form modal with dynamic user search and transfer functionality #}
New Owner
*
-
-
-
-
-
-
- No users found
-
-
-
-
- Searching...
-
-
-
-
-
- Selected: ( )
-
-
-
-
-
+ {{ search_autocomplete(
+ search_var='userSearchQuery',
+ results_var='userSearchResults',
+ show_dropdown_var='showUserDropdown',
+ loading_var='searchingUsers',
+ disabled_var='transferring',
+ search_action='searchUsers()',
+ select_action='selectUser(item)',
+ selected_check='transferData.new_owner_user_id === item.id',
+ display_field='username',
+ secondary_field='email',
+ placeholder='Search by name or email...',
+ no_results_text='No users found'
+ ) }}
+ {{ selected_item_display(
+ selected_var='selectedUser',
+ display_field='username',
+ secondary_field='email',
+ clear_action='clearSelectedUser()'
+ ) }}
Current owner:
diff --git a/app/templates/admin/content-page-edit.html b/app/templates/admin/content-page-edit.html
index c8ee8e1b..7c193cee 100644
--- a/app/templates/admin/content-page-edit.html
+++ b/app/templates/admin/content-page-edit.html
@@ -1,34 +1,29 @@
{# app/templates/admin/content-page-edit.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/alerts.html' import loading_state, error_state, alert_dynamic %}
+{% from 'shared/macros/headers.html' import page_header_flex, back_button, action_button %}
+{% from 'shared/macros/inputs.html' import number_stepper %}
{% block title %}{% if page_id %}Edit{% else %}Create{% endif %} Content Page{% endblock %}
{% block alpine_data %}contentPageEditor({{ page_id if page_id else 'null' }}){% endblock %}
{% block content %}
-
+{# Dynamic title/subtitle and save button text based on create vs edit mode #}
-
-
-
+
Create a new platform default or vendor-specific page
Modify an existing content page
-
-
-
- Back to List
-
+
+ {{ back_button('/admin/content-pages', 'Back to List') }}
@@ -37,28 +32,11 @@
-
-
+{{ loading_state('Loading page...') }}
-
-
+{{ error_state('Error', show_condition='error && !loading') }}
-
-
+{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
@@ -217,12 +195,7 @@
Display Order
-
+ {{ number_stepper(model='form.display_order', min=0, max=100, step=1, label='Display Order') }}
Lower = first
diff --git a/app/templates/admin/content-pages.html b/app/templates/admin/content-pages.html
index 500611de..97bdfb18 100644
--- a/app/templates/admin/content-pages.html
+++ b/app/templates/admin/content-pages.html
@@ -1,75 +1,29 @@
{# app/templates/admin/content-pages.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
+{% from 'shared/macros/alerts.html' import loading_state, error_state %}
+{% from 'shared/macros/tabs.html' import tabs_inline, tab_button %}
{% block title %}Content Pages{% endblock %}
{% block alpine_data %}contentPagesManager(){% endblock %}
{% block content %}
-
-
-
-
- Content Pages
-
-
- Manage platform defaults and vendor-specific content pages
-
-
-
-
- Create Page
-
-
+{{ page_header('Content Pages', subtitle='Manage platform defaults and vendor-specific content pages', action_label='Create Page', action_url='/admin/content-pages/create') }}
-
-
+{{ loading_state('Loading pages...') }}
-
-
-
-
-
Error loading pages
-
-
-
+{{ error_state('Error loading pages') }}
-
-
- All Pages
-
-
-
- Platform Defaults
-
-
-
- Vendor Overrides
-
-
-
+ {% call tabs_inline() %}
+ {{ tab_button('all', 'All Pages', count_var='allPages.length') }}
+ {{ tab_button('platform', 'Platform Defaults', count_var='platformPages.length') }}
+ {{ tab_button('vendor', 'Vendor Overrides', count_var='vendorPages.length') }}
+ {% endcall %}
diff --git a/app/templates/admin/customers.html b/app/templates/admin/customers.html
index 6f27bcc8..3eff32ab 100644
--- a/app/templates/admin/customers.html
+++ b/app/templates/admin/customers.html
@@ -1,22 +1,13 @@
{# app/templates/admin/customers.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Customers{% endblock %}
{% block alpine_data %}adminCustomers(){% endblock %}
{% block content %}
-
-
-
-
- Customers
-
-
- Manage platform customers
-
-
-
+{{ page_header('Customers', subtitle='Manage platform customers') }}
diff --git a/app/templates/admin/dashboard.html b/app/templates/admin/dashboard.html
index f29865f9..d1f0236f 100644
--- a/app/templates/admin/dashboard.html
+++ b/app/templates/admin/dashboard.html
@@ -1,41 +1,19 @@
{# app/templates/admin/dashboard.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
+{% from 'shared/macros/alerts.html' import loading_state, error_state %}
+{% from 'shared/macros/tables.html' import table_wrapper, table_header %}
{% block title %}Dashboard{% endblock %}
{% block alpine_data %}adminDashboard(){% endblock %}
{% block content %}
-
-
-
- Dashboard
-
-
-
-
-
-
-
+{{ page_header('Dashboard', action_label='Refresh', action_onclick='refresh()', action_icon='refresh') }}
-
-
-
-
Loading dashboard...
-
+{{ loading_state('Loading dashboard...') }}
-
-
-
-
-
Error loading dashboard
-
-
-
+{{ error_state('Error loading dashboard') }}
@@ -101,17 +79,9 @@
-
-
-
-
-
- Vendor
- Status
- Created
- Actions
-
-
+
+ {% call table_wrapper() %}
+ {{ table_header(['Vendor', 'Status', 'Created', 'Actions']) }}
@@ -162,8 +132,7 @@
-
-
+ {% endcall %}
{% endblock %}
diff --git a/app/templates/admin/icons.html b/app/templates/admin/icons.html
index 975cae70..ff39d15b 100644
--- a/app/templates/admin/icons.html
+++ b/app/templates/admin/icons.html
@@ -1,5 +1,6 @@
{# app/templates/admin/icons.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Icons Browser{% endblock %}
@@ -7,17 +8,7 @@
{% block alpine_data %}adminIcons(){% endblock %}
{% block content %}
-
-
+{{ page_header('Icons Browser', back_url='/admin/dashboard', back_label='Back to Dashboard') }}
diff --git a/app/templates/admin/imports.html b/app/templates/admin/imports.html
index 691f20d6..3aba4b82 100644
--- a/app/templates/admin/imports.html
+++ b/app/templates/admin/imports.html
@@ -1,6 +1,10 @@
{# app/templates/admin/imports.html #}
{% extends "admin/base.html" %}
{% from 'shared/macros/pagination.html' import pagination %}
+{% from 'shared/macros/headers.html' import page_header_flex, refresh_button %}
+{% from 'shared/macros/alerts.html' import error_state %}
+{% from 'shared/macros/modals.html' import job_details_modal %}
+{% from 'shared/macros/tables.html' import table_wrapper, table_header %}
{% block title %}Import Jobs - Platform Monitoring{% endblock %}
@@ -11,26 +15,9 @@
{% endblock %}
{% block content %}
-
-
-
-
- Platform Import Jobs
-
-
- System-wide monitoring of all marketplace import jobs
-
-
-
-
-
-
-
-
+{% call page_header_flex(title='Platform Import Jobs', subtitle='System-wide monitoring of all marketplace import jobs') %}
+ {{ refresh_button(onclick='refreshJobs()') }}
+{% endcall %}
@@ -95,14 +82,7 @@
-
-
+{{ error_state('Error', show_condition='error') }}
@@ -201,22 +181,9 @@
-
-
-
-
-
- Job ID
- Vendor
- Marketplace
- Status
- Progress
- Started
- Duration
- Created By
- Actions
-
-
+
+ {% call table_wrapper() %}
+ {{ table_header(['Job ID', 'Vendor', 'Marketplace', 'Status', 'Progress', 'Started', 'Duration', 'Created By', 'Actions']) }}
@@ -286,123 +253,11 @@
-
-
-
+ {% endcall %}
{{ pagination(show_condition="!loading && pagination.total > 0") }}
-
-
-
-
-
-
- Import Job Details
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Close
-
-
-
-
+{{ job_details_modal(show_created_by=true) }}
{% endblock %}
diff --git a/app/templates/admin/logs.html b/app/templates/admin/logs.html
index 43d1208c..96d90e67 100644
--- a/app/templates/admin/logs.html
+++ b/app/templates/admin/logs.html
@@ -1,47 +1,20 @@
{# app/templates/admin/logs.html #}
{% extends "admin/base.html" %}
{% from 'shared/macros/pagination.html' import pagination %}
+{% from 'shared/macros/alerts.html' import alert_dynamic, error_state %}
+{% from 'shared/macros/headers.html' import page_header_refresh %}
+{% from 'shared/macros/tabs.html' import tabs_nav, tab_button %}
{% block title %}Application Logs{% endblock %}
{% block alpine_data %}adminLogs(){% endblock %}
{% block content %}
-
-
-
- Application Logs
-
-
-
-
-
-
-
-
-
+{{ page_header_refresh('Application Logs') }}
-
-
+{{ alert_dynamic(type='success', title='Success', message_var='successMessage', show_condition='successMessage') }}
-
-
+{{ error_state('Error', show_condition='error') }}
@@ -91,28 +64,10 @@
-
-
-
-
-
- Database Logs
-
-
-
- File Logs
-
-
-
-
+{% call tabs_nav() %}
+ {{ tab_button('database', 'Database Logs', tab_var='logSource', icon='database', onclick="logSource = 'database'; loadLogs()") }}
+ {{ tab_button('file', 'File Logs', tab_var='logSource', icon='document', onclick="logSource = 'file'; loadFileLogs()") }}
+{% endcall %}
@@ -299,6 +254,7 @@
+{# noqa: FE-004 - Log detail modal with dynamic show variable and custom content layout #}
diff --git a/app/templates/admin/marketplace.html b/app/templates/admin/marketplace.html
index e41d1043..d36ffc67 100644
--- a/app/templates/admin/marketplace.html
+++ b/app/templates/admin/marketplace.html
@@ -1,49 +1,24 @@
{# app/templates/admin/marketplace.html #}
{% extends "admin/base.html" %}
{% from 'shared/macros/pagination.html' import pagination %}
+{% from 'shared/macros/alerts.html' import alert_dynamic, error_state %}
+{% from 'shared/macros/modals.html' import job_details_modal %}
+{% from 'shared/macros/tables.html' import table_wrapper, table_header %}
+{% from 'shared/macros/headers.html' import page_header_flex, refresh_button %}
+{% from 'shared/macros/inputs.html' import number_stepper %}
{% block title %}Marketplace Import{% endblock %}
{% block alpine_data %}adminMarketplace(){% endblock %}
{% block content %}
-
-
-
-
- Marketplace Import
-
-
- Import products from Letzshop marketplace for any vendor (self-service)
-
-
-
-
-
-
-
-
+{% call page_header_flex(title='Marketplace Import', subtitle='Import products from Letzshop marketplace for any vendor (self-service)') %}
+ {{ refresh_button(onclick='refreshJobs()') }}
+{% endcall %}
-
-
+{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
-
-
+{{ error_state('Error', show_condition='error') }}
@@ -129,14 +104,7 @@
Batch Size
-
+ {{ number_stepper(model='importForm.batch_size', min=100, max=5000, step=100, label='Batch Size') }}
Number of products to process per batch (100-5000)
@@ -286,21 +254,9 @@
-
-
-
-
-
- Job ID
- Vendor
- Marketplace
- Status
- Progress
- Started
- Duration
- Actions
-
-
+
+ {% call table_wrapper() %}
+ {{ table_header(['Job ID', 'Vendor', 'Marketplace', 'Status', 'Progress', 'Started', 'Duration', 'Actions']) }}
@@ -367,121 +323,13 @@
-
-
-
+ {% endcall %}
{{ pagination(show_condition="!loading && pagination.total > 0") }}
-
-
-
-
-
-
- Import Job Details
-
-
-
-
-
-
-
-
-
-
-
-
- Close
-
-
-
-
+{{ job_details_modal() }}
{% endblock %}
{% block extra_scripts %}
diff --git a/app/templates/admin/platform-homepage.html b/app/templates/admin/platform-homepage.html
index 84ed0c1a..e4a2bdef 100644
--- a/app/templates/admin/platform-homepage.html
+++ b/app/templates/admin/platform-homepage.html
@@ -1,64 +1,36 @@
{# app/templates/admin/platform-homepage.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/alerts.html' import loading_state, error_state, alert_dynamic %}
+{% from 'shared/macros/headers.html' import page_header_flex, action_button %}
{% block title %}Platform Homepage Manager{% endblock %}
{% block alpine_data %}platformHomepageManager(){% endblock %}
{% block content %}
-
+{# Note: Subtitle has inline HTML link, so using page_header_flex with custom structure #}
-
- Platform Homepage
-
+
Platform Homepage
Manage your platform's main landing page at localhost:8000
-
-
-
-
-
Loading homepage...
-
+{{ loading_state('Loading homepage...') }}
-
-
-
-
-
Error loading homepage
-
-
-
+{{ error_state('Error loading homepage') }}
-
-
+{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
diff --git a/app/templates/admin/settings.html b/app/templates/admin/settings.html
index c5f37256..d6e1890e 100644
--- a/app/templates/admin/settings.html
+++ b/app/templates/admin/settings.html
@@ -1,76 +1,27 @@
{# app/templates/admin/settings.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/alerts.html' import alert_dynamic, error_state %}
+{% from 'shared/macros/headers.html' import page_header_refresh %}
+{% from 'shared/macros/tabs.html' import tabs_nav, tab_button %}
+{% from 'shared/macros/inputs.html' import number_stepper %}
{% block title %}Platform Settings{% endblock %}
{% block alpine_data %}adminSettings(){% endblock %}
{% block content %}
-
-
-
- Platform Settings
-
-
-
-
-
-
-
+{{ page_header_refresh('Platform Settings') }}
-
-
+{{ alert_dynamic(type='success', title='Success', message_var='successMessage', show_condition='successMessage') }}
-
-
+{{ error_state('Error', show_condition='error') }}
-
-
-
-
-
- Logging
-
-
-
- System
-
-
-
- Security
-
-
-
-
+{% call tabs_nav() %}
+ {{ tab_button('logging', 'Logging', icon='document-text') }}
+ {{ tab_button('system', 'System', icon='cog') }}
+ {{ tab_button('security', 'Security', icon='shield-check') }}
+{% endcall %}
@@ -108,13 +59,7 @@
Max File Size (MB)
-
+ {{ number_stepper(model='logSettings.log_file_max_size_mb', min=1, max=1000, step=10, label='Max File Size') }}
Log file will rotate when it reaches this size.
@@ -124,13 +69,7 @@
Backup File Count
-
+ {{ number_stepper(model='logSettings.log_file_backup_count', min=0, max=50, step=1, label='Backup File Count') }}
Number of rotated backup files to keep.
@@ -142,13 +81,7 @@
Database Log Retention (Days)
-
+ {{ number_stepper(model='logSettings.db_log_retention_days', min=1, max=365, step=7, label='Retention Days') }}
Logs older than this will be automatically deleted from database.
diff --git a/app/templates/admin/test-auth-flow.html b/app/templates/admin/test-auth-flow.html
index d3ef2c6f..4d049f26 100644
--- a/app/templates/admin/test-auth-flow.html
+++ b/app/templates/admin/test-auth-flow.html
@@ -1,21 +1,12 @@
{# app/templates/admin/test-auth-flow.html #}
{% extends 'admin/base.html' %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Auth Flow Testing{% endblock %}
{% block content %}
- {# Page Header #}
-
-
-
- Auth Flow Testing
-
-
- Comprehensive testing for Jinja2 migration auth loop fix
-
-
-
+ {{ page_header('Auth Flow Testing', subtitle='Comprehensive testing for Jinja2 migration auth loop fix') }}
{# Log Level Control #}
diff --git a/app/templates/admin/test-vendors-users-migration.html b/app/templates/admin/test-vendors-users-migration.html
index d69d43e4..905feb39 100644
--- a/app/templates/admin/test-vendors-users-migration.html
+++ b/app/templates/admin/test-vendors-users-migration.html
@@ -1,21 +1,12 @@
{# app/templates/admin/test-vendors-users-migration.html #}
{% extends 'admin/base.html' %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Vendors & Users Migration Testing{% endblock %}
{% block content %}
- {# Page Header #}
-
-
-
- Vendors & Users Migration Testing
-
-
- Comprehensive test suite for verifying the Jinja2 migration
-
-
-
+ {{ page_header('Vendors & Users Migration Testing', subtitle='Comprehensive test suite for verifying the Jinja2 migration') }}
{# Status Cards #}
diff --git a/app/templates/admin/testing-hub.html b/app/templates/admin/testing-hub.html
index 5526863b..cb6cd3d2 100644
--- a/app/templates/admin/testing-hub.html
+++ b/app/templates/admin/testing-hub.html
@@ -1,5 +1,6 @@
{# app/templates/admin/testing-hub.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Testing Hub{% endblock %}
@@ -7,17 +8,7 @@
{% block alpine_data %}adminTestingHub(){% endblock %}
{% block content %}
-
-
+{{ page_header('Testing Hub', back_url='/admin/dashboard', back_label='Back to Dashboard') }}
diff --git a/app/templates/admin/user-create.html b/app/templates/admin/user-create.html
index ddcfa36f..409e41e2 100644
--- a/app/templates/admin/user-create.html
+++ b/app/templates/admin/user-create.html
@@ -1,27 +1,13 @@
{# app/templates/admin/user-create.html #}
{% extends "admin/base.html" %}
+{% from 'shared/macros/headers.html' import page_header %}
{% block title %}Create User{% endblock %}
{% block alpine_data %}adminUserCreate(){% endblock %}
{% block content %}
-
-
+{{ page_header('Create New User', subtitle='Add a new user to the platform', back_url='/admin/users', back_label='Back to Users') }}