Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hakuvahti Drupal Module #475

Merged
merged 84 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2eb2dce
UHF-9287: Frontend module sans React front. Subscribe still bugs for …
sundflux May 7, 2024
d4b4964
UHF-9287: Not needed
sundflux May 7, 2024
14b7a6f
UHF-9287: Correct translation strings
sundflux May 7, 2024
62ab740
UHF-9287: Translation stuff, doesn't load for some reason
sundflux May 9, 2024
49de378
UHF-9287: String fix
sundflux May 9, 2024
781a53f
UHF-9287: Hakuvahti url
sundflux May 9, 2024
3633039
UHF-9287: Cleanups and refactoring
sundflux May 13, 2024
8a55597
UHF-9287: Cleanup
sundflux May 14, 2024
a8aac7f
UHF-9287: Enable extension
sundflux May 14, 2024
fb511ae
UHF-9287: Fixed some PHPCS
teroelonen May 14, 2024
f2897e7
UHF-9287: Add class+function docblocks
sundflux May 15, 2024
d098675
UHF-9287: Fix linter problems
sundflux May 15, 2024
75dc4e6
UHF-9287: Fix linter problems
sundflux May 15, 2024
cf146dd
UHF-9287: Add note about tokens
sundflux May 15, 2024
cff995f
UHF-9287: Styled the search monitor accordion a bit
teroelonen May 15, 2024
f29a7d2
UHF-9287: Add border above the search monitor
teroelonen May 15, 2024
c4bbdfe
UHF-9287: Minor layout adjustments to search monitor
teroelonen May 15, 2024
bc97819
UHF-9287: Fix local hakuvahti url
sundflux May 15, 2024
4406c28
UHF-9287: Merge branch 'UHF-9287-hakuvahti-frontend' of https://githu…
sundflux May 15, 2024
44214f4
UHF-9287: Update env var url, remove useless local one
sundflux May 15, 2024
54b08f0
UHF-9287: Hakuvahti url to preflight checks
sundflux May 16, 2024
20b1b9c
UHF-10004: Adjusting translations for the Drupal module
teroelonen May 16, 2024
0e00aed
UHF-10004: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:C…
teroelonen May 16, 2024
a42edea
UHF-9287: Add hakuvahti url to compose.yml
teroelonen May 16, 2024
1e92fa5
UHF-9287: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:Ci…
teroelonen May 16, 2024
a2d7bf8
UHF-10004: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:C…
teroelonen May 16, 2024
4a0868d
UHF-10004: Change the language variable check to the url from session
teroelonen May 16, 2024
b9d4528
UHF-10004: Add Swedish translations
teroelonen May 16, 2024
1ba097a
UHF-10004: Adjust translations a bit
teroelonen May 16, 2024
afe53ff
UHF-9287: This fixes missing HAKUVAHTI_URL env variable
sundflux May 16, 2024
1da8d85
UHF-9287: Fixes Ristos commits about constructors
sundflux May 16, 2024
66c398e
UHF-9287: Merge branch 'UHF-9287-hakuvahti-frontend' of https://githu…
sundflux May 16, 2024
72fd785
UHF-9287: We dont need language manager here anymore
sundflux May 16, 2024
714d456
UHF-9287: Implement search description
sundflux May 16, 2024
1876b6f
UHF-10004: Add hiding styles for the search monitor content
teroelonen May 16, 2024
f356591
UHF-9287: Take language in account when getting term label
sundflux May 16, 2024
726fdf6
UHF-9287: Rewrite the form logic without nesting. Fix linter things.
sundflux May 16, 2024
c2beff0
UHF-9287: Also rewrite confirm form without nesting
sundflux May 16, 2024
3da4c74
UHF-9287: Fix linter, mostly
sundflux May 16, 2024
b153e07
UHF-9287: Linter fixes, these show up in pipeline but not on local fo…
sundflux May 17, 2024
2395856
UHF-10004: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:C…
teroelonen May 17, 2024
86a7137
UHF-9287: Eliminate static Term:: call
sundflux May 17, 2024
2f9ed42
UHF-9287: Add some translation strings
sundflux May 17, 2024
8bbc05f
UHF-10004: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:C…
teroelonen May 17, 2024
81c6956
UHF-9287: Fix PHPCS
teroelonen May 17, 2024
9a74149
UHF-10004: Merge branch 'UHF-9287-hakuvahti-frontend' of github.com:C…
teroelonen May 17, 2024
6d42b08
UHF-9287: Fix PHPStan errors
sundflux May 17, 2024
c8a0f95
UHF-9287: Merge branch 'UHF-9287-hakuvahti-frontend' of https://githu…
sundflux May 17, 2024
1ce63a4
Merge pull request #465 from City-of-Helsinki/UHF-9287-hakuvahti-fron…
teroelonen May 17, 2024
eca41d2
UHF-10004: Merge branch 'hakuvahti' of github.com:City-of-Helsinki/dr…
teroelonen May 17, 2024
f4dae63
UHF-10004: Add some missing translations for routes
teroelonen May 17, 2024
fc6c6e9
UHF-10080: added hakuvahti external network for drupal
rpnykanen May 20, 2024
7c6998f
Merge pull request #471 from City-of-Helsinki/UHF-10004
teroelonen May 21, 2024
dcc2b06
UHF-10004: Change translation and remove unused text from the unsubsc…
teroelonen May 21, 2024
5e20386
Merge pull request #474 from City-of-Helsinki/UHF-10004_fix_for_unsub…
teroelonen May 21, 2024
e7cd496
UHF-10005: Styled and adjusted the dom on hakuvahti form and confirma…
teroelonen May 22, 2024
c40dc4a
UHF-10005: Add dynamic title for the hakuvahti confirmation process
teroelonen May 23, 2024
89a6405
UHF-10005: Style unsubscribe form and add translations
teroelonen May 23, 2024
a6366dd
UHF-10005: Style the hakuvahti notifications
teroelonen May 23, 2024
d536b07
UHF-10005: Add missing component wrapper to all confirmation messages
teroelonen May 23, 2024
53f2e7e
UHF-10005: Fix PHPCS
teroelonen May 23, 2024
2033de2
Merge pull request #472 from City-of-Helsinki/UHF-10080
sundflux May 23, 2024
a8693ce
Merge pull request #476 from City-of-Helsinki/UHF-10005
sundflux May 24, 2024
b81d6ff
Merge branch 'hakuvahti' of https://github.com/City-of-Helsinki/drupa…
sundflux May 24, 2024
3caa106
Add new unified controller for confirm + unsubscribe and move layout …
sundflux May 27, 2024
58f1a23
Update routing to point to the new module.
sundflux May 27, 2024
9175b44
Linter fixes
sundflux May 27, 2024
1763126
Remove old controllers
sundflux May 27, 2024
ab7233e
Attempt to fix the layout
sundflux May 27, 2024
f59e9da
Try to please sonarcloud
sundflux May 27, 2024
ae15e50
Try to please sonarcloud
sundflux May 27, 2024
abfa7c2
Well it doesn't work that way...
sundflux May 27, 2024
0443ee3
Adjust templates for hakuvahti confirmation after refactoring changes
teroelonen May 28, 2024
3229b28
Add missing template for hakuvahti message wrapper
teroelonen May 28, 2024
7d18895
Move all templates under hdbt_subtheme, refactor templates to smaller…
teroelonen May 28, 2024
f0822af
Wrap the back-link to paragraph tag
teroelonen May 28, 2024
daa1f3f
Streamline the action wrapper template a bit
teroelonen May 28, 2024
0d99f5e
Change the network name to correct one
teroelonen May 28, 2024
7ce57a3
Merge pull request #479 from City-of-Helsinki/hakuvahti-X-sc_changes
teroelonen May 28, 2024
cdc8028
Merge branch 'hakuvahti' of https://github.com/City-of-Helsinki/drupa…
sundflux May 28, 2024
7cd5fe5
Hopefully fix docker connection to HAV
sundflux May 28, 2024
1df6b4b
Network naming fix
sundflux May 29, 2024
e65f59f
Network naming fix
sundflux May 29, 2024
d54bbb8
Merge pull request #480 from City-of-Helsinki/UHF-X-fixdocker
sundflux May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ HELBIT_CLIENT_ID=

# URL for Elasticsearch (for job search)
ELASTIC_PROXY_URL=https://elastic-helfi-rekry.docker.so

# Hakuvahti URL
HAKUVAHTI_URL=http://helfi-rekry.docker.so:3000
5 changes: 5 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ services:
DRUPAL_VARNISH_PORT: 6081
REDIS_HOST: redis
PROJECT_NAME: "${PROJECT_NAME}"
HAKUVAHTI_URL: "${HAKUVAHTI_URL}"
extra_hosts:
- "host.docker.internal:host-gateway"
- "${DRUPAL_HOSTNAME}:host-gateway"
networks:
- internal
- stonehenge-network
- helfi-hakuvahti_helfi-hakuvahti-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https"
Expand Down Expand Up @@ -111,6 +113,7 @@ services:
networks:
- internal
- stonehenge-network
- helfi-hakuvahti_helfi-hakuvahti-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-elastic.entrypoints=https"
Expand Down Expand Up @@ -145,6 +148,8 @@ networks:
external: false
stonehenge-network:
external: true
helfi-hakuvahti_helfi-hakuvahti-network:
external: true

volumes:
db_volume:
Expand Down
1 change: 1 addition & 0 deletions conf/cmi/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module:
helfi_ckeditor: 0
helfi_eu_cookie_compliance: 0
helfi_global_announcement: 0
helfi_hakuvahti: 0
helfi_image_styles: 0
helfi_media: 0
helfi_media_chart: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: helfi_hakuvahti
type: module
description: 'Drupal-integration for hakuvahti.'
package: Custom
core_version_requirement: ^10
'interface translation project': helfi_hakuvahti
'interface translation server pattern': modules/custom/helfi_hakuvahti/translations/%language.po
36 changes: 36 additions & 0 deletions public/modules/custom/helfi_hakuvahti/helfi_hakuvahti.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* @file
* Helfi_hakuvahti.
*
* Helfi_hakuvahti.module.
*/

declare(strict_types=1);

/**
* Implements hook_theme().
*/
function helfi_hakuvahti_theme() {
return [
'hakuvahti_form' => [
'variables' => [
'title' => NULL,
'message' => NULL,
'button_text' => NULL,
'action_url' => NULL,
'id' => NULL,
'form_id' => NULL,
],
],
'hakuvahti_confirmation' => [
'variables' => [
'title' => NULL,
'message' => NULL,
'link_text' => NULL,
'link_url' => NULL,
],
],
];
}
21 changes: 21 additions & 0 deletions public/modules/custom/helfi_hakuvahti/helfi_hakuvahti.routing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
helfi_hakuvahti.subscribe:
path: '/hakuvahti/subscribe'
defaults:
_title: 'Subscribe saved search'
_controller: '\Drupal\helfi_hakuvahti\Controller\HelfiHakuvahtiSubscribeController::post'
requirements:
_permission: 'access content'
helfi_hakuvahti.confirm:
path: '/hakuvahti/confirm'
defaults:
_title: 'Confirm saved search'
_controller: '\Drupal\helfi_hakuvahti\Controller\HelfiHakuvahtiController::confirm'
requirements:
_permission: 'access content'
helfi_hakuvahti.unsubscribe:
path: '/hakuvahti/unsubscribe'
defaults:
_title: 'Are you sure you wish to delete the saved search?'
_controller: '\Drupal\helfi_hakuvahti\Controller\HelfiHakuvahtiController::unsubscribe'
requirements:
_permission: 'access content'
Loading