diff --git a/app/controllers/PageCatalog.php b/app/controllers/PageCatalog.php index 9e6b986..492f02a 100644 --- a/app/controllers/PageCatalog.php +++ b/app/controllers/PageCatalog.php @@ -21,87 +21,7 @@ class PageCatalog extends Controller public function subjectGroups() { - return [ - 'business-finance' => [ - 'title' => __('Business and Finance', 'aldine'), - 'subjects' => [ - 'accounting' => 'Accounting', - 'finance' => 'Finance', - 'information-systems' => 'Information Systems', - 'management' => 'Management', - 'marketing' => 'Marketing', - 'economics' => 'Economics', - ], - ], - 'engineering-technology' => [ - 'title' => __('Engineering & Technology', 'aldine'), - 'subjects' => [ - 'architecture' => 'Architecture', - 'bioengineering' => 'Bioengineering', - 'chemical' => 'Chemical', - 'civil' => 'Civil', - 'electrical' => 'Electrical', - 'mechanical' => 'Mechanical', - 'mining-and-materials' => 'Mining and Materials', - 'urban-planning' => 'Urban Planning', - 'computer-science' => 'Computer Science', - ], - ], - 'health-sciences' => [ - 'title' => __('Health Sciences', 'aldine'), - 'subjects' => [ - 'nursing' => 'Nursing', - 'dentistry' => 'Dentistry', - 'medicine' => 'Medicine', - ], - ], - 'humanities-arts' => [ - 'title' => __('Humanities & Arts', 'aldine'), - 'subjects' => [ - 'archaeology' => 'Archaeology', - 'art' => 'Art', - 'classics' => 'Classics', - 'literature' => 'Literature', - 'history' => 'History', - 'media' => 'Media', - 'music' => 'Music', - 'philosophy' => 'Philosophy', - 'religion' => 'Religion', - 'language' => 'Language', - ], - ], - 'reference' => [ - 'title' => __('Reference', 'aldine'), - 'subjects' => [ - 'student-guides' => 'Student Guides', - 'teaching-guides' => 'Teaching Guides', - ], - ], - 'science' => [ - 'title' => __('Sciences', 'aldine'), - 'subjects' => [ - 'biology' => 'Biology', - 'chemistry' => 'Chemistry', - 'environent-and-earth-sciences' => 'Environment and Earth Sciences', - 'geography' => 'Geography', - 'mathematics' => 'Mathematics', - 'physics' => 'Physics', - ], - ], - 'social-sciences' => [ - 'title' => __('Social Sciences', 'aldine'), - 'subjects' => [ - 'anthropology' => 'Anthropology', - 'gender-studies' => 'Gender Studies', - 'linguistics' => 'Linguistics', - 'museums-libraries-and-information-sciences' => 'Museums, Libraries, and Information Sciences', - 'political-science' => 'Political Science', - 'psychology' => 'Psychology', - 'social-work' => 'Social Work', - 'sociology' => 'Sociology', - ], - ], - ]; + return \Pressbooks\Metadata\get_thema_subjects(); } public function catalogData() diff --git a/resources/views/page-catalog.blade.php b/resources/views/page-catalog.blade.php index 8a65c8f..61f5e4b 100644 --- a/resources/views/page-catalog.blade.php +++ b/resources/views/page-catalog.blade.php @@ -16,10 +16,12 @@
@foreach($subject_groups as $key => $val)
- {{ $val['title'] }} + {{ $val['label'] }}