diff --git a/app/templates/admin/code-quality-dashboard.html b/app/templates/admin/code-quality-dashboard.html index c68f6e01..4df64d59 100644 --- a/app/templates/admin/code-quality-dashboard.html +++ b/app/templates/admin/code-quality-dashboard.html @@ -1,5 +1,7 @@ {# app/templates/admin/code-quality-dashboard.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, refresh_button, action_button %} {% block title %}Code Quality Dashboard{% endblock %} @@ -10,60 +12,16 @@ {% endblock %} {% block content %} - -
-
-

- Code Quality Dashboard -

-

- Architecture validation and technical debt tracking -

-
-
- - -
-
+{% call page_header_flex(title='Code Quality Dashboard', subtitle='Architecture validation and technical debt tracking') %} + {{ refresh_button(variant='secondary') }} + {{ action_button('Run Scan', 'Scanning...', 'scanning', 'runScan()', icon='search') }} +{% endcall %} - -
- -

Loading dashboard...

-
+{{ loading_state('Loading dashboard...') }} - -
- -
-

Error loading dashboard

-

-
-
+{{ error_state('Error loading dashboard') }} - -
- -
-

-
-
+{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
diff --git a/app/templates/admin/code-quality-violation-detail.html b/app/templates/admin/code-quality-violation-detail.html index de38f46a..7457be0e 100644 --- a/app/templates/admin/code-quality-violation-detail.html +++ b/app/templates/admin/code-quality-violation-detail.html @@ -1,5 +1,7 @@ {# app/templates/admin/code-quality-violation-detail.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/headers.html' import page_header %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} {% block title %}Violation Detail{% endblock %} @@ -159,37 +161,11 @@ function codeQualityViolationDetail(violationId) { {% endblock %} {% block content %} - -
-
-

- Violation Details -

-

- Review and manage architecture violation -

-
- - - Back to Violations - -
+{{ page_header('Violation Details', subtitle='Review and manage architecture violation', back_url='/admin/code-quality/violations', back_label='Back to Violations') }} - -
- -

Loading violation details...

-
+{{ loading_state('Loading violation details...') }} - -
- -
-

Error loading violation

-

-
-
+{{ error_state('Error loading violation') }}
@@ -259,6 +235,7 @@ function codeQualityViolationDetail(violationId) {
+ {# noqa: FE-008 - User ID is typed directly, not incremented #} -
-
-

- Architecture Violations -

-

- Review and manage code quality violations -

-
- - - Back to Dashboard - -
+{{ page_header('Architecture Violations', subtitle='Review and manage code quality violations', back_url='/admin/code-quality', back_label='Back to Dashboard') }} - -
- -

Loading violations...

-
+{{ loading_state('Loading violations...') }} - -
- -
-

Error loading violations

-

-
-
+{{ error_state('Error loading violations') }}
@@ -106,20 +83,8 @@
-
-
- - - - - - - - - - - - + {% call table_wrapper() %} + {{ table_header(['Rule', 'Severity', 'File', 'Line', 'Message', 'Status', 'Actions']) }} -
RuleSeverityFileLineMessageStatusActions
-
-
+ {% endcall %} {{ pagination() }}
diff --git a/app/templates/admin/companies.html b/app/templates/admin/companies.html index 87664ac9..5e2a9ba3 100644 --- a/app/templates/admin/companies.html +++ b/app/templates/admin/companies.html @@ -1,40 +1,20 @@ {# app/templates/admin/companies.html #} {% extends "admin/base.html" %} {% from 'shared/macros/pagination.html' import pagination %} +{% 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 %}Companies{% endblock %} {% block alpine_data %}adminCompanies(){% endblock %} {% block content %} - -
-

- Company Management -

- - - Create Company - -
+{{ page_header('Company Management', action_label='Create Company', action_url='/admin/companies/create') }} - -
- -

Loading companies...

-
+{{ loading_state('Loading companies...') }} - -
- -
-

Error loading companies

-

-
-
+{{ error_state('Error loading companies') }}
@@ -156,19 +136,9 @@
-
-
- - - - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['Company', 'Owner', 'Vendors', 'Status', 'Created', 'Actions']) }}
-
CompanyOwnerVendorsStatusCreatedActions
-
+ {% endcall %} {{ pagination() }}
diff --git a/app/templates/admin/company-create.html b/app/templates/admin/company-create.html index 3b1b034f..9a5bcbd9 100644 --- a/app/templates/admin/company-create.html +++ b/app/templates/admin/company-create.html @@ -1,31 +1,14 @@ {# app/templates/admin/company-create.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/headers.html' import page_header %} +{% from 'shared/macros/alerts.html' import error_state %} {% block title %}Create Company{% endblock %} {% block alpine_data %}adminCompanyCreate(){% endblock %} {% block content %} - -
-
-

- Create New Company -

-

- Create a company account with an owner user -

-
- - - - Back to Companies - - -
+{{ page_header('Create New Company', subtitle='Create a company account with an owner user', back_url='/admin/companies', back_label='Back to Companies') }}
@@ -48,16 +31,7 @@
- -
-
- -
-

Error Creating Company

-

-
-
-
+{{ error_state('Error Creating Company', error_var='errorMessage', show_condition='errorMessage') }}
diff --git a/app/templates/admin/company-detail.html b/app/templates/admin/company-detail.html index d6d97c36..ebdd5fd4 100644 --- a/app/templates/admin/company-detail.html +++ b/app/templates/admin/company-detail.html @@ -1,44 +1,22 @@ {# app/templates/admin/company-detail.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} +{% from 'shared/macros/headers.html' import detail_page_header %} {% block title %}Company Details{% endblock %} {% block alpine_data %}adminCompanyDetail(){% endblock %} {% block content %} - -
-
-

- Company Details -

-

- ID: - | - vendor(s) -

-
- - - Back - -
+{% call detail_page_header("company?.name || 'Company Details'", '/admin/companies', subtitle_show='company') %} + ID: + | + vendor(s) +{% endcall %} - -
- -

Loading company details...

-
+{{ loading_state('Loading company details...') }} - -
- -
-

Error loading company

-

-
-
+{{ error_state('Error loading company') }}
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 %} - -
-
-

- Edit Company -

-

- -

-
- - - Back to Companies - -
+{% call edit_page_header('Edit Company', '/admin/companies', subtitle_show='company', back_label='Back to Companies') %} + +{% endcall %} - -
- -

Loading company...

-
+{{ loading_state('Loading company...', show_condition='loadingCompany') }}
@@ -322,6 +308,7 @@

+ {# 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') }}
- -
- -

Loading page...

-
+{{ loading_state('Loading page...') }} - -
- -
-

Error

-

-
-
+{{ error_state('Error', show_condition='error && !loading') }} - -
- -
-

-
-
+{{ alert_dynamic(type='success', message_var='successMessage', show_condition='successMessage') }}
@@ -217,12 +195,7 @@ - + {{ 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 pages...

-
+{{ loading_state('Loading pages...') }} - -
- -
-

Error loading pages

-

-
-
+{{ error_state('Error loading pages') }}
-
- - - -
+ {% 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 @@
-
-
- - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['Vendor', 'Status', 'Created', 'Actions']) }}
-
VendorStatusCreatedActions
-
+ {% 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 %} - -
-

- Icons Browser -

- - - Back to Dashboard - -
+{{ 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

-

-
-
+{{ error_state('Error', show_condition='error') }}
@@ -201,22 +181,9 @@
-
-
- - - - - - - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['Job ID', 'Vendor', 'Marketplace', 'Status', 'Progress', 'Started', 'Duration', 'Created By', 'Actions']) }}
-
Job IDVendorMarketplaceStatusProgressStartedDurationCreated ByActions
-
-
+ {% endcall %} {{ pagination(show_condition="!loading && pagination.total > 0") }}
- -
-
- -
-

- Import Job Details -

- -
- - -
-
-
-

Job ID

-

-
-
-

Vendor

-

-
-
-

Marketplace

-

-
-
-

Status

- - -
-
-

Source URL

-

-
-
-

Imported

-

-
-
-

Updated

-

-
-
-

Errors

-

-
-
-

Total Processed

-

-
-
-

Started At

-

-
-
-

Completed At

-

-
-
-

Created By

-

-
-
- - -
-

Error Details

-
-

-                
-
-
- - -
- -
-
-
+{{ 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') }} - -
- -
-

Success

-

-
-
+{{ alert_dynamic(type='success', title='Success', message_var='successMessage', show_condition='successMessage') }} - -
- -
-

Error

-

-
-
+{{ error_state('Error', show_condition='error') }}
@@ -91,28 +64,10 @@
-
-
- -
-
+{% 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

-

-
-
+{{ error_state('Error', show_condition='error') }}
@@ -129,14 +104,7 @@ - + {{ 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 @@
-
-
- - - - - - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['Job ID', 'Vendor', 'Marketplace', 'Status', 'Progress', 'Started', 'Duration', 'Actions']) }}
-
Job IDVendorMarketplaceStatusProgressStartedDurationActions
-
-
+ {% endcall %} {{ pagination(show_condition="!loading && pagination.total > 0") }}
- -
-
- -
-

- Import Job Details -

- -
- - -
-
-
-

Job ID

-

-
-
-

Vendor

-

-
-
-

Marketplace

-

-
-
-

Status

- - -
-
-

Source URL

-

-
-
-

Imported

-

-
-
-

Updated

-

-
-
-

Errors

-

-
-
-

Total Processed

-

-
-
-

Started At

-

-
-
-

Completed At

-

-
-
- - -
-

Error Details

-
-

-                
-
-
- - -
- -
-
-
+{{ 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

-
- +
+ Preview - + {{ action_button('Save Changes', 'Saving...', 'saving', 'savePage()') }}
- -
- -

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') }} - -
- -
-

Success

-

-
-
+{{ alert_dynamic(type='success', title='Success', message_var='successMessage', show_condition='successMessage') }} - -
- -
-

Error

-

-
-
+{{ error_state('Error', show_condition='error') }} -
-
- -
-
+{% 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 @@ - + {{ 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 @@ - + {{ 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 @@ - + {{ 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 %} - -
-

- Testing Hub -

- - - Back to Dashboard - -
+{{ 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 %} - -
-
-

- Create New User -

-

- Add a new user to the platform -

-
- - - Back to Users - -
+{{ page_header('Create New User', subtitle='Add a new user to the platform', back_url='/admin/users', back_label='Back to Users') }}
diff --git a/app/templates/admin/user-detail.html b/app/templates/admin/user-detail.html index 12586132..cd08f985 100644 --- a/app/templates/admin/user-detail.html +++ b/app/templates/admin/user-detail.html @@ -1,44 +1,22 @@ {# app/templates/admin/user-detail.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} +{% from 'shared/macros/headers.html' import detail_page_header %} {% block title %}User Details{% endblock %} {% block alpine_data %}adminUserDetail(){% endblock %} {% block content %} - -
-
-

- User Details -

-

- @ - | - -

-
- - - Back - -
+{% call detail_page_header("user?.full_name || user?.username || 'User Details'", '/admin/users', subtitle_show='user') %} + @ + | + +{% endcall %} - -
- -

Loading user details...

-
+{{ loading_state('Loading user details...') }} - -
- -
-

Error loading user

-

-
-
+{{ error_state('Error loading user') }}
diff --git a/app/templates/admin/user-edit.html b/app/templates/admin/user-edit.html index 03c79ad8..01878d9e 100644 --- a/app/templates/admin/user-edit.html +++ b/app/templates/admin/user-edit.html @@ -1,33 +1,18 @@ {# app/templates/admin/user-edit.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state %} +{% from 'shared/macros/headers.html' import edit_page_header %} {% block title %}Edit User{% endblock %} {% block alpine_data %}adminUserEdit(){% endblock %} {% block content %} - -
-
-

- Edit User -

-

- @ -

-
- - - Back to Users - -
+{% call edit_page_header('Edit User', '/admin/users', subtitle_show='user', back_label='Back to Users') %} + @ +{% endcall %} - -
- -

Loading user...

-
+{{ loading_state('Loading user...', show_condition='loadingUser') }}
diff --git a/app/templates/admin/users.html b/app/templates/admin/users.html index 0725de27..948fc6e3 100644 --- a/app/templates/admin/users.html +++ b/app/templates/admin/users.html @@ -1,40 +1,20 @@ {# app/templates/admin/users.html #} {% extends "admin/base.html" %} {% from 'shared/macros/pagination.html' import pagination %} +{% 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 %}Users{% endblock %} {% block alpine_data %}adminUsers(){% endblock %} {% block content %} - -
-

- User Management -

- - - Create User - -
+{{ page_header('User Management', action_label='Create User', action_url='/admin/users/create', action_icon='user-plus') }} - -
- -

Loading users...

-
+{{ loading_state('Loading users...') }} - -
- -
-

Error loading users

-

-
-
+{{ error_state('Error loading users') }}
@@ -156,20 +136,9 @@
-
-
- - - - - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['User', 'Email', 'Role', 'Status', 'Registered', 'Last Login', 'Actions']) }}
-
UserEmailRoleStatusRegisteredLast LoginActions
-
+ {% endcall %} {{ pagination() }}
diff --git a/app/templates/admin/vendor-create.html b/app/templates/admin/vendor-create.html index f21eabbc..726a081b 100644 --- a/app/templates/admin/vendor-create.html +++ b/app/templates/admin/vendor-create.html @@ -1,32 +1,16 @@ {# app/templates/admin/vendor-create.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/headers.html' import page_header %} +{% from 'shared/macros/alerts.html' import error_state %} {% block title %}Create Vendor{% endblock %} {% block alpine_data %}adminVendorCreate(){% endblock %} {% block content %} - -
-
-

- Create New Vendor -

-

- Create a vendor (storefront/brand) under an existing company -

-
- - - - Back to Vendors - - -
+{{ page_header('Create New Vendor', subtitle='Create a vendor (storefront/brand) under an existing company', back_url='/admin/vendors', back_label='Back to Vendors') }} +{# noqa: FE-003 - Custom success message with nested template #}
@@ -48,16 +32,7 @@
- -
-
- -
-

Error Creating Vendor

-

-
-
-
+{{ error_state('Error Creating Vendor', error_var='errorMessage', show_condition='errorMessage') }}
diff --git a/app/templates/admin/vendor-detail.html b/app/templates/admin/vendor-detail.html index 0e8e68d7..81be0d47 100644 --- a/app/templates/admin/vendor-detail.html +++ b/app/templates/admin/vendor-detail.html @@ -1,44 +1,22 @@ {# app/templates/admin/vendor-detail.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} +{% from 'shared/macros/headers.html' import detail_page_header %} {% block title %}Vendor Details{% endblock %} {% block alpine_data %}adminVendorDetail(){% endblock %} {% block content %} - -
-
-

- Vendor Details -

-

- - - -

-
- - - Back - -
+{% call detail_page_header("vendor?.name || 'Vendor Details'", '/admin/vendors', subtitle_show='vendor') %} + + + +{% endcall %} - -
- -

Loading vendor details...

-
+{{ loading_state('Loading vendor details...') }} - -
- -
-

Error loading vendor

-

-
-
+{{ error_state('Error loading vendor') }}
diff --git a/app/templates/admin/vendor-edit.html b/app/templates/admin/vendor-edit.html index 0fb6abff..94aae3dd 100644 --- a/app/templates/admin/vendor-edit.html +++ b/app/templates/admin/vendor-edit.html @@ -1,35 +1,20 @@ {# app/templates/admin/vendor-edit.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state %} +{% from 'shared/macros/headers.html' import edit_page_header %} {% block title %}Edit Vendor{% endblock %} {% block alpine_data %}adminVendorEdit(){% endblock %} {% block content %} - -
-
-

- Edit Vendor -

-

- - - -

-
- - - Back to Vendors - -
+{% call edit_page_header('Edit Vendor', '/admin/vendors', subtitle_show='vendor', back_label='Back to Vendors') %} + + + +{% endcall %} - -
- -

Loading vendor...

-
+{{ loading_state('Loading vendor...', show_condition='loadingVendor') }}
diff --git a/app/templates/admin/vendor-theme.html b/app/templates/admin/vendor-theme.html index 7b16c105..a90a2e51 100644 --- a/app/templates/admin/vendor-theme.html +++ b/app/templates/admin/vendor-theme.html @@ -1,5 +1,7 @@ {# app/templates/admin/vendor-theme.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} +{% from 'shared/macros/headers.html' import page_header_flex %} {% block title %}Theme Editor - {{ vendor_code }}{% endblock %} @@ -7,35 +9,17 @@ {% block alpine_data %}adminVendorTheme(){% endblock %} {% block content %} - -
-
-

- Theme Editor -

-

- Customize appearance for -

-
- -
+{% call page_header_flex(title='Theme Editor', subtitle_var="'Customize appearance for ' + (vendor?.name || '...')") %} + + + Back to Vendor + +{% endcall %} - -
- -

Loading theme...

-
+{{ loading_state('Loading theme...') }} - -
-

-
+{{ error_state('Error', show_condition='error && !loading') }}
diff --git a/app/templates/admin/vendor-themes.html b/app/templates/admin/vendor-themes.html index 4f8736e3..6fdd4a84 100644 --- a/app/templates/admin/vendor-themes.html +++ b/app/templates/admin/vendor-themes.html @@ -1,22 +1,14 @@ {# app/templates/admin/vendor-themes.html #} {% extends "admin/base.html" %} +{% from 'shared/macros/headers.html' import page_header %} +{% from 'shared/macros/alerts.html' import loading_state, error_state %} {% block title %}Vendor Themes{% endblock %} {% block alpine_data %}adminVendorThemes(){% endblock %} {% block content %} - -
-
-

- Vendor Themes -

-

- Customize vendor theme colors and branding -

-
-
+{{ page_header('Vendor Themes', subtitle='Customize vendor theme colors and branding') }}
@@ -44,20 +36,9 @@
- -
- -

Loading vendors...

-
+{{ loading_state('Loading vendors...') }} - -
- -
-

Error loading vendors

-

-
-
+{{ error_state('Error loading vendors') }}
diff --git a/app/templates/admin/vendors.html b/app/templates/admin/vendors.html index 8aa564d3..46f5a32b 100644 --- a/app/templates/admin/vendors.html +++ b/app/templates/admin/vendors.html @@ -1,40 +1,20 @@ {# app/templates/admin/vendors.html #} {% extends "admin/base.html" %} {% from 'shared/macros/pagination.html' import pagination %} +{% 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 %}Vendors{% endblock %} {% block alpine_data %}adminVendors(){% endblock %} {% block content %} - -
-

- Vendor Management -

- - - Create Vendor - -
+{{ page_header('Vendor Management', action_label='Create Vendor', action_url='/admin/vendors/create') }} - -
- -

Loading vendors...

-
+{{ loading_state('Loading vendors...') }} - -
- -
-

Error loading vendors

-

-
-
+{{ error_state('Error loading vendors') }}
@@ -156,18 +136,9 @@
-
-
- - - - - - - - - - +
+ {% call table_wrapper() %} + {{ table_header(['Vendor', 'Subdomain', 'Status', 'Created', 'Actions']) }}
-
VendorSubdomainStatusCreatedActions
-
+ {% endcall %} {{ pagination() }}
diff --git a/app/templates/vendor/marketplace.html b/app/templates/vendor/marketplace.html index 405d1576..b68d6022 100644 --- a/app/templates/vendor/marketplace.html +++ b/app/templates/vendor/marketplace.html @@ -1,5 +1,6 @@ {# app/templates/vendor/marketplace.html #} {% extends "vendor/base.html" %} +{% from 'shared/macros/inputs.html' import number_stepper %} {% block title %}Marketplace Import{% endblock %} @@ -110,14 +111,7 @@ - + {{ number_stepper(model='importForm.batch_size', min=100, max=5000, step=100, label='Batch Size') }}

Number of products to process per batch (100-5000)