diff --git a/config/optional/search_api.index.default.yml b/config/optional/search_api.index.default.yml index a7c9aba..7ad3501 100644 --- a/config/optional/search_api.index.default.yml +++ b/config/optional/search_api.index.default.yml @@ -70,6 +70,31 @@ name: Default description: '' read_only: false field_settings: + activity_program_subcategory_path: + label: 'Class » Content » Activity » Content » Program Subcategory » Content » URL alias' + datasource_id: 'entity:node' + property_path: 'field_session_class:entity:field_class_activity:entity:field_activity_category:entity:path' + type: string + dependencies: + config: + - field.storage.node.field_activity_category + - field.storage.node.field_class_activity + - field.storage.node.field_session_class + module: + - node + - path + activity_program_subcategory_title: + label: 'Class » Content » Activity » Content » Program Subcategory » Content » Title' + datasource_id: 'entity:node' + property_path: 'field_session_class:entity:field_class_activity:entity:field_activity_category:entity:title' + type: string + dependencies: + config: + - field.storage.node.field_activity_category + - field.storage.node.field_class_activity + - field.storage.node.field_session_class + module: + - node activity_title: label: 'Activity Title' datasource_id: 'entity:node' diff --git a/openy_af4_vue_app/src/components/ResultsList.vue b/openy_af4_vue_app/src/components/ResultsList.vue index 62d0a44..fa7db35 100644 --- a/openy_af4_vue_app/src/components/ResultsList.vue +++ b/openy_af4_vue_app/src/components/ResultsList.vue @@ -15,6 +15,11 @@ +
+ + {{ item.program_subcategory }} + +
{{ 'Ages' | t }}: @@ -114,6 +119,11 @@
+
+ + {{ item.program_subcategory }} + +
@@ -291,13 +301,11 @@ export default { line-height: 28px; color: $af-blue; font-weight: 700; - margin-bottom: 10px; text-decoration: underline; @include media-breakpoint-up('lg') { font-size: 18px; line-height: 28px; - margin-bottom: 20px; } & > svg { @@ -305,6 +313,16 @@ export default { } } + .program { + margin-top: 5px; + margin-bottom: 20px; + font-size: 12px; + color: $af-blue; + @include media-breakpoint-down('md') { + margin-bottom: 0; + } + } + .ages-spots { display: flex; justify-content: space-between; diff --git a/openy_af4_vue_app/src/components/modals/ActivityDetails.vue b/openy_af4_vue_app/src/components/modals/ActivityDetails.vue index daf3049..ae96ab2 100644 --- a/openy_af4_vue_app/src/components/modals/ActivityDetails.vue +++ b/openy_af4_vue_app/src/components/modals/ActivityDetails.vue @@ -14,6 +14,11 @@
{{ item.name }}
{{ item.description }}
+
+ + {{ item.program_subcategory }} + +
{{ 'Ages:' | t }} @@ -388,7 +393,8 @@ export default { .title, .description, .ages, - .gender { + .gender, + .program { margin-bottom: 10px; } @@ -401,7 +407,8 @@ export default { .description, .ages, .gender, - .learn-more { + .learn-more, + .program { font-size: 14px; line-height: 20px; } diff --git a/openy_af4_vue_app/src/components/steps/Step.vue b/openy_af4_vue_app/src/components/steps/Step.vue index 8f62e59..fc97df5 100644 --- a/openy_af4_vue_app/src/components/steps/Step.vue +++ b/openy_af4_vue_app/src/components/steps/Step.vue @@ -109,7 +109,7 @@ export default { }, handleSticky() { const clientHeight = window.document.documentElement.clientHeight - const rect = this.$refs.bottom.getBoundingClientRect() + const rect = this.$refs.bottom ? this.$refs.bottom.getBoundingClientRect() : 0 this.sticky = rect.top + this.stickyHeight >= clientHeight ? true : false const rectDesktop = this.$refs.bottomDesktop.getBoundingClientRect() this.stickyDesktop = rectDesktop.top + this.stickyDesktopHeight >= clientHeight ? true : false diff --git a/src/OpenyActivityFinderSolrBackend.php b/src/OpenyActivityFinderSolrBackend.php index 4ee6073..aeb3729 100644 --- a/src/OpenyActivityFinderSolrBackend.php +++ b/src/OpenyActivityFinderSolrBackend.php @@ -515,8 +515,11 @@ class OpenyActivityFinderSolrBackend extends OpenyActivityFinderBackend { 'description' => html_entity_decode(strip_tags(text_summary($entity->field_session_description->value ?? '', $entity->field_session_description->format, 600) ?? '')), 'ages' => $this->convertData([$entity->field_session_min_age->value, $entity->field_session_max_age->value ?? '0']), 'gender' => !empty($entity->field_session_gender->value) ? $entity->field_session_gender->value : '', - // We keep empty variables in order to have the same structure with other backends (e.g. Daxko) for avoiding unexpected errors. + // We keep empty variables in order to have the same structure with + // other backends (e.g. Daxko) for avoiding unexpected errors. 'program_id' => $sub_category->id(), + 'program_subcategory' => isset($fields['activity_program_subcategory_title']) ? $fields['activity_program_subcategory_title']?->getValues()[0] : '', + 'program_subcategory_path' => isset($fields['activity_program_subcategory_path']) ? $fields['activity_program_subcategory_path']?->getValues()[0] : '', 'offering_id' => '', 'info' => [], 'location_name' => '',