diff --git a/conf/cmi/core.entity_form_display.paragraph.front_page_top_news.default.yml b/conf/cmi/core.entity_form_display.paragraph.front_page_top_news.default.yml new file mode 100644 index 000000000..5bf82852a --- /dev/null +++ b/conf/cmi/core.entity_form_display.paragraph.front_page_top_news.default.yml @@ -0,0 +1,21 @@ +uuid: cfd86644-8cdb-4471-80db-55aa01a84594 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.front_page_top_news.field_listing_type + - paragraphs.paragraphs_type.front_page_top_news +id: paragraph.front_page_top_news.default +targetEntityType: paragraph +bundle: front_page_top_news +mode: default +content: + field_listing_type: + type: options_select + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + created: true + status: true diff --git a/conf/cmi/core.entity_view_display.paragraph.front_page_top_news.default.yml b/conf/cmi/core.entity_view_display.paragraph.front_page_top_news.default.yml new file mode 100644 index 000000000..fd0a12656 --- /dev/null +++ b/conf/cmi/core.entity_view_display.paragraph.front_page_top_news.default.yml @@ -0,0 +1,23 @@ +uuid: 904b353d-e303-43af-86f2-97a925e62403 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.front_page_top_news.field_listing_type + - paragraphs.paragraphs_type.front_page_top_news + module: + - options +id: paragraph.front_page_top_news.default +targetEntityType: paragraph +bundle: front_page_top_news +mode: default +content: + field_listing_type: + type: list_key + label: hidden + settings: { } + third_party_settings: { } + weight: 0 + region: content +hidden: + search_api_excerpt: true diff --git a/conf/cmi/field.field.paragraph.front_page_top_news.field_listing_type.yml b/conf/cmi/field.field.paragraph.front_page_top_news.field_listing_type.yml new file mode 100644 index 000000000..7a40a6762 --- /dev/null +++ b/conf/cmi/field.field.paragraph.front_page_top_news.field_listing_type.yml @@ -0,0 +1,23 @@ +uuid: 5f81817f-94fd-4dd0-83a2-f1fb7358b4a5 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_listing_type + - paragraphs.paragraphs_type.front_page_top_news + module: + - options +id: paragraph.front_page_top_news.field_listing_type +field_name: field_listing_type +entity_type: paragraph +bundle: front_page_top_news +label: 'Listing type' +description: '' +required: true +translatable: false +default_value: + - + value: news +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/conf/cmi/field.storage.paragraph.field_listing_type.yml b/conf/cmi/field.storage.paragraph.field_listing_type.yml new file mode 100644 index 000000000..a9f417608 --- /dev/null +++ b/conf/cmi/field.storage.paragraph.field_listing_type.yml @@ -0,0 +1,27 @@ +uuid: c7a6b5b9-e4e3-4f74-be28-367ed760fe25 +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +id: paragraph.field_listing_type +field_name: field_listing_type +entity_type: paragraph +type: list_string +settings: + allowed_values: + - + value: news + label: News + - + value: articles + label: Articles + allowed_values_function: '' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/conf/cmi/helfi_api_base.features.yml b/conf/cmi/helfi_api_base.features.yml index 77ecbf4a5..2bc737c06 100644 --- a/conf/cmi/helfi_api_base.features.yml +++ b/conf/cmi/helfi_api_base.features.yml @@ -1,4 +1,4 @@ -disable_email_sending: true +logger: true disable_user_password: true +disable_email_sending: true user_expire: true -logger: true diff --git a/conf/cmi/language/fi/field.field.paragraph.front_page_top_news.field_listing_type.yml b/conf/cmi/language/fi/field.field.paragraph.front_page_top_news.field_listing_type.yml new file mode 100644 index 000000000..d95290554 --- /dev/null +++ b/conf/cmi/language/fi/field.field.paragraph.front_page_top_news.field_listing_type.yml @@ -0,0 +1 @@ +label: Uutistyyppi diff --git a/conf/cmi/language/fi/field.storage.paragraph.field_listing_type.yml b/conf/cmi/language/fi/field.storage.paragraph.field_listing_type.yml new file mode 100644 index 000000000..9a858cac4 --- /dev/null +++ b/conf/cmi/language/fi/field.storage.paragraph.field_listing_type.yml @@ -0,0 +1,6 @@ +settings: + allowed_values: + - + label: Uutiset + - + label: Artikkelit diff --git a/conf/cmi/views.view.frontpage_news.yml b/conf/cmi/views.view.frontpage_news.yml index 5172967b1..44374afb2 100644 --- a/conf/cmi/views.view.frontpage_news.yml +++ b/conf/cmi/views.view.frontpage_news.yml @@ -806,13 +806,13 @@ display: - user.permissions tags: - 'config:field.storage.node.field_main_image' - main_news: - id: main_news - display_title: 'Main news' + main_articles: + id: main_articles + display_title: 'Main articles' display_plugin: block position: 2 display_options: - title: 'Top news' + title: 'Main articles' fields: published_at: id: published_at @@ -1020,10 +1020,152 @@ display: label: '' field_identifier: '' exposed: false - draggable_views_reference: 'ordered_news_list:ordered_news' + draggable_views_reference: 'ordered_news_articles_list:ordered_news_articles' draggable_views_null_order: after draggable_views_pass_arguments: false arguments: { } + 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 + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: bundle + operator: in + value: + news_article: news_article + 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 + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + promote: + id: promote + table: node_field_data + field: promote + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: promote + 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: { } + langcode: + id: langcode + table: node_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: langcode + plugin_id: language + operator: in + value: + '***LANGUAGE_language_content***': '***LANGUAGE_language_content***' + 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 + reduce: false + 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: default options: @@ -1042,9 +1184,11 @@ display: fields: false sorts: false arguments: false + filters: false + filter_groups: false display_description: '' display_extenders: { } - block_description: 'Main news' + block_description: main_articles cache_metadata: max-age: -1 contexts: @@ -1054,13 +1198,13 @@ display: - user.permissions tags: - 'config:field.storage.node.field_main_image' - main_news_articles: - id: main_news_articles - display_title: 'Main news articles' + main_news: + id: main_news + display_title: 'Main news' display_plugin: block position: 2 display_options: - title: 'Top news articles' + title: 'Top news' fields: published_at: id: published_at @@ -1272,148 +1416,6 @@ display: draggable_views_null_order: after draggable_views_pass_arguments: false arguments: { } - 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 - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: type - plugin_id: bundle - operator: in - value: - news_article: news_article - 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 - reduce: false - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - promote: - id: promote - table: node_field_data - field: promote - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: promote - 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: { } - langcode: - id: langcode - table: node_field_data - field: langcode - relationship: none - group_type: group - admin_label: '' - entity_type: node - entity_field: langcode - plugin_id: language - operator: in - value: - '***LANGUAGE_language_content***': '***LANGUAGE_language_content***' - 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 - reduce: false - 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: default options: @@ -1424,7 +1426,7 @@ display: type: 'entity:node' options: relationship: none - view_mode: card_teaser + view_mode: medium_teaser defaults: title: false style: false @@ -1432,11 +1434,9 @@ display: fields: false sorts: false arguments: false - filters: false - filter_groups: false display_description: '' display_extenders: { } - block_description: 'Main news articles' + block_description: 'Main news' cache_metadata: max-age: -1 contexts: diff --git a/public/modules/custom/helfi_etusivu/helfi_etusivu.module b/public/modules/custom/helfi_etusivu/helfi_etusivu.module index d94b30d93..31c5ee4e3 100644 --- a/public/modules/custom/helfi_etusivu/helfi_etusivu.module +++ b/public/modules/custom/helfi_etusivu/helfi_etusivu.module @@ -15,8 +15,8 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\helfi_annif\TextConverter\Document; use Drupal\helfi_platform_config\DTO\ParagraphTypeCollection; -use Drupal\paragraphs\ParagraphInterface; use Drupal\node\NodeInterface; +use Drupal\paragraphs\ParagraphInterface; use Drupal\views\Plugin\views\query\QueryPluginBase; use Drupal\views\Plugin\views\query\Sql; use Drupal\views\ViewExecutable; diff --git a/public/modules/custom/helfi_etusivu/src/Plugin/Block/EtusivuLocalTasksBlock.php b/public/modules/custom/helfi_etusivu/src/Plugin/Block/EtusivuLocalTasksBlock.php index 1c362413f..826002cd9 100644 --- a/public/modules/custom/helfi_etusivu/src/Plugin/Block/EtusivuLocalTasksBlock.php +++ b/public/modules/custom/helfi_etusivu/src/Plugin/Block/EtusivuLocalTasksBlock.php @@ -1,5 +1,7 @@ + {% for row in rows %} +
  • + {{- row.content -}} +
  • + {% endfor %} + diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--frontpage-news--main-news.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--frontpage-news--main-news.html.twig index c4702b6ea..42edc24ac 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--frontpage-news--main-news.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view-unformatted--frontpage-news--main-news.html.twig @@ -1,4 +1,4 @@ -