diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c4fb4ff..0cec4f429 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [4.16.5] - 2026-04-21 + +* [PR-648](https://github.com/itk-dev/deltag.aarhus.dk/pull/648) + * Update video display (7104) + * Fix timeline issue (7196 - 7197) + * Fix permission bug for activities (7217) + * Update fixture + +* [PR-649](https://github.com/itk-dev/deltag.aarhus.dk/pull/649) + * Fix deprecation in hoeringsportal_deskpro + * Fix display bug in dialogue file_resup module + ## [4.16.4] - 2026-04-17 * [PR-645](https://github.com/itk-dev/deltag.aarhus.dk/pull/645) diff --git a/composer.json b/composer.json index a74117c0b..d78b9cfda 100755 --- a/composer.json +++ b/composer.json @@ -79,6 +79,7 @@ "itk-dev/azure-ad-delta-sync-drupal": "^2.0", "itk-dev/composer-virtualenv": "^1.0", "itk-dev/itk_azure_video": "^2.0", + "itk-dev/itk_dropzonejs_image_widget": "^1.0", "itk-dev/itk_pretix": "^1.5", "itk-dev/itk_siteimprove": "^1.2", "itk-dev/itk_video": "^1.0", diff --git a/composer.lock b/composer.lock index 98d841c31..f425bf0ca 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6a86efa39839dd403cecedbf8c7e8122", + "content-hash": "91f00350f4eb49c889830350025ca9f4", "packages": [ { "name": "asm89/stack-cors", @@ -67,7 +67,7 @@ "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/jquery/jquery-dist.git", + "url": "git@github.com:jquery/jquery-dist.git", "reference": "cfd8e3a885dca7b406791c1eed472af9dd717e8e" }, "dist": { @@ -7227,6 +7227,35 @@ }, "time": "2025-07-04T10:49:56+00:00" }, + { + "name": "itk-dev/itk_dropzonejs_image_widget", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/itk-dev/itk_dropzonejs_image_widget.git", + "reference": "ebcd8c59fe4cf272ae28b2266b2d594a4e3fa8fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/itk-dev/itk_dropzonejs_image_widget/zipball/ebcd8c59fe4cf272ae28b2266b2d594a4e3fa8fd", + "reference": "ebcd8c59fe4cf272ae28b2266b2d594a4e3fa8fd", + "shasum": "" + }, + "type": "drupal-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Module that provides an dropzone widget for drupal image fields", + "keywords": [ + "drupal" + ], + "support": { + "issues": "https://github.com/itk-dev/itk_dropzonejs_image_widget/issues", + "source": "https://github.com/itk-dev/itk_dropzonejs_image_widget/tree/1.0.0" + }, + "time": "2026-04-22T11:11:58+00:00" + }, { "name": "itk-dev/itk_pretix", "version": "1.5.0", @@ -7315,16 +7344,16 @@ }, { "name": "itk-dev/itk_video", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/itk-dev/itk_video.git", - "reference": "2467441cea83fa8085605d59690242e30b71ab0b" + "reference": "b28e0a03415a11f78f0a8f6831a6a2ceb7273698" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itk-dev/itk_video/zipball/2467441cea83fa8085605d59690242e30b71ab0b", - "reference": "2467441cea83fa8085605d59690242e30b71ab0b", + "url": "https://api.github.com/repos/itk-dev/itk_video/zipball/b28e0a03415a11f78f0a8f6831a6a2ceb7273698", + "reference": "b28e0a03415a11f78f0a8f6831a6a2ceb7273698", "shasum": "" }, "require": { @@ -7352,9 +7381,9 @@ ], "support": { "issues": "https://github.com/itk-dev/itk_video/issues", - "source": "https://github.com/itk-dev/itk_video/tree/1.0.0" + "source": "https://github.com/itk-dev/itk_video/tree/1.0.1" }, - "time": "2025-10-20T11:13:09+00:00" + "time": "2026-04-21T12:38:34+00:00" }, { "name": "itk-dev/openid-connect", diff --git a/config/sync/core.entity_form_display.node.dialogue_proposal.default.yml b/config/sync/core.entity_form_display.node.dialogue_proposal.default.yml index de2ad4bc5..fd7d69625 100644 --- a/config/sync/core.entity_form_display.node.dialogue_proposal.default.yml +++ b/config/sync/core.entity_form_display.node.dialogue_proposal.default.yml @@ -17,7 +17,7 @@ dependencies: - node.type.dialogue_proposal module: - hoeringsportal_data - - svg_image + - itk_dropzonejs_image_widget id: node.dialogue_proposal.default targetEntityType: node bundle: dialogue_proposal @@ -60,12 +60,13 @@ content: placeholder: '' third_party_settings: { } field_image_upload: - type: image_image + type: itk_dropzonejs_image_widget weight: 5 region: content settings: - progress_indicator: throbber preview_image_style: thumbnail + dropzone_description: 'Drag and drop an image here or click to upload' + progress_indicator: throbber third_party_settings: { } field_location: type: hoeringsportal_data_map_default diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 380240aba..9fbc3cdce 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -41,7 +41,6 @@ module: field_group: 0 field_ui: 0 file: 0 - file_resup: 0 filter: 0 flag: 0 hoeringsportal_activity: 0 @@ -70,6 +69,7 @@ module: inline_form_errors: 0 itk_admin: 0 itk_admin_links: 0 + itk_dropzonejs_image_widget: 0 itk_media_entity: 0 itk_pretix: 0 itk_siteimprove: 0 diff --git a/config/sync/field.field.node.dialogue_proposal.field_image_upload.yml b/config/sync/field.field.node.dialogue_proposal.field_image_upload.yml index a14e5504e..86f1c8a8f 100644 --- a/config/sync/field.field.node.dialogue_proposal.field_image_upload.yml +++ b/config/sync/field.field.node.dialogue_proposal.field_image_upload.yml @@ -6,13 +6,7 @@ dependencies: - field.storage.node.field_image_upload - node.type.dialogue_proposal module: - - file_resup - image -third_party_settings: - file_resup: - enabled: true - max_upload_size: '10 MB' - auto_upload: true id: node.dialogue_proposal.field_image_upload field_name: field_image_upload entity_type: node diff --git a/config/sync/openid_connect.client.generic.yml b/config/sync/openid_connect.client.generic.yml index ec8743be2..5ada23ee2 100644 --- a/config/sync/openid_connect.client.generic.yml +++ b/config/sync/openid_connect.client.generic.yml @@ -9,11 +9,13 @@ settings: client_id: client-id client_secret: client-secret iss_allowed_domains: '' + prompt: { } issuer_url: '' - authorization_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/connect/authorize' - token_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/connect/token' - userinfo_endpoint: '' - end_session_endpoint: '' + authorization_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/oauth2/authorize' + token_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/oauth2/token' + userinfo_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/oauth2/userinfo' + end_session_endpoint: 'http://idp-employee.deltag.local.itkdev.dk/oauth2/end_session' scopes: - openid - email + - profile diff --git a/config/sync/user.role.public_meeting_editor.yml b/config/sync/user.role.public_meeting_editor.yml index 0046dabf0..3627f7949 100644 --- a/config/sync/user.role.public_meeting_editor.yml +++ b/config/sync/user.role.public_meeting_editor.yml @@ -9,6 +9,7 @@ dependencies: - filter.format.email_html - media.type.document - media.type.image + - node.type.course - node.type.public_meeting module: - entity_browser @@ -33,26 +34,34 @@ permissions: - 'access media overview' - 'access toolbar' - 'clone public_meeting content' + - 'create course content' - 'create document media' - 'create image media' - 'create media' - 'create public_meeting content' + - 'delete any course content' - 'delete any public_meeting content' + - 'delete course revisions' + - 'delete own course content' - 'delete own document media' - 'delete own files' - 'delete own image media' - 'delete own public_meeting content' - 'delete public_meeting revisions' + - 'edit any course content' - 'edit any public_meeting content' + - 'edit own course content' - 'edit own document media' - 'edit own image media' - 'edit own public_meeting content' - 'publish any node type public_meeting' + - 'revert course revisions' - 'revert public_meeting revisions' - 'unpublish any node type public_meeting' - 'update media' - 'use text format email_html' - 'view any unpublished public_meeting content' + - 'view course revisions' - 'view own unpublished media' - 'view public_meeting revisions' - 'view the administration theme' diff --git a/web/modules/custom/hoeringsportal_activity/src/Hook/ActivityHooks.php b/web/modules/custom/hoeringsportal_activity/src/Hook/ActivityHooks.php index 927919181..529484cdf 100644 --- a/web/modules/custom/hoeringsportal_activity/src/Hook/ActivityHooks.php +++ b/web/modules/custom/hoeringsportal_activity/src/Hook/ActivityHooks.php @@ -7,6 +7,9 @@ use Drupal\hoeringsportal_activity\Helper\ActivityHelper; use Drupal\node\NodeInterface; +/** + * Provides hooks for activity. + */ readonly class ActivityHooks { public function __construct( diff --git a/web/modules/custom/hoeringsportal_deskpro/src/Form/HearingTicketAddForm.php b/web/modules/custom/hoeringsportal_deskpro/src/Form/HearingTicketAddForm.php index 954794934..917b17ad5 100644 --- a/web/modules/custom/hoeringsportal_deskpro/src/Form/HearingTicketAddForm.php +++ b/web/modules/custom/hoeringsportal_deskpro/src/Form/HearingTicketAddForm.php @@ -62,8 +62,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { $this->initialize(); $file_validators = [ - 'file_validate_size' => [10490000], - 'file_validate_extensions' => ['jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps odt ods odp'], + 'FileSizeLimit' => ['fileLimit' => 10490000], + 'FileExtension' => ['extensions' => 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps odt ods odp'], ]; $form['hearing_intro_text'] = [ @@ -240,7 +240,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { $organization = trim($form_state->getValue('organization')); $representations = $this->config->getRepresentations(); - if ($representations[$representation]['require_organization'] && empty($organization)) { + if (($representations[$representation]['require_organization'] ?? FALSE) && empty($organization)) { // @todo Customer has to decide if we need an organization name. // $form_state->setErrorByName( // 'organization', diff --git a/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php b/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php index 719e30805..595015ea2 100644 --- a/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php +++ b/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php @@ -238,6 +238,7 @@ private function createHearingReplies(NodeInterface $node, int $numberOfReplies) for ($i = 0; $i < $numberOfReplies; $i++) { $data = [ 'id' => 1000 * (int) $node->id() + $i, + 'ref' => sprintf('HS%s-%d', $node->id(), $i + 1), 'date_created' => (new \DateTimeImmutable('2001-01-01'))->modify(sprintf('+%d days', $i))->format(\DateTimeImmutable::ATOM), 'subject' => sprintf('Reply %d', $i + 1), 'fields' => [ diff --git a/web/modules/custom/hoeringsportal_project/src/Hook/ProjectHooks.php b/web/modules/custom/hoeringsportal_project/src/Hook/ProjectHooks.php index edbb8c6da..167fd29b9 100644 --- a/web/modules/custom/hoeringsportal_project/src/Hook/ProjectHooks.php +++ b/web/modules/custom/hoeringsportal_project/src/Hook/ProjectHooks.php @@ -53,7 +53,7 @@ public function preprocessNode(array &$variables): void { } $variables['timeline_items'] = []; - $now = new \DateTimeImmutable(); + $now = new DrupalDateTime(); $nodes = $this->getTimelineNodes($variables); @@ -220,13 +220,13 @@ private function getTimelineNotes(array $variables) : ?array { * * @param \Drupal\node\NodeInterface $node * The node entity to add. - * @param \DateTimeImmutable $now + * @param \Drupal\Core\Datetime\DrupalDateTime $now * The current date and time. * * @return array * The timeline item array. */ - private function addNodeAsTimelineItem(NodeInterface $node, \DateTimeImmutable $now): array { + private function addNodeAsTimelineItem(NodeInterface $node, DrupalDateTime $now): array { try { $date = $this->determineDate($node); if (!$date) { @@ -259,13 +259,13 @@ private function addNodeAsTimelineItem(NodeInterface $node, \DateTimeImmutable $ * * @param \Drupal\paragraphs\ParagraphInterface $paragraph * The paragraph entity to add. - * @param \DateTimeImmutable $now + * @param \Drupal\Core\Datetime\DrupalDateTime $now * The current date and time. * * @return array * The timeline item array. */ - private function addNoteAsTimelineItem(ParagraphInterface $paragraph, \DateTimeImmutable $now): array { + private function addNoteAsTimelineItem(ParagraphInterface $paragraph, DrupalDateTime $now): array { try { $date = $paragraph->field_date->date; if (!$date) { @@ -296,13 +296,13 @@ private function addNoteAsTimelineItem(ParagraphInterface $paragraph, \DateTimeI /** * Add "today" timeline item. * - * @param \DateTimeImmutable $now + * @param \Drupal\Core\Datetime\DrupalDateTime $now * The current date and time. * * @return array * The timeline item array. */ - private function addNowAsTimelineItem(\DateTimeImmutable $now): array { + private function addNowAsTimelineItem(DrupalDateTime $now): array { return [ 'id' => 'today', 'date' => $now->format('Y-m-d'), @@ -380,14 +380,15 @@ private function determineImage(NodeInterface $node): ?File { * The entity to determine status for. * @param \Drupal\Core\Datetime\DrupalDateTime $date * The item date. - * @param \DateTimeImmutable $now + * @param \Drupal\Core\Datetime\DrupalDateTime $now * The current date. * * @return string * The status string (upcoming, completed, or note). */ - private function determineStatus(EntityInterface $entity, DrupalDateTime $date, \DateTimeImmutable $now): string { + private function determineStatus(EntityInterface $entity, DrupalDateTime $date, DrupalDateTime $now): string { return match (TRUE) { + $date->format('Y-m-d') === $now->format('Y-m-d') => 'current', $date > $now => 'upcoming', $entity->getEntityTypeId() === 'node' => 'completed', $entity->getEntityTypeId() === 'paragraph' => 'note', diff --git a/web/sites/development.services.yml b/web/sites/development.services.yml index f35a52ec5..01ba05d88 100644 --- a/web/sites/development.services.yml +++ b/web/sites/development.services.yml @@ -19,12 +19,12 @@ services: class: Drupal\Core\Cache\NullBackendFactory logger.channel.config_schema: parent: logger.channel_base - arguments: [ 'config_schema' ] + arguments: ["config_schema"] config.schema_checker: class: Drupal\Core\Config\Development\LenientConfigSchemaChecker arguments: - - '@config.typed' - - '@messenger' - - '@logger.channel.config_schema' + - "@config.typed" + - "@messenger" + - "@logger.channel.config_schema" tags: - { name: event_subscriber } diff --git a/web/themes/custom/hoeringsportal/templates/content/node--decision--full.html.twig b/web/themes/custom/hoeringsportal/templates/content/node--decision--full.html.twig index e8ab105d6..31f040a1e 100755 --- a/web/themes/custom/hoeringsportal/templates/content/node--decision--full.html.twig +++ b/web/themes/custom/hoeringsportal/templates/content/node--decision--full.html.twig @@ -14,13 +14,13 @@ 0: { type: 'text', label: 'Decision'|t, - value: node.field_decision.value + value: node.field_decision.value, }, 1: { type: 'text', label: 'Decision date'|t, - value: node.field_decision_date.date|date('U')|format_date('hoeringsportal_date_long') - } + value: node.field_decision_date.date|date('U')|format_date('hoeringsportal_date_long'), + }, }, category: 'Decision'|t, }) }} diff --git a/web/themes/custom/hoeringsportal/templates/content/node--project-main-page--full.html.twig b/web/themes/custom/hoeringsportal/templates/content/node--project-main-page--full.html.twig index 18c36e740..9354ad160 100755 --- a/web/themes/custom/hoeringsportal/templates/content/node--project-main-page--full.html.twig +++ b/web/themes/custom/hoeringsportal/templates/content/node--project-main-page--full.html.twig @@ -42,7 +42,7 @@
{{ include(directory ~ '/templates/components/timeline.html.twig', { - project_status: node.field_project_status.value + project_status: node.field_project_status.value, }) }}
diff --git a/web/themes/custom/hoeringsportal_admin/templates/node-add-list.html.twig b/web/themes/custom/hoeringsportal_admin/templates/node-add-list.html.twig index e8713fe98..b7319d86b 100644 --- a/web/themes/custom/hoeringsportal_admin/templates/node-add-list.html.twig +++ b/web/themes/custom/hoeringsportal_admin/templates/node-add-list.html.twig @@ -46,18 +46,22 @@ ] %} +{% set show_activity = bundles.public_meeting is defined or bundles.course is defined %} + {% set bundles = bundles|filter((v, k) => k != 'public_meeting' and k != 'course') %} -{% if bundles is not empty %} +{% if bundles is not empty or show_activity %} - -
- - {{ 'Activity'|t }} - -
-
{{ 'Create an activity'|t }}
- + {% if show_activity %} + +
+ + {{ 'Activity'|t }} + +
+
{{ 'Create an activity'|t }}
+ + {% endif %} {% for bundle in bundles %} {# Add 'admin-item__link' class to the link attributes.