forked from UKSOURCE/cms.lams
feat(cms): refactor page content management and implement detailed editors
Refactor the CMS page content system to use a more modular configuration-driven approach. This replaces the monolithic `pageContentConfig.js` with individual configuration files for each page and introduces a shared field utility to standardize editor components. Key changes: - Implement a generic `_renderSingletonPageView` helper to reduce duplication across controllers. - Enhance `_createPageContentController` with `normalizeForEditor`, `normalizeForApi`, and `preparePayload` hooks for custom data transformation. - Create dedicated configuration and view structures for Partnerships, History, Accreditation, Admissions, and Policies pages. - Add a specialized section editor for Policies to manage complex nested content. - Improve the frontend `page-content-editor.js` with support for visibility logic, auto-sequencing for arrays, and URL synchronization for active tabs. - Update data JSON files to align with the new schema.
This commit is contained in:
+32
-15
@@ -5,11 +5,11 @@
|
||||
"description": "We believe high-quality education should be accessible to everyone. Explore our straightforward admissions process and flexible payment models designed to fit your life.",
|
||||
"primaryCta": {
|
||||
"label": "Start Application",
|
||||
"href": "#apply"
|
||||
"href": "http://localhost:3001/admin/admissions"
|
||||
},
|
||||
"secondaryCta": {
|
||||
"label": "View Tuition",
|
||||
"href": "#tuition-breakdown"
|
||||
"href": "http://localhost:3001/admin/admissions"
|
||||
},
|
||||
"image": "/uploads/admissions/hero-students.png",
|
||||
"imageAlt": "Diverse adult students studying online"
|
||||
@@ -20,19 +20,19 @@
|
||||
"description": "Our streamlined process gets you from application to enrolled in days, not months. No application fees, no standardized tests.",
|
||||
"steps": [
|
||||
{
|
||||
"number": "1",
|
||||
"title": "Submit Application",
|
||||
"description": "Fill out our online form in under 15 minutes. Basic personal and educational history required.",
|
||||
"active": true
|
||||
},
|
||||
{
|
||||
"number": "2",
|
||||
"number": "01",
|
||||
"title": "Send Transcripts",
|
||||
"description": "Request official transcripts from previous institutions for credit evaluation.",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"number": "3",
|
||||
"number": "02",
|
||||
"title": "Submit Application",
|
||||
"description": "Fill out our online form in under 15 minutes. Basic personal and educational history required.",
|
||||
"active": true
|
||||
},
|
||||
{
|
||||
"number": "03",
|
||||
"title": "Choose Payment Plan",
|
||||
"description": "Select between our monthly subscription or pay-per-course model.",
|
||||
"active": false
|
||||
@@ -72,19 +72,33 @@
|
||||
{
|
||||
"label": "Traditional University",
|
||||
"color": "#0F172A",
|
||||
"values": [25000, 50000, 75000, 100000]
|
||||
"values": [
|
||||
25000,
|
||||
50000,
|
||||
75000,
|
||||
100000
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "LAMS",
|
||||
"color": "#c49b27",
|
||||
"values": [3588, 7176, 10764, 14352]
|
||||
"values": [
|
||||
3588,
|
||||
7176,
|
||||
10764,
|
||||
14352
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"keyDates": {
|
||||
"id": "key-dates",
|
||||
"title": "Key Dates & Deadlines",
|
||||
"columns": ["Term", "Application Deadline", "Classes Start"],
|
||||
"columns": [
|
||||
"Term",
|
||||
"Application Deadline",
|
||||
"Classes Start"
|
||||
],
|
||||
"rows": [
|
||||
{
|
||||
"term": "Fall Term 1",
|
||||
@@ -106,7 +120,10 @@
|
||||
"calculator": {
|
||||
"title": "Affordability Calculator",
|
||||
"description": "Estimate your monthly investment.",
|
||||
"modelOptions": ["Subscription", "Per Course"],
|
||||
"modelOptions": [
|
||||
"Subscription",
|
||||
"Per Course"
|
||||
],
|
||||
"paceLabel": "Target Pace",
|
||||
"minPaceLabel": "Relaxed",
|
||||
"maxPaceLabel": "Accelerated",
|
||||
@@ -136,4 +153,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user