From 5ebb38217e5e04456556e3e562063205587e139f Mon Sep 17 00:00:00 2001 From: Amin Date: Wed, 8 May 2024 13:49:23 +0200 Subject: [PATCH 1/8] feat: allow filter "German language skills for international students" --- docs/degree_programs_search_shortcode.md | 1 + .../components/search/filters/_filter-dropdown.scss | 1 + src/Infrastructure/Filter/FilterViewFactory.php | 13 +++++++++++++ src/Infrastructure/Rewrite/CurrentRequest.php | 2 ++ 4 files changed, 17 insertions(+) diff --git a/docs/degree_programs_search_shortcode.md b/docs/degree_programs_search_shortcode.md index e0acfa2..efde0de 100644 --- a/docs/degree_programs_search_shortcode.md +++ b/docs/degree_programs_search_shortcode.md @@ -23,6 +23,7 @@ See below for a list of supported attributes. | `attribute` | Attribute filter | Comma-separated term names | | `degree` | Degree filter | Comma-separated term names | | `faculty` | Faculty filter | Comma-separated term names | +| `german-language-skills-for-international-students` | German language skills for international students filter | Comma-separated term names | | `search` | Search keyword filter (explicitly added by default, no need to include) | Not available | | `semester` | Semester filter | Comma-separated term names | | `study-location` | Study location filter | Comma-separated term names | diff --git a/resources/scss/components/search/filters/_filter-dropdown.scss b/resources/scss/components/search/filters/_filter-dropdown.scss index b443fca..785f0f3 100644 --- a/resources/scss/components/search/filters/_filter-dropdown.scss +++ b/resources/scss/components/search/filters/_filter-dropdown.scss @@ -109,6 +109,7 @@ align-items: center; justify-content: center; font-weight: 700; + flex-shrink: 0; @include config.text-size("xxs"); } diff --git a/src/Infrastructure/Filter/FilterViewFactory.php b/src/Infrastructure/Filter/FilterViewFactory.php index e726d91..1ae5ae1 100644 --- a/src/Infrastructure/Filter/FilterViewFactory.php +++ b/src/Infrastructure/Filter/FilterViewFactory.php @@ -10,6 +10,7 @@ use Fau\DegreeProgram\Common\Application\Filter\DegreeFilter; use Fau\DegreeProgram\Common\Application\Filter\FacultyFilter; use Fau\DegreeProgram\Common\Application\Filter\Filter; +use Fau\DegreeProgram\Common\Application\Filter\GermanLanguageSkillsForInternationalStudentsFilter; use Fau\DegreeProgram\Common\Application\Filter\SearchKeywordFilter; use Fau\DegreeProgram\Common\Application\Filter\SemesterFilter; use Fau\DegreeProgram\Common\Application\Filter\StudyLocationFilter; @@ -101,6 +102,18 @@ private function createFilterView(Filter $filter): ?FilterView 'options' => $this->buildOptionsForTaxonomyBasedFilter($filter), ] ), + GermanLanguageSkillsForInternationalStudentsFilter::KEY => new FilterView( + $filter, + _x( + 'German language skills for international students', + 'frontoffice: Filter label', + 'fau-degree-program-output', + ), + FilterView::MULTISELECT, + [ + 'options' => $this->buildOptionsForTaxonomyBasedFilter($filter), + ] + ), SemesterFilter::KEY => new FilterView( $filter, _x( diff --git a/src/Infrastructure/Rewrite/CurrentRequest.php b/src/Infrastructure/Rewrite/CurrentRequest.php index 7d4dc08..c8e9043 100644 --- a/src/Infrastructure/Rewrite/CurrentRequest.php +++ b/src/Infrastructure/Rewrite/CurrentRequest.php @@ -9,6 +9,7 @@ use Fau\DegreeProgram\Common\Application\Filter\AttributeFilter; use Fau\DegreeProgram\Common\Application\Filter\DegreeFilter; use Fau\DegreeProgram\Common\Application\Filter\FacultyFilter; +use Fau\DegreeProgram\Common\Application\Filter\GermanLanguageSkillsForInternationalStudentsFilter; use Fau\DegreeProgram\Common\Application\Filter\SearchKeywordFilter; use Fau\DegreeProgram\Common\Application\Filter\SemesterFilter; use Fau\DegreeProgram\Common\Application\Filter\StudyLocationFilter; @@ -46,6 +47,7 @@ final class CurrentRequest AttributeFilter::KEY => self::ARRAY_OF_IDS, DegreeFilter::KEY => self::ARRAY_OF_IDS, FacultyFilter::KEY => self::ARRAY_OF_IDS, + GermanLanguageSkillsForInternationalStudentsFilter::KEY => self::ARRAY_OF_IDS, SemesterFilter::KEY => self::ARRAY_OF_IDS, StudyLocationFilter::KEY => self::ARRAY_OF_IDS, SubjectGroupFilter::KEY => self::ARRAY_OF_IDS, From d8779e3e57e8d500d9fc9ba12502e3e64c324454 Mon Sep 17 00:00:00 2001 From: Amin Date: Wed, 8 May 2024 13:50:08 +0200 Subject: [PATCH 2/8] feat: allow sorting degree programs based on German language skills --- .../scss/components/search/_collection.scss | 6 ++++ .../scss/components/search/_preview-item.scss | 9 +++++- .../Component/DegreeProgramsCollection.php | 26 +++++++++++++++ src/Infrastructure/Query/WpQueryModifier.php | 4 +++ templates/search/collection-table-header.php | 32 +++++++++++++++++++ templates/search/collection.php | 7 +++- templates/search/item-preview.php | 11 +++++++ 7 files changed, 93 insertions(+), 2 deletions(-) diff --git a/resources/scss/components/search/_collection.scss b/resources/scss/components/search/_collection.scss index 3fc085c..2fe4cd9 100644 --- a/resources/scss/components/search/_collection.scss +++ b/resources/scss/components/search/_collection.scss @@ -123,6 +123,12 @@ &.-admission-requirement { width: 20%; } + + &.-language-certificates { + @include config.when-inside(".c-degree-programs-collection:not([data-active-filters*=german-language-skills-for-international-students])") { + display: none !important; + } + } } &__sort-icon { diff --git a/resources/scss/components/search/_preview-item.scss b/resources/scss/components/search/_preview-item.scss index abf1afc..e2ebc95 100644 --- a/resources/scss/components/search/_preview-item.scss +++ b/resources/scss/components/search/_preview-item.scss @@ -231,7 +231,8 @@ &__degree, &__start, &__location, - &__admission-requirement { + &__admission-requirement, + &__language-certificates { width: 100%; flex: 0 0 100%; max-width: 100%; @@ -275,4 +276,10 @@ @include config.screen-reader-text; } } + + &__language-certificates { + @include config.when-inside(".c-degree-programs-collection:not([data-active-filters*=german-language-skills-for-international-students])") { + display: none; + } + } } diff --git a/src/Infrastructure/Component/DegreeProgramsCollection.php b/src/Infrastructure/Component/DegreeProgramsCollection.php index 0e413d9..59af3f8 100644 --- a/src/Infrastructure/Component/DegreeProgramsCollection.php +++ b/src/Infrastructure/Component/DegreeProgramsCollection.php @@ -5,6 +5,7 @@ namespace Fau\DegreeProgram\Output\Infrastructure\Component; use Fau\DegreeProgram\Common\Application\DegreeProgramViewTranslated; +use Fau\DegreeProgram\Common\Application\Filter\FilterFactory; use Fau\DegreeProgram\Common\Application\Repository\PaginationAwareCollection; use Fau\DegreeProgram\Common\Domain\DegreeProgram; use Fau\DegreeProgram\Common\Domain\MultilingualString; @@ -42,6 +43,7 @@ public function render(array $attributes = []): string 'currentOrder' => $this->currentRequest->orderBy(), 'output' => $attributes['output'], 'orderByOptions' => $this->orderByOptions(), + 'activeFilterNames' => $this->activeFilterNames(), ] ); } @@ -112,6 +114,30 @@ private function orderByOptions(): array 'fau-degree-program-output', ), ], + DegreeProgram::GERMAN_LANGUAGE_SKILLS_FOR_INTERNATIONAL_STUDENTS => [ + 'label_asc' => _x( + 'Sort by language certificates', + 'backoffice: Sort by options', + 'fau-degree-program-output', + ), + 'label_desc' => _x( + 'Sort by language certificates Z-A', + 'backoffice: Sort by options', + 'fau-degree-program-output', + ), + ], ]; } + + /** + * @return array + */ + private function activeFilterNames(): array + { + $activeFilters = array_filter( + $this->currentRequest->getParams(array_keys(FilterFactory::SUPPORTED_FILTERS)) + ); + + return array_keys($activeFilters); + } } diff --git a/src/Infrastructure/Query/WpQueryModifier.php b/src/Infrastructure/Query/WpQueryModifier.php index 76828e1..45ea038 100644 --- a/src/Infrastructure/Query/WpQueryModifier.php +++ b/src/Infrastructure/Query/WpQueryModifier.php @@ -24,6 +24,10 @@ final class WpQueryModifier DegreeProgram::LOCATION . '_' . MultilingualString::DE, DegreeProgram::ADMISSION_REQUIREMENTS . '_' . MultilingualString::EN, DegreeProgram::ADMISSION_REQUIREMENTS . '_' . MultilingualString::DE, + // phpcs:disable Inpsyde.CodeQuality.LineLength.TooLong + DegreeProgram::GERMAN_LANGUAGE_SKILLS_FOR_INTERNATIONAL_STUDENTS . '_' . MultilingualString::EN, + DegreeProgram::GERMAN_LANGUAGE_SKILLS_FOR_INTERNATIONAL_STUDENTS . '_' . MultilingualString::DE, + // phpcs:enable Inpsyde.CodeQuality.LineLength.TooLong ]; /** diff --git a/templates/search/collection-table-header.php b/templates/search/collection-table-header.php index 62f128b..d6c96c2 100644 --- a/templates/search/collection-table-header.php +++ b/templates/search/collection-table-header.php @@ -215,4 +215,36 @@ ) ) ?> + + + + + + + 'sort'] + ) + ) ?> + + diff --git a/templates/search/collection.php b/templates/search/collection.php index ded7a14..0896e63 100644 --- a/templates/search/collection.php +++ b/templates/search/collection.php @@ -12,6 +12,7 @@ * output: 'tiles' | 'list', * currentOrder: array, * orderByOptions: array, + * activeFilterNames: array, * } $data * @var array $data * @var Renderer $renderer @@ -22,13 +23,17 @@ 'output' => $output, 'currentOrder' => $currentOrder, 'orderByOptions' => $orderByOptions, + 'activeFilterNames' => $activeFilterNames, ] = $data; $viewModeClass = $output === 'list' ? '-list' : '-tiles'; ?> -
    +
      render('search/collection-table-header', [ diff --git a/templates/search/item-preview.php b/templates/search/item-preview.php index da8d23a..78605ec 100644 --- a/templates/search/item-preview.php +++ b/templates/search/item-preview.php @@ -105,4 +105,15 @@ class="c-degree-program-preview__link" admissionRequirementLink()?->name()) ?> + +
      + + : + + germanLanguageSkillsForInternationalStudents()->linkText()) ?> +
      From 8433bb397a40a52605b4dfddf57403f218046b0c Mon Sep 17 00:00:00 2001 From: Amin Date: Wed, 8 May 2024 14:35:06 +0200 Subject: [PATCH 3/8] chore(i18n): update translations --- languages/fau-degree-program-output-de_DE.mo | Bin 13885 -> 14511 bytes languages/fau-degree-program-output-de_DE.po | 85 ++++++++++++------ .../fau-degree-program-output-de_DE_formal.mo | Bin 13889 -> 14515 bytes .../fau-degree-program-output-de_DE_formal.po | 85 ++++++++++++------ languages/fau-degree-program-output.pot | 85 ++++++++++++------ 5 files changed, 174 insertions(+), 81 deletions(-) diff --git a/languages/fau-degree-program-output-de_DE.mo b/languages/fau-degree-program-output-de_DE.mo index aca530ad5e39f568089b927e97bde656ab5ba8e6..467568c88d23da35e3a18babe8f8f4519adf9a47 100644 GIT binary patch delta 3536 zcmZ|Qc~F#P0LSqM1>{%`!4*VI(6B&PIXv)MP&5-2MN7#GNmoQ=RTjKD)`L{U@>ng@ ztZZ`X51VYZtUN}?8D_GnF>4%cRMZ%&(VR53rn0f`kA0ajr{3ZBexCQ(_c`B}qYFP+ z;%$l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*@=BZi*b5sl z7k@&fE{UBg2ch1ADX2`W#dzF=O8I`&Ql7+eyn(vkOJ|AfKQo02Su)E}9n_;bIEq@^ z24qZg74_t?d=_;*73s@(Q7K)3TB<6H!}WL#{iw`U@NTNVji~$UF`DsBz&4!1)|{V1 zZKfNjf&ao*n8wcGLl!IxIBqADp&rC$LQgrEC?>SY+7iq;SYG6~)YiwL`d2nQi#d!T z9xaZ)B)W}LWt(2N)?zj>msn=oUdC!7mC%d!EU}tcPZSX~#B0P;gvvVN6{3L9?ou8n z5|5W9#w-l}JDFjxc&&@D4dEvi653KquF582FQG+I*+(eR4~ur0iWYHZu=f99s=uUV zlJgP`k;GVHzP*@f9c`V4+E?R=EyOHhBcUbNtGBJtQlz5JKyyy#9`AFkV>KUPP|7o|!HP3(9-7S9uEqamlHCRsQ zC2mHHB8C%L#0uhJDWtNN@CEwDOpXjhCFFz!YTDlj3&eJ5h>Fhb+PjZ8Cp#@WH*hIs VU}Ru?w$Bxa%~|dWH0J&o{vV9tJYN6+ diff --git a/languages/fau-degree-program-output-de_DE.po b/languages/fau-degree-program-output-de_DE.po index 1018f40..5344804 100644 --- a/languages/fau-degree-program-output-de_DE.po +++ b/languages/fau-degree-program-output-de_DE.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: FAU Degree Program Output 0.0.4\n" "Report-Msgid-Bugs-To: https://github.com/RRZE-Webteam/FAU-Studium-Embed\n" -"POT-Creation-Date: 2024-05-03T11:17:44+00:00\n" -"PO-Revision-Date: 2024-05-03 14:20+0300\n" +"POT-Creation-Date: 2024-05-08T12:29:17+00:00\n" +"PO-Revision-Date: 2024-05-08 14:32+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de_DE\n" @@ -15,22 +15,27 @@ msgstr "" "X-Domain: fau-degree-program-output\n" #. Plugin Name of the plugin +#: fau-degree-program-output.php msgid "FAU Degree Program Output" msgstr "FAU Studiengangsanzeige" #. Plugin URI of the plugin +#: fau-degree-program-output.php msgid "https://github.com/RRZE-Webteam/FAU-Studium-Embed" msgstr "https://github.com/RRZE-Webteam/FAU-Studium-Embed" #. Description of the plugin +#: fau-degree-program-output.php msgid "Fetch degree programs via the REST API and display them." msgstr "Abrufen von Studiengängen über die REST-API und deren Anzeige." #. Author of the plugin +#: fau-degree-program-output.php msgid "Syde GmbH" msgstr "Syde GmbH" #. Author URI of the plugin +#: fau-degree-program-output.php msgid "https://syde.com/" msgstr "https://syde.com/" @@ -39,56 +44,66 @@ msgctxt "backoffice: block editor category" msgid "FAU" msgstr "FAU" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:56 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:58 msgctxt "backoffice: Sort by options" msgid "Sort by title" msgstr "Nach Titel sortieren" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:61 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:63 msgctxt "backoffice: Sort by options" msgid "Sort by title Z-A" msgstr "Nach Titel sortieren Z-A" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:68 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:70 msgctxt "backoffice: Sort by options" msgid "Sort by degree" msgstr "Nach Abschluss sortieren" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:73 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:75 msgctxt "backoffice: Sort by options" msgid "Sort by degree Z-A" msgstr "Nach Abschluss sortieren Z-A" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:80 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:82 msgctxt "backoffice: Sort by options" msgid "Sort by semester" msgstr "Nach Semester sortieren" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:85 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:87 msgctxt "backoffice: Sort by options" msgid "Sort by semester Z-A" msgstr "Nach Semester sortieren Z-A" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:92 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:94 msgctxt "backoffice: Sort by options" msgid "Sort by study location" msgstr "Nach Studienort sortieren" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:97 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:99 msgctxt "backoffice: Sort by options" msgid "Sort by study location Z-A" msgstr "Nach Studienort sortieren Z-A" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:104 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:106 msgctxt "backoffice: Sort by options" msgid "Sort by admission requirement" msgstr "Nach Zugangsvoraussetzung sortieren" -#: src/Infrastructure/Component/DegreeProgramsCollection.php:109 +#: src/Infrastructure/Component/DegreeProgramsCollection.php:111 msgctxt "backoffice: Sort by options" msgid "Sort by admission requirement Z-A" msgstr "Nach Zugangsvoraussetzung sortieren Z-A" +#: src/Infrastructure/Component/DegreeProgramsCollection.php:118 +msgctxt "backoffice: Sort by options" +msgid "Sort by language certificates" +msgstr "Nach Sprachnachweise sortieren" + +#: src/Infrastructure/Component/DegreeProgramsCollection.php:123 +msgctxt "backoffice: Sort by options" +msgid "Sort by language certificates Z-A" +msgstr "Nach Sprachnachweise sortieren Z-A" + #: src/Infrastructure/Component/SingleDegreeProgram.php:132 msgid "Featured image" msgstr "Teaserbild" @@ -350,67 +365,72 @@ msgstr "Die folgenden Attribute werden ignoriert, wenn „Format“ „short“ msgid "Ignored if \"include\" is specified." msgstr "Wird ignoriert, wenn „einbeziehen“ angegeben ist." -#: src/Infrastructure/Filter/FilterViewFactory.php:58 +#: src/Infrastructure/Filter/FilterViewFactory.php:59 msgctxt "frontoffice: Filter label" msgid "Area of study" msgstr "Studienbereich" -#: src/Infrastructure/Filter/FilterViewFactory.php:70 +#: src/Infrastructure/Filter/FilterViewFactory.php:71 msgctxt "frontoffice: Filter label" msgid "Special ways to study" msgstr "Besondere Studienformen" -#: src/Infrastructure/Filter/FilterViewFactory.php:82 +#: src/Infrastructure/Filter/FilterViewFactory.php:83 msgctxt "frontoffice: Filter label" msgid "Degree" msgstr "Abschluss" -#: src/Infrastructure/Filter/FilterViewFactory.php:94 +#: src/Infrastructure/Filter/FilterViewFactory.php:95 msgctxt "frontoffice: Filter label" msgid "Faculty" msgstr "Fakultät" -#: src/Infrastructure/Filter/FilterViewFactory.php:106 +#: src/Infrastructure/Filter/FilterViewFactory.php:107 +msgctxt "frontoffice: Filter label" +msgid "German language skills for international students" +msgstr "Deutschkenntnisse für internationale Studierende" + +#: src/Infrastructure/Filter/FilterViewFactory.php:119 msgctxt "frontoffice: Filter label" msgid "Start of degree program" msgstr "Studienbeginn" -#: src/Infrastructure/Filter/FilterViewFactory.php:118 +#: src/Infrastructure/Filter/FilterViewFactory.php:131 msgctxt "frontoffice: Filter label" msgid "Study location" msgstr "Studienort" -#: src/Infrastructure/Filter/FilterViewFactory.php:130 +#: src/Infrastructure/Filter/FilterViewFactory.php:143 msgctxt "frontoffice: Filter label" msgid "Subject group" msgstr "Fächergruppe" -#: src/Infrastructure/Filter/FilterViewFactory.php:142 +#: src/Infrastructure/Filter/FilterViewFactory.php:155 msgctxt "frontoffice: Filter label" msgid "Teaching language" msgstr "Unterrichtssprache" -#: src/Infrastructure/Filter/FilterViewFactory.php:154 +#: src/Infrastructure/Filter/FilterViewFactory.php:167 msgctxt "frontoffice: Filter label" msgid "Keyword" msgstr "Schlagwort" -#: src/Infrastructure/Filter/FilterViewFactory.php:163 +#: src/Infrastructure/Filter/FilterViewFactory.php:176 msgctxt "frontoffice: Filter label" msgid "Admission Requirement" msgstr "Zugangsvoraussetzung" -#: src/Infrastructure/Filter/FilterViewFactory.php:210 +#: src/Infrastructure/Filter/FilterViewFactory.php:223 msgctxt "backoffice: Filter label" msgid "Restricted (NC)" msgstr "Eingeschränkt (NC)" -#: src/Infrastructure/Filter/FilterViewFactory.php:219 +#: src/Infrastructure/Filter/FilterViewFactory.php:232 msgctxt "backoffice: Filter label" msgid "Admission free" msgstr "Zulassungsfrei" -#: src/Infrastructure/Filter/FilterViewFactory.php:228 +#: src/Infrastructure/Filter/FilterViewFactory.php:241 msgctxt "backoffice: Filter label" msgid "Admission free with restriction" msgstr "Zulassungsfrei mit Einschränkung" @@ -434,6 +454,7 @@ msgstr "" #: templates/search/collection-table-header.php:135 #: templates/search/collection-table-header.php:167 #: templates/search/collection-table-header.php:199 +#: templates/search/collection-table-header.php:230 msgctxt "frontoffice: degree programs search result list" msgid "Sort by" msgstr "Sortieren nach" @@ -474,6 +495,11 @@ msgctxt "frontoffice: degree programs search result list" msgid "NC" msgstr "NC" +#: templates/search/collection-table-header.php:236 +msgctxt "frontoffice: degree programs search result list" +msgid "Language certificates" +msgstr "Sprachnachweise" + #: templates/search/degree-program-list-item.php:45 #: templates/search/item-preview.php:67 msgctxt "frontoffice: degree programs search result list" @@ -537,6 +563,11 @@ msgctxt "frontoffice: degree programs search form" msgid "Display mode" msgstr "Anzeigemodus" +#: templates/search/item-preview.php:111 +msgctxt "frontoffice: degree programs search result list" +msgid "German language skills for international students" +msgstr "Deutschkenntnisse für internationale Studierende" + #: templates/search/no-results.php:2 msgctxt "backoffice: Search results" msgid "No degree programs found" @@ -745,12 +776,12 @@ msgctxt "frontoffice: single view" msgid "Specific Student Advice" msgstr "Spezifische Studienberatung" -#: assets/ts/gutenberg.js:1 +#: assets/ts/gutenberg.js:235 msgctxt "backoffice: block editor" msgid "Select degree program" msgstr "Studiengang wählen" -#: assets/ts/gutenberg.js:1 +#: assets/ts/gutenberg.js:247 msgctxt "backend: block editor" msgid "Could not load suggestion list" msgstr "Vorschlagsliste konnte nicht geladen werden" diff --git a/languages/fau-degree-program-output-de_DE_formal.mo b/languages/fau-degree-program-output-de_DE_formal.mo index 39c25893da891a00d5a09cd52fb2b8588e1979ab..d2010a2bd8d8873c3555dbec039fdb501640fc34 100644 GIT binary patch delta 3536 zcmZ|RdrXyO0LSr%6yy$qM-VVUQ$q#0so(_=G!yZb*VIJBBVOR39L!sG)JR1vF9!`Z zD_gGqs4Y8Xdd7h7hCG2xhnF<4+}$0yidZ+Qs$m~(su;zf+aW*mz5u{WlL z8smpEk@GH7M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@{bCD#OD%AV@5h~T6q9$?`*=Obs zs^5RH6~>URG3Y@@GoNi6R-!iDIn)mxp`J8~_0fG^YZ2-R%d9hyPlj1+udhe_ey8;S zY9dE53ctZ<{Jt;iuTxnhTk2Cl>~T!F2z+Ui5C*>-#0fa>^j zjK!0vOr5u0L1pR&YJ&GM23?t<_BhmeM^t8=UR3m&46+wSqnq<7s3)0&O0f^sVLd9f zpIIAmCg;~t6E7tH`h6+tfhJ-LoQj(8G}O{93|)83GAf#J6>1NxLk+kGd8N&M?1N31 zgAY)t>%mS9rV#ZORH8CbgYmcpmGb?lrEJ8>cn5WVA)O_$|4bznCU2@y9UMk=a2&O^ zXOS_@E!2}I@LAM#FVdGOLZx&mYN^&@9B#ntxCfQF<-D8fuO4;(A&h2xbHX;9#cw50*+emED9A{j_M8sb~>r25bKxUiX)^ zPIlg;A(9wN%(oXatfQ^dQTu85HZ^gLs+HdpVMrLTn~f zwuT7)!%+1#Vm2|6NF#O<<;1JR^F?34>Sr3aQBMz@`_H&Nu6h1z?(TW(Y0- Date: Fri, 10 May 2024 09:23:04 +0200 Subject: [PATCH 4/8] feat: ensure "German language skills" terms and filter to be synced to consuming websites --- src/Infrastructure/Search/FilterablePostsMetaUpdater.php | 6 ++++++ src/Infrastructure/Search/FilterableTermsUpdater.php | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/Infrastructure/Search/FilterablePostsMetaUpdater.php b/src/Infrastructure/Search/FilterablePostsMetaUpdater.php index 2fdaae4..7b367d5 100644 --- a/src/Infrastructure/Search/FilterablePostsMetaUpdater.php +++ b/src/Infrastructure/Search/FilterablePostsMetaUpdater.php @@ -80,6 +80,12 @@ private function updateForLanguage(string $languageCode, DegreeProgramViewRaw $r $rawView->degree()->name()->asString($languageCode) ); + update_post_meta( + $rawView->id()->asInt(), + DegreeProgram::GERMAN_LANGUAGE_SKILLS_FOR_INTERNATIONAL_STUDENTS . '_' . $languageCode, + $rawView->germanLanguageSkillsForInternationalStudents()->name()->asString($languageCode) + ); + if ($rawView->start()->offsetExists(0)) { update_post_meta( $rawView->id()->asInt(), diff --git a/src/Infrastructure/Search/FilterableTermsUpdater.php b/src/Infrastructure/Search/FilterableTermsUpdater.php index 67fb6bb..ee00c81 100644 --- a/src/Infrastructure/Search/FilterableTermsUpdater.php +++ b/src/Infrastructure/Search/FilterableTermsUpdater.php @@ -21,6 +21,7 @@ use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\BachelorOrTeachingDegreeAdmissionRequirementTaxonomy; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\DegreeTaxonomy; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\FacultyTaxonomy; +use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\GermanLanguageSkillsForInternationalStudentsTaxonomy; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\MasterDegreeAdmissionRequirementTaxonomy; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\SemesterTaxonomy; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\StudyLocationTaxonomy; @@ -126,6 +127,8 @@ private function retrieveFilterableProperties(DegreeProgramViewRaw $rawView): ar $rawView->admissionRequirements()->master(), AreaOfStudyTaxonomy::KEY => $rawView->areaOfStudy(), + GermanLanguageSkillsForInternationalStudentsTaxonomy::KEY => + $rawView->germanLanguageSkillsForInternationalStudents(), ]; } From ad806f814525f447f5bb14ba4c1ac9bbf063fe28 Mon Sep 17 00:00:00 2001 From: Amin Date: Fri, 10 May 2024 09:36:35 +0200 Subject: [PATCH 5/8] chore(qa): update psalm baseline file --- psalm-baseline.xml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index e2ef787..551f363 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -16,11 +16,34 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -46,4 +69,9 @@ + + + + + From a115bc03b6b977b9a342fbede577c9cd7bc91ac9 Mon Sep 17 00:00:00 2001 From: Amin Date: Fri, 10 May 2024 09:36:59 +0200 Subject: [PATCH 6/8] chore: update common package --- composer.lock | 59 ++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/composer.lock b/composer.lock index f070edc..2ca0bd7 100644 --- a/composer.lock +++ b/composer.lock @@ -411,12 +411,12 @@ "source": { "type": "git", "url": "https://github.com/RRZE-Webteam/FAU-Studium-Common.git", - "reference": "aed0120df29663fc47c71fb5d6133f167b2c3fb9" + "reference": "58c96a8b5803f1188415fc97ba0e460527b6a755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/aed0120df29663fc47c71fb5d6133f167b2c3fb9", - "reference": "aed0120df29663fc47c71fb5d6133f167b2c3fb9", + "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/58c96a8b5803f1188415fc97ba0e460527b6a755", + "reference": "58c96a8b5803f1188415fc97ba0e460527b6a755", "shasum": "" }, "require": { @@ -483,7 +483,7 @@ "source": "https://github.com/RRZE-Webteam/FAU-Studium-Common/tree/dev", "issues": "https://github.com/RRZE-Webteam/FAU-Studium-Common/issues" }, - "time": "2024-05-07T08:32:41+00:00" + "time": "2024-05-10T07:24:11+00:00" }, { "name": "webmozart/assert", @@ -958,16 +958,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -1004,7 +1004,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -1020,7 +1020,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -2012,16 +2012,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc", + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc", "shasum": "" }, "require": { @@ -2053,9 +2053,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-05-06T12:04:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3502,16 +3502,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.3", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "shasum": "" }, "require": { @@ -3524,6 +3524,11 @@ "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -3549,7 +3554,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" + "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" }, "funding": [ { @@ -3561,7 +3566,7 @@ "type": "github" } ], - "time": "2024-02-07T10:39:02+00:00" + "time": "2024-05-01T10:20:27+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -4328,16 +4333,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.1", + "version": "5.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", "shasum": "" }, "require": { @@ -4434,7 +4439,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-11T20:33:46+00:00" + "time": "2024-05-01T19:32:08+00:00" }, { "name": "wp-coding-standards/wpcs", From 1f0bac85e60643705fea887b0d528bfb74ec6c79 Mon Sep 17 00:00:00 2001 From: Amin Date: Fri, 10 May 2024 09:37:06 +0200 Subject: [PATCH 7/8] style: fix style lint issues --- resources/scss/components/search/_collection.scss | 1 + resources/scss/components/search/_preview-item.scss | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/scss/components/search/_collection.scss b/resources/scss/components/search/_collection.scss index 2fe4cd9..57237f6 100644 --- a/resources/scss/components/search/_collection.scss +++ b/resources/scss/components/search/_collection.scss @@ -125,6 +125,7 @@ } &.-language-certificates { + @include config.when-inside(".c-degree-programs-collection:not([data-active-filters*=german-language-skills-for-international-students])") { display: none !important; } diff --git a/resources/scss/components/search/_preview-item.scss b/resources/scss/components/search/_preview-item.scss index e2ebc95..e2c7be0 100644 --- a/resources/scss/components/search/_preview-item.scss +++ b/resources/scss/components/search/_preview-item.scss @@ -228,6 +228,13 @@ } } + &__language-certificates { + + @include config.when-inside(".c-degree-programs-collection:not([data-active-filters*=german-language-skills-for-international-students])") { + display: none; + } + } + &__degree, &__start, &__location, @@ -276,10 +283,4 @@ @include config.screen-reader-text; } } - - &__language-certificates { - @include config.when-inside(".c-degree-programs-collection:not([data-active-filters*=german-language-skills-for-international-students])") { - display: none; - } - } } From ed8ff7e258ff2835603eb597ad17ae8325f9fe3d Mon Sep 17 00:00:00 2001 From: Amin Date: Fri, 10 May 2024 09:47:18 +0200 Subject: [PATCH 8/8] chore(qa): update psalm baseline file --- psalm-baseline.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 551f363..f299238 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -44,11 +44,6 @@ - - - - - nextPage()]]>