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:
@@ -16,12 +16,18 @@
|
||||
]
|
||||
},
|
||||
"hero": {
|
||||
"badge": "Excellence Assured",
|
||||
"badge": "Accreditation Save Check",
|
||||
"title": "ACCREDITATION AND RECOGNITION",
|
||||
"description": "At the London Academy of Management and Sciences (LAMS), we are committed to maintaining the highest academic standards and delivering quality education that aligns with international benchmarks. Our accreditations reflect our dedication to excellence, credibility, and continuous improvement in higher education and professional learning."
|
||||
},
|
||||
"grid": {
|
||||
"tabs": ["All", "Registry", "Certification", "Accreditation", "Quality Assurance"],
|
||||
"tabs": [
|
||||
"All",
|
||||
"Registry",
|
||||
"Certification",
|
||||
"Accreditation",
|
||||
"Quality Assurance"
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": "ukrlp",
|
||||
@@ -85,4 +91,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+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 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"highlight": {
|
||||
"icon": "fa-trophy",
|
||||
"text": "2025 Milestone Reached: A Rapidly Growing Global Community!",
|
||||
"text": "History Save Check",
|
||||
"linkLabel": "Read Full Story",
|
||||
"href": "#timeline-content"
|
||||
},
|
||||
@@ -14,7 +14,12 @@
|
||||
"yearLabel": "Decade / Year",
|
||||
"categoryLabel": "Category",
|
||||
"buttonLabel": "Apply Filters",
|
||||
"yearOptions": ["All Years", "2020 - Present", "2010 - 2019", "2005 - 2009"],
|
||||
"yearOptions": [
|
||||
"All Years",
|
||||
"2020 - Present",
|
||||
"2010 - 2019",
|
||||
"2005 - 2009"
|
||||
],
|
||||
"categoryOptions": [
|
||||
"All Categories",
|
||||
"Academic Programs",
|
||||
@@ -94,4 +99,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+39
-14
@@ -2,13 +2,13 @@
|
||||
"hero": {
|
||||
"badge": "Global NetworkGlobal NetworkGlobal Netwo",
|
||||
"title": "Industry & Academic Partnerships.Industry & Academic Partnerships.Industry & Academic Part",
|
||||
"description": "Connecting our students with leading organizations for real-world experience, research opportunities, and career advancement.Connecting our students with leading organizations for real-world experience, research opportun",
|
||||
"description": "Global NetworkGlobal NetworkGlobal NetwoGlobal NetworkGlobal NetworkGlobal NetwoGlobal NetworkGlobal NetworkGlobal NetwoGlobal NetworkGlobal NetworkGlobal NetwoGlobal NetworkGlobal NetworkGlobal NetwoGlobal NetworkGlobal",
|
||||
"linkLabel": "Explore DirectoryExplore DirectoryExplor",
|
||||
"image": "/uploads/partnerships/kVI17_2B.webp",
|
||||
"imageAlt": "Modern university campus and corporate office buildingModern university campus and corporate office buildingModern unive"
|
||||
},
|
||||
"directory": {
|
||||
"heading": "Partner DirectoryPartner DirectoryPartner DirectoryPartner DirectoryPa",
|
||||
"heading": "Partner DirectoryPartner DirectoryPartne",
|
||||
"description": "Discover the organizations shaping the future of education with us.Discover the organizations shaping the future of education with us.Discover the organizations shaping the future ",
|
||||
"tabs": [
|
||||
"All PartnersAll PartnersAll Pa",
|
||||
@@ -89,27 +89,47 @@
|
||||
]
|
||||
},
|
||||
"cta": {
|
||||
"heading": "Join the ecosystem.Join the ecosystem.Join the ecosystem.Join the ecosystem.Join",
|
||||
"heading": "Join the ecosystem",
|
||||
"description": "Partner with London Academy of Management and Sciences to build talent pipelines, collaborate on research, and shape the next generation of leaders.Partner with London Academy of Management and Sciences to build talent p",
|
||||
"buttonLabel": "Become a partnerBecome a partnerBecome a"
|
||||
},
|
||||
"inquiryForm": {
|
||||
"title": "Partnership InquiryPartnership InquiryPartnership InquiryPar",
|
||||
"fields": {
|
||||
"firstName": {
|
||||
"fields": [
|
||||
{
|
||||
"id": "firstName",
|
||||
"label": "Partnership InquiryPartnership",
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPa"
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPa",
|
||||
"type": "text",
|
||||
"width": "half",
|
||||
"required": true,
|
||||
"options": []
|
||||
},
|
||||
"lastName": {
|
||||
{
|
||||
"id": "lastName",
|
||||
"label": "Partnership InquiryPartnership",
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPa"
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPa",
|
||||
"type": "text",
|
||||
"width": "half",
|
||||
"required": true,
|
||||
"options": []
|
||||
},
|
||||
"organization": {
|
||||
{
|
||||
"id": "organization",
|
||||
"label": "Partnership InquiryPartnership InquiryPa",
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPartnership InquiryPar"
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPartnership InquiryPar",
|
||||
"type": "text",
|
||||
"width": "full",
|
||||
"required": true,
|
||||
"options": []
|
||||
},
|
||||
"partnershipType": {
|
||||
{
|
||||
"id": "partnershipType",
|
||||
"label": "Partnership InquiryPartnership InquiryPa",
|
||||
"placeholder": "",
|
||||
"type": "select",
|
||||
"width": "full",
|
||||
"required": true,
|
||||
"options": [
|
||||
"Partnership InquiryPartnership InquiryPartnership ",
|
||||
"Partnership InquiryPartnership InquiryPartnership ",
|
||||
@@ -117,11 +137,16 @@
|
||||
"Partnership InquiryPartnership InquiryPartnership "
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
{
|
||||
"id": "message",
|
||||
"label": "Partnership InquiryPartnership",
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPartnership InquiryPartnership InquiryPart"
|
||||
"placeholder": "Partnership InquiryPartnership InquiryPartnership InquiryPartnership InquiryPart",
|
||||
"type": "textarea",
|
||||
"width": "full",
|
||||
"required": true,
|
||||
"options": []
|
||||
}
|
||||
},
|
||||
],
|
||||
"submitLabel": "Partnership InquiryPartnership InquiryPa"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
"titlePrefix": "Our Commitment to",
|
||||
"titleHighlight": "Transparency",
|
||||
"description": "Review our policies, terms of service, and commitments to privacy and accessibility. We believe in clear, straightforward communication with our academic community.",
|
||||
"lastUpdated": "Last updated: September 15, 2025"
|
||||
"lastUpdated": "Last updated: April 20, 2026"
|
||||
},
|
||||
"sidebar": {
|
||||
"heading": "Policies",
|
||||
@@ -175,4 +175,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user