diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..e3708ede --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git/ +.github/ +.idea/ +*.sql diff --git a/compose.yaml b/compose.yaml index cdf6ca7d..0e64d1db 100644 --- a/compose.yaml +++ b/compose.yaml @@ -87,8 +87,6 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.tls=true" - "traefik.http.services.${COMPOSE_PROJECT_NAME}-varnish.loadbalancer.server.port=6081" - "traefik.docker.network=stonehenge-network" - profiles: - - varnish elastic-proxy: container_name: "${COMPOSE_PROJECT_NAME}-elastic-proxy" image: nginxinc/nginx-unprivileged:alpine-perl diff --git a/composer.lock b/composer.lock index d1147164..13a641df 100644 --- a/composer.lock +++ b/composer.lock @@ -4253,16 +4253,16 @@ }, { "name": "drupal/hdbt", - "version": "6.8.17", + "version": "6.8.21", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "063e0c51a83860dc872b9c7f9528f5d29824d5d8" + "reference": "cd8b74a7afc7ec488979a426809e5386383a3bef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/063e0c51a83860dc872b9c7f9528f5d29824d5d8", - "reference": "063e0c51a83860dc872b9c7f9528f5d29824d5d8", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/cd8b74a7afc7ec488979a426809e5386383a3bef", + "reference": "cd8b74a7afc7ec488979a426809e5386383a3bef", "shasum": "" }, "require": { @@ -4281,10 +4281,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.17", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.21", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2024-12-09T14:01:58+00:00" + "time": "2024-12-13T08:38:26+00:00" }, { "name": "drupal/hdbt_admin", @@ -4480,12 +4480,12 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "2abe26c3735150f630dd1203c3e60a77173d90fd" + "reference": "845a8c470a6f593b08e100f3c3d688fb07600f76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/2abe26c3735150f630dd1203c3e60a77173d90fd", - "reference": "2abe26c3735150f630dd1203c3e60a77173d90fd", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/845a8c470a6f593b08e100f3c3d688fb07600f76", + "reference": "845a8c470a6f593b08e100f3c3d688fb07600f76", "shasum": "" }, "require": { @@ -4560,7 +4560,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2024-12-03T06:30:07+00:00" + "time": "2024-12-12T12:14:31+00:00" }, { "name": "drupal/helfi_navigation", @@ -4598,16 +4598,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.10.0", + "version": "4.10.3", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "ba094b39d6a02da3f2f9085c47d3326509eb7caa" + "reference": "f2d8dc24500044936ea6dba39134d1d2eaf710db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/ba094b39d6a02da3f2f9085c47d3326509eb7caa", - "reference": "ba094b39d6a02da3f2f9085c47d3326509eb7caa", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/f2d8dc24500044936ea6dba39134d1d2eaf710db", + "reference": "f2d8dc24500044936ea6dba39134d1d2eaf710db", "shasum": "" }, "require": { @@ -4733,10 +4733,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.10.0", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.10.3", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2024-12-10T11:12:36+00:00" + "time": "2024-12-13T08:38:18+00:00" }, { "name": "drupal/helfi_proxy", @@ -6219,29 +6219,29 @@ }, { "name": "drupal/openid_connect", - "version": "3.0.0-alpha3", + "version": "3.0.0-alpha4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/openid_connect.git", - "reference": "3.0.0-alpha3" + "reference": "3.0.0-alpha4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/openid_connect-3.0.0-alpha3.zip", - "reference": "3.0.0-alpha3", - "shasum": "002616dc2bfeb6b23204297e77d1f7a5369e69b3" + "url": "https://ftp.drupal.org/files/projects/openid_connect-3.0.0-alpha4.zip", + "reference": "3.0.0-alpha4", + "shasum": "3239f8a2e5fc98de1be7561309cb12153ef5b7c9" }, "require": { - "drupal/core": "^9.3 || ^10", + "drupal/core": "^9.5 || ^10.2 || ^11", "drupal/externalauth": "^2.0", "ext-json": "*", - "php": ">=7.1.0" + "php": ">=8.1.0" }, "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.0-alpha3", - "datestamp": "1710708951", + "version": "3.0.0-alpha4", + "datestamp": "1734043889", "security-coverage": { "status": "not-covered", "message": "Alpha releases are not covered by Drupal security advisories." @@ -6261,6 +6261,10 @@ "name": "jcnventura", "homepage": "https://www.drupal.org/user/122464" }, + { + "name": "mstrelan", + "homepage": "https://www.drupal.org/user/314289" + }, { "name": "pfrilling", "homepage": "https://www.drupal.org/user/169695" @@ -13836,8 +13840,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -14002,8 +14006,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -15435,16 +15439,16 @@ }, { "name": "twig/twig", - "version": "v3.16.0", + "version": "v3.17.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561" + "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/677ef8da6497a03048192aeeb5aa3018e379ac71", + "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71", "shasum": "" }, "require": { @@ -15499,7 +15503,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.16.0" + "source": "https://github.com/twigphp/Twig/tree/v3.17.1" }, "funding": [ { @@ -15511,7 +15515,7 @@ "type": "tidelift" } ], - "time": "2024-11-29T08:27:05+00:00" + "time": "2024-12-12T09:58:10+00:00" }, { "name": "twistor/flysystem-stream-wrapper", diff --git a/conf/cmi/core.entity_form_display.node.news_item.default.yml b/conf/cmi/core.entity_form_display.node.news_item.default.yml index b189ba6d..2dce2f29 100644 --- a/conf/cmi/core.entity_form_display.node.news_item.default.yml +++ b/conf/cmi/core.entity_form_display.node.news_item.default.yml @@ -168,6 +168,16 @@ content: rows: 5 placeholder: '' third_party_settings: { } + field_news_groups: + type: select2_entity_reference + weight: 25 + region: content + settings: + width: 100% + autocomplete: false + match_operator: CONTAINS + match_limit: 10 + third_party_settings: { } field_news_item_links_link: type: linkit weight: 20 @@ -196,6 +206,42 @@ content: match_operator: CONTAINS match_limit: 10 third_party_settings: { } + field_news_item_updating_news: + type: paragraphs + weight: 17 + region: content + settings: + title: Paragraph + title_plural: Paragraphs + edit_mode: open + closed_mode: summary + autocollapse: none + closed_mode_threshold: 0 + add_mode: dropdown + form_display_mode: default + default_paragraph_type: _none + features: + add_above: '0' + collapse_edit_all: '0' + convert: '0' + duplicate: '0' + third_party_settings: { } + field_news_neighbourhoods: + type: select2_entity_reference + weight: 27 + region: content + settings: + width: 100% + autocomplete: false + match_operator: CONTAINS + match_limit: 10 + third_party_settings: { } + field_radioactivity: + type: radioactivity_reference + weight: 28 + region: content + settings: { } + third_party_settings: { } field_short_title: type: string_textfield weight: 2 @@ -204,6 +250,13 @@ content: size: 60 placeholder: '' third_party_settings: { } + in_recommendations: + type: boolean_checkbox + weight: 0 + region: content + settings: + display_label: true + third_party_settings: { } langcode: type: language_select weight: 0 @@ -241,6 +294,20 @@ content: region: content settings: { } third_party_settings: { } + show_annif_block: + type: boolean_checkbox + weight: 1 + region: content + settings: + display_label: true + third_party_settings: { } + show_recommendations: + type: boolean_checkbox + weight: 0 + region: content + settings: + display_label: true + third_party_settings: { } simple_sitemap: weight: 10 region: content @@ -294,72 +361,5 @@ content: region: content settings: { } third_party_settings: { } - field_news_item_updating_news: - type: paragraphs - weight: 17 - region: content - settings: - title: Paragraph - title_plural: Paragraphs - edit_mode: open - closed_mode: summary - autocollapse: none - closed_mode_threshold: 0 - add_mode: dropdown - form_display_mode: default - default_paragraph_type: _none - features: - add_above: '0' - collapse_edit_all: '0' - convert: '0' - duplicate: '0' - third_party_settings: { } - field_news_groups: - type: select2_entity_reference - weight: 25 - region: content - settings: - width: 100% - autocomplete: false - match_operator: CONTAINS - match_limit: 10 - third_party_settings: { } - field_news_neighbourhoods: - type: select2_entity_reference - weight: 27 - region: content - settings: - width: 100% - autocomplete: false - match_operator: CONTAINS - match_limit: 10 - third_party_settings: { } - field_radioactivity: - type: radioactivity_reference - weight: 28 - region: content - settings: { } - third_party_settings: { } - in_recommendations: - type: boolean_checkbox - weight: 0 - region: content - settings: - display_label: true - third_party_settings: { } - show_annif_block: - type: boolean_checkbox - weight: 1 - region: content - settings: - display_label: true - third_party_settings: { } - show_recommendations: - type: boolean_checkbox - weight: 0 - region: content - settings: - display_label: true - third_party_settings: { } hidden: hide_sidebar_navigation: true diff --git a/conf/cmi/core.entity_view_display.node.news_item.card_teaser.yml b/conf/cmi/core.entity_view_display.node.news_item.card_teaser.yml index f0f1f3d5..188d5b0e 100644 --- a/conf/cmi/core.entity_view_display.node.news_item.card_teaser.yml +++ b/conf/cmi/core.entity_view_display.node.news_item.card_teaser.yml @@ -77,6 +77,7 @@ content: weight: 4 region: content hidden: + field_annif_keywords: true field_content: true field_lead_in: true field_main_image_caption: true @@ -91,4 +92,3 @@ hidden: search_api_excerpt: true show_annif_block: true toc_enabled: true - field_annif_keywords: true diff --git a/conf/cmi/core.entity_view_display.node.news_item.default.yml b/conf/cmi/core.entity_view_display.node.news_item.default.yml index 82f17edc..fad36202 100644 --- a/conf/cmi/core.entity_view_display.node.news_item.default.yml +++ b/conf/cmi/core.entity_view_display.node.news_item.default.yml @@ -61,6 +61,14 @@ content: third_party_settings: { } weight: 8 region: content + field_news_groups: + type: entity_reference_label + label: above + settings: + link: false + third_party_settings: { } + weight: 10 + region: content field_news_item_links_link: type: link label: hidden @@ -81,6 +89,41 @@ content: third_party_settings: { } weight: 6 region: content + field_news_item_tags: + type: entity_reference_label + label: above + settings: + link: false + third_party_settings: { } + weight: 11 + region: content + field_news_item_updating_news: + type: entity_reference_revisions_entity_view + label: above + settings: + view_mode: default + link: '' + third_party_settings: { } + weight: 13 + region: content + field_news_neighbourhoods: + type: entity_reference_label + label: above + settings: + link: false + third_party_settings: { } + weight: 12 + region: content + field_radioactivity: + type: radioactivity_reference_emitter + label: above + settings: + energy: 10.0 + display: false + decimals: 0.0 + third_party_settings: { } + weight: 9 + region: content field_short_title: type: string label: hidden @@ -113,49 +156,6 @@ content: third_party_settings: { } weight: 3 region: content - field_news_groups: - type: entity_reference_label - label: above - settings: - link: false - third_party_settings: { } - weight: 10 - region: content - field_news_item_tags: - type: entity_reference_label - label: above - settings: - link: false - third_party_settings: { } - weight: 11 - region: content - field_news_neighbourhoods: - type: entity_reference_label - label: above - settings: - link: false - third_party_settings: { } - weight: 12 - region: content - field_news_item_updating_news: - type: entity_reference_revisions_entity_view - label: above - settings: - view_mode: default - link: '' - third_party_settings: { } - weight: 13 - region: content - field_radioactivity: - type: radioactivity_reference_emitter - label: above - settings: - energy: 10.0 - display: false - decimals: 0.0 - third_party_settings: { } - weight: 9 - region: content hidden: field_news_groups: true field_news_item_tags: true diff --git a/conf/cmi/core.entity_view_display.paragraph.hearings.default.yml b/conf/cmi/core.entity_view_display.paragraph.hearings.default.yml index 0f5cd3de..3b10323a 100644 --- a/conf/cmi/core.entity_view_display.paragraph.hearings.default.yml +++ b/conf/cmi/core.entity_view_display.paragraph.hearings.default.yml @@ -31,9 +31,9 @@ content: weight: 0 region: content list: - weight: 100 settings: { } third_party_settings: { } + weight: 100 region: content hidden: search_api_excerpt: true diff --git a/conf/cmi/external_entities.external_entity_type.helfi_hearings.yml b/conf/cmi/external_entities.external_entity_type.helfi_hearings.yml index 3134f238..c8279899 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_hearings.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_hearings.yml @@ -8,8 +8,8 @@ id: helfi_hearings label: 'Helfi: Hearing' label_plural: 'Helfi: Hearing' description: 'Helfi hearings from hearing api.' -generate_aliases: false read_only: true +generate_aliases: false field_mapper_id: jsonpath field_mapper_config: field_mappings: diff --git a/conf/cmi/field.storage.node.field_news_item_links_title.yml b/conf/cmi/field.storage.node.field_news_item_links_title.yml index 2d41142f..91705393 100644 --- a/conf/cmi/field.storage.node.field_news_item_links_title.yml +++ b/conf/cmi/field.storage.node.field_news_item_links_title.yml @@ -12,8 +12,8 @@ entity_type: node type: string settings: max_length: 255 - is_ascii: false case_sensitive: false + is_ascii: false module: core locked: false cardinality: 1 diff --git a/conf/cmi/field.storage.node.field_short_title.yml b/conf/cmi/field.storage.node.field_short_title.yml index f953c0a9..72f2a19f 100644 --- a/conf/cmi/field.storage.node.field_short_title.yml +++ b/conf/cmi/field.storage.node.field_short_title.yml @@ -12,8 +12,8 @@ entity_type: node type: string settings: max_length: 255 - is_ascii: false case_sensitive: false + is_ascii: false module: core locked: false cardinality: 1 diff --git a/conf/cmi/language/ar/views.view.helfi_redirect.yml b/conf/cmi/language/ar/views.view.helfi_redirect.yml new file mode 100644 index 00000000..0702d8f5 --- /dev/null +++ b/conf/cmi/language/ar/views.view.helfi_redirect.yml @@ -0,0 +1,45 @@ +display: + default: + display_title: الرئيسي + display_options: + fields: + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: 'التالية ›' + previous: '‹ السابقة' + first: '« الأولى' + last: 'الأخيرة »' + expose: + items_per_page_options_all_label: '- All -' + offset_label: Offset + exposed_form: + options: + submit_button: انتقاء + reset_button_label: 'إعادة الضبط' + exposed_sorts_label: 'الترتيب حسب' + sort_asc_label: تصاعدي + sort_desc_label: تنازلي + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + is_custom: + expose: + label: Custom + status: + expose: + label: منشور + page_1: + display_title: Page diff --git a/conf/cmi/language/de/views.view.helfi_redirect.yml b/conf/cmi/language/de/views.view.helfi_redirect.yml new file mode 100644 index 00000000..6c858a4f --- /dev/null +++ b/conf/cmi/language/de/views.view.helfi_redirect.yml @@ -0,0 +1,80 @@ +label: Redirect +description: 'List of redirects' +display: + default: + display_title: Master + display_options: + title: Redirect + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: 'nächste Seite ›' + previous: '‹ vorherige Seite' + first: '« erste Seite' + last: 'letzte Seite »' + expose: + items_per_page_label: 'Elemente pro Seite' + items_per_page_options_all_label: '- Alle -' + offset_label: Versatz + exposed_form: + options: + submit_button: Filter + reset_button_label: Zurücksetzen + exposed_sorts_label: Sortierung + sort_asc_label: Aufsteigend + sort_desc_label: Absteigend + empty: + area_text_custom: + content: 'There is no redirect yet.' + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + status_code: + expose: + label: 'Status code' + group_info: + label: 'Status code' + group_items: + 1: + title: '300 Multiple Choices' + 2: + title: '301 Moved Permanently' + 3: + title: '302 Found' + 4: + title: '303 See Other' + 5: + title: '304 Not Modified' + 6: + title: '305 Use Proxy' + 7: + title: '307 Temporary Redirect' + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: Veröffentlicht + page_1: + display_title: Seite + display_options: + menu: + title: Redirect diff --git a/conf/cmi/language/es/views.view.helfi_redirect.yml b/conf/cmi/language/es/views.view.helfi_redirect.yml new file mode 100644 index 00000000..06fae2b6 --- /dev/null +++ b/conf/cmi/language/es/views.view.helfi_redirect.yml @@ -0,0 +1,80 @@ +label: Redirección +description: 'List of redirects' +display: + default: + display_title: Máster + display_options: + title: Redirección + fields: + redirect_bulk_form: + action_title: 'Con selección' + redirect_source__path: + label: Desde + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Creado + pager: + options: + tags: + next: 'siguiente ›' + previous: '‹ anterior' + first: '« primero' + last: 'último »' + expose: + items_per_page_label: 'Elementos por página' + items_per_page_options_all_label: '- Todo -' + offset_label: Desplazamiento + exposed_form: + options: + submit_button: Filtro + reset_button_label: Restablecer + exposed_sorts_label: 'Ordenar por' + sort_asc_label: Asc + sort_desc_label: Desc + empty: + area_text_custom: + content: 'There is no redirect yet.' + filters: + redirect_source__path: + expose: + label: Desde + redirect_redirect__uri: + expose: + label: Para + status_code: + expose: + label: 'Status code' + group_info: + label: 'Status code' + group_items: + 1: + title: '300 Múltiples posibilidades' + 2: + title: '301 Movido permanentemente' + 3: + title: '302 Encontrado' + 4: + title: '303 Ver otra ubicación' + 5: + title: '304 No modificado' + 6: + title: '305 Usar proxy' + 7: + title: '307 Redirección temporal' + language: + expose: + label: 'Lenguaje original' + is_custom: + expose: + label: Custom + status: + expose: + label: Publicado + page_1: + display_title: Página + display_options: + menu: + title: Redirección diff --git a/conf/cmi/language/et/views.view.helfi_redirect.yml b/conf/cmi/language/et/views.view.helfi_redirect.yml new file mode 100644 index 00000000..2817307c --- /dev/null +++ b/conf/cmi/language/et/views.view.helfi_redirect.yml @@ -0,0 +1,54 @@ +label: Redirect +display: + default: + display_title: Peamine + display_options: + title: Redirect + fields: + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: 'järgmine ›' + previous: '‹ eelmine' + first: '« esimene' + last: 'viimane »' + expose: + items_per_page_label: 'Kirjeid lehel' + items_per_page_options_all_label: '- Kõik -' + offset_label: Nihe + exposed_form: + options: + submit_button: Filtreeri + reset_button_label: Tühista + exposed_sorts_label: 'Sorteerimise alus' + sort_asc_label: Kasvav + sort_desc_label: Kahanev + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: Avaldatud + page_1: + display_title: Lehekülg + display_options: + menu: + title: Redirect diff --git a/conf/cmi/language/fa/views.view.helfi_redirect.yml b/conf/cmi/language/fa/views.view.helfi_redirect.yml new file mode 100644 index 00000000..860ef7af --- /dev/null +++ b/conf/cmi/language/fa/views.view.helfi_redirect.yml @@ -0,0 +1,46 @@ +display: + default: + display_title: مدیر + display_options: + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + is_custom: + label: Custom + created: + label: Created + pager: + options: + tags: + next: 'بعدی ›' + previous: '‹ قبلی' + first: '« ابتدا' + last: 'انتها »' + expose: + items_per_page_label: 'آیتم‌ها در هر صفحه' + items_per_page_options_all_label: '- همه -' + offset_label: جابجایی + exposed_form: + options: + submit_button: فیلتر + reset_button_label: بازنشانی + exposed_sorts_label: 'مرتب کن بر اساس' + sort_asc_label: صعودی + sort_desc_label: نزولی + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + is_custom: + expose: + label: Custom + status: + expose: + label: 'منتشر شده' + page_1: + display_title: صفحه diff --git a/conf/cmi/language/fi/views.view.helfi_redirect.yml b/conf/cmi/language/fi/views.view.helfi_redirect.yml index 78822a3c..039970d4 100644 --- a/conf/cmi/language/fi/views.view.helfi_redirect.yml +++ b/conf/cmi/language/fi/views.view.helfi_redirect.yml @@ -5,20 +5,20 @@ display: status_code: group_info: group_items: - 7: - title: '300 Multiple Choices' 1: - title: '300 Multiple Choices' + title: '300 Useita valintoja' 2: - title: '301 Moved Permanently' + title: '301 Pysyvästi siirretty' 3: - title: '302 Found' + title: '302 Löydetty' 4: - title: '303 See Other' + title: '303 Kts. toinen' 5: - title: '304 Not Modified' + title: '304 Muuttamaton' 6: - title: '305 Use Proxy' + title: '305 Käytä proxyä' + 7: + title: '307 Tilapäinen uudelleenohjaus' label: Tilakoodi expose: label: Tilakoodi @@ -34,6 +34,9 @@ display: is_custom: expose: label: 'Käyttäjän luoma' + status: + expose: + label: Julkaistu exposed_form: options: submit_button: Suodata @@ -48,10 +51,10 @@ display: items_per_page_options_all_label: '- Kaikki -' offset_label: Offset tags: - next: 'next ›' - previous: '‹ previous' - first: '« first' - last: 'last »' + previous: '‹ edellinen' + next: 'seuraava ›' + first: '« ensimmäinen' + last: 'viimeinen »' fields: redirect_bulk_form: action_title: Valinnalla @@ -63,6 +66,9 @@ display: is_custom: label: 'Käyttäjän luoma' separator: ', ' + status: + label: Julkaistu + separator: ', ' empty: area_text_custom: content: 'Ei ole vielä uudelleenohjaksia.' diff --git a/conf/cmi/language/fi/views.view.redirect.yml b/conf/cmi/language/fi/views.view.redirect.yml index f6db234f..33a42fd6 100644 --- a/conf/cmi/language/fi/views.view.redirect.yml +++ b/conf/cmi/language/fi/views.view.redirect.yml @@ -6,19 +6,19 @@ display: group_info: group_items: 7: - title: '300 Multiple Choices' + title: '307 Tilapäinen uudelleenohjaus' 1: - title: '300 Multiple Choices' + title: '300 Useita valintoja' 2: - title: '301 Moved Permanently' + title: '301 Pysyvästi siirretty' 3: - title: '302 Found' + title: '302 Löydetty' 4: - title: '303 See Other' + title: '303 Kts. toinen' 5: - title: '304 Not Modified' + title: '304 Muuttamaton' 6: - title: '305 Use Proxy' + title: '305 Käytä proxyä' label: Tilakoodi expose: label: Tilakoodi @@ -41,10 +41,10 @@ display: pager: options: tags: - previous: '‹ previous' - next: 'next ›' - first: '« first' - last: 'last »' + previous: '‹ edellinen' + next: 'seuraava ›' + first: '« ensimmäinen' + last: 'viimeinen »' expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml b/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml index db5a883f..2f57f70a 100644 --- a/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml +++ b/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml @@ -63,10 +63,10 @@ display: pager: options: tags: - previous: '‹ previous' - next: 'next ›' - first: '« first' - last: 'last »' + previous: '‹ edellinen' + next: 'seuraava ›' + first: '« ensimmäinen' + last: 'viimeinen »' display_title: Oletus overview: display_options: diff --git a/conf/cmi/language/fr/views.view.helfi_redirect.yml b/conf/cmi/language/fr/views.view.helfi_redirect.yml new file mode 100644 index 00000000..a8f12908 --- /dev/null +++ b/conf/cmi/language/fr/views.view.helfi_redirect.yml @@ -0,0 +1,80 @@ +label: Redirect +description: 'List of redirects' +display: + default: + display_title: Maître + display_options: + title: Redirect + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: "suivant\_›" + previous: "‹\_précédent" + first: "«\_premier" + last: "dernier\_»" + expose: + items_per_page_label: 'Éléments par page' + items_per_page_options_all_label: '- Tout -' + offset_label: Décalage + exposed_form: + options: + submit_button: Filtrer + reset_button_label: Réinitialiser + exposed_sorts_label: 'Trier par' + sort_asc_label: Asc + sort_desc_label: Desc + empty: + area_text_custom: + content: 'There is no redirect yet.' + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + status_code: + expose: + label: 'Status code' + group_info: + label: 'Status code' + group_items: + 1: + title: '300 Multiple Choices' + 2: + title: '301 Moved Permanently' + 3: + title: '302 Found' + 4: + title: '303 See Other' + 5: + title: '304 Not Modified' + 6: + title: '305 Use Proxy' + 7: + title: '307 Temporary Redirect' + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: Publié + page_1: + display_title: Page + display_options: + menu: + title: Redirect diff --git a/conf/cmi/language/ru/views.view.helfi_redirect.yml b/conf/cmi/language/ru/views.view.helfi_redirect.yml new file mode 100644 index 00000000..f25e09ae --- /dev/null +++ b/conf/cmi/language/ru/views.view.helfi_redirect.yml @@ -0,0 +1,79 @@ +label: Redirect +display: + default: + display_title: Основной + display_options: + title: Redirect + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: 'следующая ›' + previous: '‹ предыдущая' + first: '« первая' + last: 'последняя »' + expose: + items_per_page_label: 'Элементов на страницу' + items_per_page_options_all_label: '- Все -' + offset_label: Пропустить + exposed_form: + options: + submit_button: Фильтр + reset_button_label: Сбросить + exposed_sorts_label: 'Сортировать по' + sort_asc_label: 'По возрастанию' + sort_desc_label: 'По убыванию' + empty: + area_text_custom: + content: 'There is no redirect yet.' + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + status_code: + expose: + label: 'Status code' + group_info: + label: 'Status code' + group_items: + 1: + title: '300 Multiple Choices' + 2: + title: '301 Moved Permanently' + 3: + title: '302 Found' + 4: + title: '303 See Other' + 5: + title: '304 Not Modified' + 6: + title: '305 Use Proxy' + 7: + title: '307 Temporary Redirect' + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: Опубликовано + page_1: + display_title: Страница + display_options: + menu: + title: Redirect diff --git a/conf/cmi/language/se/views.view.helfi_redirect.yml b/conf/cmi/language/se/views.view.helfi_redirect.yml new file mode 100644 index 00000000..2af15b1c --- /dev/null +++ b/conf/cmi/language/se/views.view.helfi_redirect.yml @@ -0,0 +1,23 @@ +display: + default: + display_title: Default + display_options: + fields: + created: + label: Almmuhuvvon + pager: + options: + tags: + next: 'boahtte ›' + previous: '‹ ovddit' + first: '« vuosttaš' + last: 'maŋemuš »' + exposed_form: + options: + exposed_sorts_label: Sirre + filters: + status: + expose: + label: Almmuhuvvon + page_1: + display_title: Siidu diff --git a/conf/cmi/language/sv/views.view.helfi_redirect.yml b/conf/cmi/language/sv/views.view.helfi_redirect.yml index aef24d5d..08b9bf6d 100644 --- a/conf/cmi/language/sv/views.view.helfi_redirect.yml +++ b/conf/cmi/language/sv/views.view.helfi_redirect.yml @@ -16,6 +16,9 @@ display: separator: ', ' created: label: Skapad + status: + label: Publicerad + separator: ', ' pager: options: tags: @@ -58,6 +61,9 @@ display: is_custom: expose: label: Anpassad + status: + expose: + label: Publicerad page_1: display_title: Sida display_options: diff --git a/conf/cmi/language/uk/views.view.helfi_redirect.yml b/conf/cmi/language/uk/views.view.helfi_redirect.yml new file mode 100644 index 00000000..4c807d5f --- /dev/null +++ b/conf/cmi/language/uk/views.view.helfi_redirect.yml @@ -0,0 +1,76 @@ +label: Redirect +display: + default: + display_title: Головне + display_options: + title: Redirect + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: 'наступна ›' + previous: '‹ попередня' + first: '« перша' + last: 'остання »' + expose: + items_per_page_label: 'Елементів на сторінку' + items_per_page_options_all_label: '- Усе -' + offset_label: Зміщення + exposed_form: + options: + submit_button: Фільтр + reset_button_label: Скинути + exposed_sorts_label: 'Впорядкувати за' + sort_asc_label: Зрост + sort_desc_label: Спад + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + status_code: + expose: + label: 'Status code' + group_info: + label: 'Status code' + group_items: + 1: + title: '300 Multiple Choices' + 2: + title: '301 Moved Permanently' + 3: + title: '302 Found' + 4: + title: '303 See Other' + 5: + title: '304 Not Modified' + 6: + title: '305 Use Proxy' + 7: + title: '307 Temporary Redirect' + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: Опубліковано + page_1: + display_title: Сторінка + display_options: + menu: + title: Redirect diff --git a/conf/cmi/language/zh-hans/views.view.helfi_redirect.yml b/conf/cmi/language/zh-hans/views.view.helfi_redirect.yml new file mode 100644 index 00000000..bdcf0b0a --- /dev/null +++ b/conf/cmi/language/zh-hans/views.view.helfi_redirect.yml @@ -0,0 +1,73 @@ +label: Redirect +display: + default: + display_title: 主 + display_options: + title: Redirect + fields: + redirect_bulk_form: + action_title: 'With selection' + redirect_source__path: + label: From + separator: ', ' + is_custom: + label: Custom + separator: ', ' + created: + label: Created + pager: + options: + tags: + next: '下一页 ›' + previous: '‹ 上一页' + first: '« 第一页' + last: '末页 »' + expose: + items_per_page_label: 每页条目数 + items_per_page_options_all_label: '- 全部 -' + offset_label: 偏移量 + exposed_form: + options: + submit_button: 过滤 + reset_button_label: 重置 + exposed_sorts_label: 排序依据 + sort_asc_label: 升序 + sort_desc_label: 降序 + filters: + redirect_source__path: + expose: + label: From + redirect_redirect__uri: + expose: + label: To + status_code: + group_info: + group_items: + 1: + title: '300 Multiple Choices' + 2: + title: '301 Moved Permanently' + 3: + title: '302 Found' + 4: + title: '303 See Other' + 5: + title: '304 Not Modified' + 6: + title: '305 Use Proxy' + 7: + title: '307 Temporary Redirect' + language: + expose: + label: 'Original language' + is_custom: + expose: + label: Custom + status: + expose: + label: 已发布 + page_1: + display_title: 页面 + display_options: + menu: + title: Redirect diff --git a/conf/cmi/views.view.helfi_redirect.yml b/conf/cmi/views.view.helfi_redirect.yml index a3f968da..cb34781c 100644 --- a/conf/cmi/views.view.helfi_redirect.yml +++ b/conf/cmi/views.view.helfi_redirect.yml @@ -9,7 +9,7 @@ dependencies: - redirect - user _core: - default_config_hash: h9PYX1gxwmkwfgZUv0BJ_Js6-woWmUbyPSK0INlm538 + default_config_hash: T8ZZY-2rwfH9QPXho30lLjOnPsWsLzhy6YGOTix228k id: helfi_redirect label: Redirect module: views @@ -224,6 +224,73 @@ display: multi_type: separator separator: ', ' field_api_classes: false + status: + id: status + table: redirect + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: redirect + entity_field: status + plugin_id: field + label: Published + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: default + format_custom_false: '' + format_custom_true: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false language: id: language table: redirect @@ -631,14 +698,14 @@ display: exposed: true expose: operator_id: '' - label: Julkaistu + label: Published description: '' use_operator: false operator: status_op operator_limit_selection: false operator_list: { } identifier: status - required: true + required: false remember: false multiple: false remember_roles: @@ -675,14 +742,22 @@ display: row_class: '' default_row_class: true columns: + redirect_bulk_form: redirect_bulk_form redirect_source__path: redirect_source__path redirect_redirect__uri: redirect_redirect__uri status_code: status_code + is_custom: is_custom + status: status language: language created: created operations: operations default: created info: + redirect_bulk_form: + align: '' + separator: '' + empty_column: false + responsive: '' redirect_source__path: sortable: true default_sort_order: asc @@ -704,6 +779,20 @@ display: separator: '' empty_column: false responsive: '' + is_custom: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + status: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' language: sortable: true default_sort_order: asc @@ -719,8 +808,6 @@ display: empty_column: false responsive: '' operations: - sortable: false - default_sort_order: asc align: '' separator: '' empty_column: false diff --git a/tools/make/override.mk b/tools/make/override.mk index 6f4a034b..df8baac5 100644 --- a/tools/make/override.mk +++ b/tools/make/override.mk @@ -1,4 +1,3 @@ # Docker CLI container CLI_SERVICE=app -CLI_USER=druid CLI_SHELL=bash diff --git a/tools/make/project/db-sync.sh b/tools/make/project/db-sync.sh new file mode 100644 index 00000000..2d69f38e --- /dev/null +++ b/tools/make/project/db-sync.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +if [ ! -n "$OC_PROJECT_NAME" ]; then + echo "OC_PROJECT_NAME not set." + exit 1; +fi + +oc login --token=${1} --server=https://api.arodevtest.hel.fi:6443 +oc project ${OC_PROJECT_NAME} + +OC_POD_NAME=$(oc get pods -o name | grep drupal-cron | grep -v deploy) + +if [ ! -n "$OC_POD_NAME" ]; then + echo "Failed to parse pod name." + exit 1 +fi + +oc rsh $OC_POD_NAME rm -f /tmp/dump.sql +oc rsh $OC_POD_NAME drush sql:dump --structure-tables-key=common \ + --extra-dump='--no-tablespaces --hex-blob' \ + --result-file=/tmp/dump.sql + +oc rsync $OC_POD_NAME:/tmp/dump.sql /app diff --git a/tools/make/project/git.mk b/tools/make/project/git.mk index 9ef1f3d9..50b03e87 100644 --- a/tools/make/project/git.mk +++ b/tools/make/project/git.mk @@ -1,3 +1,3 @@ PHONY += copy-commit-message-script copy-commit-message-script: - @$(foreach name,$(shell find public/modules/custom public/themes/custom public/modules/contrib public/themes/contrib -type d -name ".git" -exec dirname {} \; 2> /dev/null ) .,cp tools/commit-msg $(name)/.git/hooks;) + @$(foreach name,$(shell find public/modules/custom public/themes/custom public/modules/contrib public/themes/contrib -type d -name ".git" -exec dirname {} \; 2> /dev/null ) .,cp tools/commit-msg $(name)/.git/hooks || true;) diff --git a/tools/make/project/install.mk b/tools/make/project/install.mk index 483d64f7..4328f653 100644 --- a/tools/make/project/install.mk +++ b/tools/make/project/install.mk @@ -10,18 +10,14 @@ OC_LOGIN_TOKEN ?= $(shell bash -c 'read -s -p "You must obtain an API token by v SYNC_TARGETS := drush-sync-db ifneq ($(DUMP_SQL_EXISTS),yes) -SYNC_TARGETS := oc-login oc-sync +SYNC_TARGETS := oc-sync endif -PHONY += oc-login -oc-login: - $(call drush,helfi:oc:login $(OC_LOGIN_TOKEN)) - PHONY += oc-sync oc-sync: - $(call drush,helfi:oc:get-dump) + docker run --env-file .env -it --rm -v .:/app --name helfi-oc ghcr.io/city-of-helsinki/drupal-oc-cli:latest sh -c "chmod +x /app/tools/make/project/db-sync.sh && /app/tools/make/project/db-sync.sh $(OC_LOGIN_TOKEN)" $(call drush,sql-query --file=${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME),SQL dump imported) - $(call drush,helfi:oc:sanitize-database) + $(call drush,sql-query \"UPDATE file_managed SET uri = REPLACE(uri, 'azure://', 'public://');\",Sanitized Azure URIs) $(call drush,cr) $(call drush,cim -y) $(call drush,cr)