diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_event.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_event.default.yml index e4da8bf45..8e82d4095 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_event.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_form_display.node.stanford_event.default.yml @@ -29,6 +29,7 @@ dependencies: - field.field.node.stanford_event.su_sdss_custm_event_feat_media - field.field.node.stanford_event.su_sdss_event_topics - field.field.node.stanford_event.su_sdss_events_focal_areas + - field.field.node.stanford_event.su_sdss_featured - field.field.node.stanford_event.su_sdss_related_content - field.field.node.stanford_event.su_shared_tags - node.type.stanford_event @@ -51,6 +52,7 @@ third_party_settings: field_group: group_editorial_content: children: + - su_sdss_featured - su_event_subheadline - su_event_dek - su_event_sponsor @@ -58,7 +60,7 @@ third_party_settings: label: 'Editorial Content' region: content parent_name: '' - weight: 3 + weight: 1 format_type: fieldset format_settings: classes: '' @@ -72,7 +74,7 @@ third_party_settings: label: 'Body Content' region: content parent_name: '' - weight: 4 + weight: 3 format_type: fieldset format_settings: classes: '' @@ -94,7 +96,7 @@ third_party_settings: label: 'Event Details' region: content parent_name: '' - weight: 5 + weight: 2 format_type: fieldset format_settings: classes: '' @@ -107,7 +109,7 @@ third_party_settings: label: 'Schedule Details' region: content parent_name: '' - weight: 6 + weight: 4 format_type: fieldset format_settings: classes: '' @@ -117,23 +119,26 @@ third_party_settings: open: false group_taxonomy: children: + - su_sdss_event_topics + - su_event_type - su_shared_tags - su_event_keywords - su_event_subject - su_event_groups - su_sdss_events_focal_areas - label: Taxonomy + - su_sdss_related_content + label: 'Taxonomy & Related Content' region: content parent_name: '' - weight: 10 - format_type: details + weight: 5 + format_type: fieldset format_settings: classes: '' show_empty_fields: false id: '' - open: false description: '' required_fields: false + open: 0 id: node.stanford_event.default targetEntityType: node bundle: stanford_event @@ -141,7 +146,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 2 + weight: 1 region: content settings: rows: 9 @@ -151,18 +156,18 @@ content: third_party_settings: { } publish_on: type: datetime_timestamp_no_default - weight: 12 + weight: 10 region: content settings: { } third_party_settings: { } scheduler_settings: - weight: 11 + weight: 9 region: content settings: { } third_party_settings: { } stanford_intranet__access: type: entity_access - weight: 9 + weight: 8 region: content settings: { } third_party_settings: { } @@ -175,7 +180,7 @@ content: third_party_settings: { } su_event_alt_loc: type: string_textfield - weight: 24 + weight: 5 region: content settings: size: 60 @@ -183,16 +188,18 @@ content: third_party_settings: { } su_event_audience: type: options_buttons - weight: 30 + weight: 10 region: content settings: { } third_party_settings: { } su_event_components: type: layout_paragraphs - weight: 4 + weight: 3 region: content settings: + view_mode: default preview_view_mode: default + form_display_mode: default nesting_depth: 0 require_layouts: 1 empty_message: '' @@ -201,7 +208,7 @@ content: add_another: '' su_event_contact_info: type: string_textfield - weight: 29 + weight: 9 region: content settings: size: 60 @@ -209,7 +216,7 @@ content: third_party_settings: { } su_event_cta: type: link_default - weight: 31 + weight: 11 region: content settings: placeholder_url: '' @@ -217,7 +224,7 @@ content: third_party_settings: { } su_event_date_time: type: smartdate_timezone - weight: 21 + weight: 1 region: content settings: modal: false @@ -240,7 +247,7 @@ content: third_party_settings: { } su_event_dek: type: string_textfield - weight: 5 + weight: 9 region: content settings: size: 60 @@ -248,7 +255,7 @@ content: third_party_settings: { } su_event_email: type: email_default - weight: 26 + weight: 7 region: content settings: placeholder: '' @@ -256,7 +263,7 @@ content: third_party_settings: { } su_event_groups: type: readonly_field_widget - weight: 13 + weight: 18 region: content settings: label: above @@ -267,7 +274,7 @@ content: third_party_settings: { } su_event_keywords: type: readonly_field_widget - weight: 11 + weight: 16 region: content settings: label: above @@ -278,14 +285,14 @@ content: third_party_settings: { } su_event_location: type: address_default - weight: 23 + weight: 3 region: content settings: wrapper_type: details third_party_settings: { } su_event_map_link: type: link_default - weight: 25 + weight: 6 region: content settings: placeholder_url: '' @@ -305,7 +312,7 @@ content: third_party_settings: { } su_event_source: type: link_default - weight: 22 + weight: 2 region: content settings: placeholder_url: '' @@ -313,7 +320,7 @@ content: third_party_settings: { } su_event_sponsor: type: string_textfield - weight: 6 + weight: 10 region: content settings: size: 60 @@ -323,7 +330,7 @@ content: add_another: 'Add another sponsor' su_event_subheadline: type: string_textfield - weight: 4 + weight: 8 region: content settings: size: 60 @@ -331,7 +338,7 @@ content: third_party_settings: { } su_event_subject: type: readonly_field_widget - weight: 12 + weight: 17 region: content settings: label: above @@ -342,14 +349,14 @@ content: third_party_settings: { } su_event_telephone: type: telephone_default - weight: 28 + weight: 8 region: content settings: placeholder: '' third_party_settings: { } su_event_type: type: cshs - weight: 0 + weight: 14 region: content settings: save_lineage: false @@ -362,14 +369,14 @@ content: third_party_settings: { } su_sdss_custm_event_feat_media: type: media_library_widget - weight: 7 + weight: 11 region: content settings: media_types: { } third_party_settings: { } su_sdss_event_topics: type: cshs - weight: 1 + weight: 13 region: content settings: save_lineage: false @@ -382,7 +389,7 @@ content: third_party_settings: { } su_sdss_events_focal_areas: type: entity_reference_autocomplete - weight: 14 + weight: 19 region: content settings: match_operator: CONTAINS @@ -392,9 +399,16 @@ content: third_party_settings: change_labels: add_another: '' + su_sdss_featured: + type: boolean_checkbox + weight: 7 + region: content + settings: + display_label: true + third_party_settings: { } su_sdss_related_content: type: entity_reference_autocomplete - weight: 32 + weight: 20 region: content settings: match_operator: CONTAINS @@ -404,7 +418,7 @@ content: third_party_settings: { } su_shared_tags: type: cshs - weight: 10 + weight: 15 region: content settings: save_lineage: false @@ -417,7 +431,7 @@ content: third_party_settings: { } title: type: string_textfield - weight: 2 + weight: 0 region: content settings: size: 60 diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.default.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.default.yml index 04eb61105..58ee2d545 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.default.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.default.yml @@ -30,6 +30,7 @@ dependencies: - field.field.node.stanford_event.su_sdss_custm_event_feat_media - field.field.node.stanford_event.su_sdss_event_topics - field.field.node.stanford_event.su_sdss_events_focal_areas + - field.field.node.stanford_event.su_sdss_featured - field.field.node.stanford_event.su_sdss_related_content - field.field.node.stanford_event.su_shared_tags - node.type.stanford_event @@ -893,6 +894,16 @@ content: third_party_settings: { } weight: 120 region: main + su_sdss_featured: + type: boolean + label: above + settings: + format: default + format_custom_false: '' + format_custom_true: '' + third_party_settings: { } + weight: 122 + region: main su_sdss_related_content: type: entity_reference_label label: above diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml index eaead98d4..2fbdaf88e 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.search_indexing.yml @@ -30,6 +30,7 @@ dependencies: - field.field.node.stanford_event.su_sdss_custm_event_feat_media - field.field.node.stanford_event.su_sdss_event_topics - field.field.node.stanford_event.su_sdss_events_focal_areas + - field.field.node.stanford_event.su_sdss_featured - field.field.node.stanford_event.su_sdss_related_content - field.field.node.stanford_event.su_shared_tags - node.type.stanford_event @@ -217,5 +218,6 @@ hidden: su_sdss_custm_event_feat_media: true su_sdss_event_topics: true su_sdss_events_focal_areas: true + su_sdss_featured: true su_sdss_related_content: true su_shared_tags: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml index 2b5e7f603..17276368b 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.stanford_card.yml @@ -30,6 +30,7 @@ dependencies: - field.field.node.stanford_event.su_sdss_custm_event_feat_media - field.field.node.stanford_event.su_sdss_event_topics - field.field.node.stanford_event.su_sdss_events_focal_areas + - field.field.node.stanford_event.su_sdss_featured - field.field.node.stanford_event.su_sdss_related_content - field.field.node.stanford_event.su_shared_tags - node.type.stanford_event @@ -272,5 +273,6 @@ hidden: su_sdss_custm_event_feat_media: true su_sdss_event_topics: true su_sdss_events_focal_areas: true + su_sdss_featured: true su_sdss_related_content: true su_shared_tags: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.teaser.yml b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.teaser.yml index 698922faf..308b968c6 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.teaser.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/core.entity_view_display.node.stanford_event.teaser.yml @@ -30,6 +30,7 @@ dependencies: - field.field.node.stanford_event.su_sdss_custm_event_feat_media - field.field.node.stanford_event.su_sdss_event_topics - field.field.node.stanford_event.su_sdss_events_focal_areas + - field.field.node.stanford_event.su_sdss_featured - field.field.node.stanford_event.su_sdss_related_content - field.field.node.stanford_event.su_shared_tags - node.type.stanford_event @@ -282,5 +283,6 @@ hidden: su_sdss_custm_event_feat_media: true su_sdss_event_topics: true su_sdss_events_focal_areas: true + su_sdss_featured: true su_sdss_related_content: true su_shared_tags: true diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_event.su_sdss_featured.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_event.su_sdss_featured.yml new file mode 100644 index 000000000..0df605019 --- /dev/null +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.field.node.stanford_event.su_sdss_featured.yml @@ -0,0 +1,21 @@ +uuid: d42d3826-8475-44ba-92e8-c08b7897a656 +langcode: en +status: true +dependencies: + config: + - field.storage.node.su_sdss_featured + - node.type.stanford_event +id: node.stanford_event.su_sdss_featured +field_name: su_sdss_featured +entity_type: node +bundle: stanford_event +label: Featured +description: 'Feature this content in lists and feeds.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + on_label: Featured + off_label: 'Off' +field_type: boolean diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_featured.yml b/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_featured.yml new file mode 100644 index 000000000..944d20dad --- /dev/null +++ b/docroot/profiles/sdss/sdss_profile/config/sync/field.storage.node.su_sdss_featured.yml @@ -0,0 +1,18 @@ +uuid: bf7eb327-f6da-4490-b2f8-7f798ba5a41d +langcode: en +status: true +dependencies: + module: + - node +id: node.su_sdss_featured +field_name: su_sdss_featured +entity_type: node +type: boolean +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.events_this_week.yml b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.events_this_week.yml index bc80b93c7..13bd6628a 100644 --- a/docroot/profiles/sdss/sdss_profile/config/sync/views.view.events_this_week.yml +++ b/docroot/profiles/sdss/sdss_profile/config/sync/views.view.events_this_week.yml @@ -622,6 +622,44 @@ display: default_group: All default_group_multiple: { } group_items: { } + su_sdss_featured_value: + id: su_sdss_featured_value + table: node__su_sdss_featured + field: su_sdss_featured_value + relationship: none + group_type: group + admin_label: '' + plugin_id: boolean + operator: '=' + value: '0' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } style: type: default options: @@ -663,7 +701,7 @@ display: - 'config:field.storage.node.su_event_groups' feed_1: id: feed_1 - display_title: Feed + display_title: 'Non-Featured Events' display_plugin: feed position: 1 display_options: @@ -687,6 +725,7 @@ display: guid_field_options: guid_field: nid guid_field_is_permalink: true + display_description: '' display_extenders: { } path: rss/events-this-week cache_metadata: @@ -700,3 +739,210 @@ display: - 'config:field.storage.node.su_event_alt_loc' - 'config:field.storage.node.su_event_dek' - 'config:field.storage.node.su_event_groups' + feed_2: + id: feed_2 + display_title: 'Featured Events' + display_plugin: feed + position: 1 + display_options: + title: 'Featured Events This Week' + pager: + type: none + options: + offset: 0 + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + stanford_event: stanford_event + expose: + operator_limit_selection: false + operator_list: { } + su_event_date_time_value: + id: su_event_date_time_value + table: node__su_event_date_time + field: su_event_date_time_value + relationship: none + group_type: group + admin_label: '' + plugin_id: date + operator: '>=' + value: + min: '' + max: '' + value: today + type: date + granularity: second + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + min_placeholder: '' + max_placeholder: '' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + su_event_date_time_value_1: + id: su_event_date_time_value_1 + table: node__su_event_date_time + field: su_event_date_time_value + relationship: none + group_type: group + admin_label: '' + plugin_id: date + operator: '<=' + value: + min: '' + max: '' + value: '+8 days' + type: date + granularity: second + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + min_placeholder: '' + max_placeholder: '' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + su_sdss_featured_value: + id: su_sdss_featured_value + table: node__su_sdss_featured + field: su_sdss_featured_value + relationship: none + group_type: group + admin_label: '' + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + style: + type: rss + options: + grouping: { } + description: 'Events happening in the next week at the Stanford Doerr School of Sustainability.' + row: + type: rss_fields + options: + title_field: title + link_field: view_node + description_field: su_event_alt_loc + creator_field: su_event_groups + date_field: su_event_date_time_value + guid_field_options: + guid_field: nid + guid_field_is_permalink: true + defaults: + title: false + filters: false + filter_groups: false + sitename_title: false + display_description: '' + display_extenders: { } + path: rss/featured-events-this-week + sitename_title: false + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.node.su_event_alt_loc' + - 'config:field.storage.node.su_event_dek' + - 'config:field.storage.node.su_event_groups' diff --git a/docroot/profiles/sdss/sdss_profile/tests/codeception/acceptance/Content/EventsCest.php b/docroot/profiles/sdss/sdss_profile/tests/codeception/acceptance/Content/EventsCest.php index 1b15b5976..40c8fb1d4 100644 --- a/docroot/profiles/sdss/sdss_profile/tests/codeception/acceptance/Content/EventsCest.php +++ b/docroot/profiles/sdss/sdss_profile/tests/codeception/acceptance/Content/EventsCest.php @@ -341,18 +341,6 @@ public function testClone(AcceptanceTester $I) { $I->assertEquals(6, round($diff / (60 * 60 * 24 * 30.5))); } - public function testRelatedContent(AcceptanceTester $I){ - // A quick test to make sure it's only visible to administrators. - $I->logInWithRole('contributor'); - $I->amOnPage('/node/add/stanford_event'); - $I->cantSee('Related Content'); - $I->amOnPage('/user/logout'); - $I->runDrush('cr'); - $I->logInWithRole('administrator'); - $I->amOnPage('/node/add/stanford_event'); - $I->canSee('Related Content'); - } - /** * Test event card markup. *