Some random text with no tables around.
',
+ 'Some random text with no tables around.
',
+ ],
+ ];
+ }
+
+}
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-ar.po b/modules/oe_theme_helper/translations/oe_theme_helper-ar.po
new file mode 100644
index 000000000..d8f1a12cd
--- /dev/null
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-ar.po
@@ -0,0 +1,309 @@
+
+msgid ""
+msgstr ""
+
+msgid "Organisation type"
+msgstr "نوع المنظمة"
+
+msgid "Show @numb more items"
+msgstr "إظهار @numb المزيد من العناصر"
+
+msgid "When"
+msgstr "الموعد"
+
+msgid "Where"
+msgstr "المكان"
+
+msgid "Organiser"
+msgstr "المنظم"
+
+msgid "Website"
+msgstr "الموقع الإلكتروني"
+
+msgid "Social media"
+msgstr "وسائل التواصل الاجتماعي"
+
+msgid "Number of seats"
+msgstr "عدد المقاعد"
+
+msgid "Entrance fee"
+msgstr "رسوم الدخول"
+
+msgid "Book your seat, @time_left left to register, registration will end on @end_date"
+msgstr "احجز مقعدك، @time_left بقي للتسجيل، وسوف ينتهي التسجيل في @end_date."
+
+msgid "Registration will open in @time_left. You can register from @start_date, until @end_date."
+msgstr "سيتم فتح التسجيل في @time_left. يمكنكم التسجيل من @start_date ، حتى @end_date."
+
+msgid "Registration period ended on @end_date."
+msgstr "انتهت فترة التسجيل في @end_date."
+
+msgid "Postal address"
+msgstr "العنوان البريدي"
+
+msgid "Authors"
+msgstr "الكتّاب"
+
+msgid "Department"
+msgstr "القسم"
+
+msgid "Project duration"
+msgstr "مدة المشروع"
+
+msgid "Project website"
+msgstr "موقع المشروع الإلكتروني"
+
+msgid "Contact organisation"
+msgstr "جهة الاتصال"
+
+msgid "Call status: @label"
+msgstr "حالة الدعوة: @label"
+
+msgid "Press contacts"
+msgstr "معلومات الاتصال للصحافة"
+
+msgid "Call for tenders"
+msgstr "دعوة لتقديم عطاءات"
+
+msgid "Related links"
+msgstr "روابط ذات صلة"
+
+msgid "Practical information"
+msgstr "معلومات عملية"
+
+msgid "Phone number"
+msgstr "رقم الهاتف"
+
+msgid "Opening date"
+msgstr "موعد بدء استقبال الطلبات"
+
+msgid "Deadline date"
+msgstr "الموعد النهائي"
+
+msgid "Deadline dates"
+msgstr "المواعيد النهائية"
+
+msgid "Publication date"
+msgstr "تاريخ النشر"
+
+msgid "Author"
+msgstr "الكاتب"
+
+msgid "Location"
+msgstr "الموقع"
+
+msgid "News type"
+msgstr "نوع الخبر"
+
+msgid "Project locations"
+msgstr "مواقع المشروع"
+
+msgid "Overall budget"
+msgstr "الميزانية الإجمالية"
+
+msgid "EU contribution"
+msgstr "مساهمة الاتحاد الأوروبي"
+
+msgid "Departments"
+msgstr "الأقسام"
+
+msgid "Results"
+msgstr "النتائج"
+
+msgid "Stakeholders"
+msgstr "أصحاب المصلحة"
+
+msgid "Coordinators"
+msgstr "المنسقون"
+
+msgid "Participants"
+msgstr "المشاركون"
+
+msgid "Country"
+msgstr "البلد"
+
+msgid "Countries"
+msgstr "البلدان"
+
+msgid "EU Organisation"
+msgstr "منظمة تابعة للاتحاد الأوروبي"
+
+msgid "Non-EU organisation"
+msgstr "منظمة غير تابعة للاتحاد الأوروبي"
+
+msgid "Reference"
+msgstr "رقم المرجع"
+
+msgid "Upcoming"
+msgstr "لم يفتح بعد"
+
+msgid "Open"
+msgstr "مفتوح"
+
+msgid "Closed"
+msgstr "مغلق"
+
+msgid "Details"
+msgstr "التفاصيل"
+
+msgid "Status"
+msgstr "حالة الدعوة"
+
+msgid "Publication"
+msgstr "منشور"
+
+msgid "Description"
+msgstr "الوصف"
+
+msgid "Email"
+msgstr "البريد الإلكتروني"
+
+msgid "Contact"
+msgstr "اتصل بنا"
+
+msgid "Contacts"
+msgstr "جهات الاتصال"
+
+msgid "Organisation"
+msgstr "اسم المنظمة"
+
+msgid "Fax number"
+msgstr "رقم الفاكس"
+
+msgid "Mobile number"
+msgstr "رقم الهاتف المحمول"
+
+msgid "Office"
+msgstr "مكتب"
+
+msgid "Documents"
+msgstr "الوثائق والمستندات"
+
+msgid "Funding"
+msgstr "التمويل"
+
+msgid "As planned"
+msgstr "كما هو مخطط"
+
+msgid "Cancelled"
+msgstr "ملغى"
+
+msgid "Rescheduled"
+msgstr "معاد جدولته"
+
+msgid "Postponed"
+msgstr "مؤجل"
+
+msgid "Address"
+msgstr "العنوان"
+
+msgid "Live stream"
+msgstr "البث المباشر"
+
+msgid "Live streaming available"
+msgstr "البث المباشر متاح"
+
+msgid "Project"
+msgstr "مشروع"
+
+msgid "Publication type"
+msgstr "نوع المنشور"
+
+msgid "Call for proposals"
+msgstr "دعوة لتقديم مقترحات"
+
+msgid "Funding programme"
+msgstr "برنامج التمويل"
+
+msgid "Deadline model"
+msgstr "نموذج الموعد النهائي"
+
+msgid "Single-stage"
+msgstr "على مرحلة واحدة"
+
+msgid "Two-stage"
+msgstr "على مرحلتين"
+
+msgid "Multiple cut-off"
+msgstr "عدة مراحل متقطعة"
+
+msgid "Permanent"
+msgstr "دائم"
+
+msgid "Last updated on: @date"
+msgstr "آخر تحديث في: @date"
+
+msgid "File"
+msgstr "ملف"
+
+msgid "Files"
+msgstr "ملفات"
+
+msgid "Identification"
+msgstr "تعريف"
+
+msgid "Identifications"
+msgstr "تعريفات"
+
+msgid "Related department"
+msgstr "القسم ذو الصلة"
+
+msgid "Related departments"
+msgstr "الأقسام ذوي الصلة"
+
+msgid "Consultation"
+msgstr "استشارة"
+
+msgid "Deadline"
+msgstr "الموعد نهائي"
+
+msgid "Respond to the questionnaire"
+msgstr "الرد على الاستبيان"
+
+msgid "Respond to the consultation"
+msgstr "الرد على الاستشارة"
+
+msgid "Target audience"
+msgstr "الجمهور المستهدف"
+
+msgid "Why we are consulting"
+msgstr "لماذا نطلب الاستشارة"
+
+msgid "Consultation outcome"
+msgstr "نتائج الاستشارة"
+
+msgid "Additional information"
+msgstr "معلومات إضافية"
+
+msgid "Reference documents"
+msgstr "المستندات المرجعية"
+
+msgid "The response period for this consultation has ended. Thank you for your input."
+msgstr "انتهت فترة الاستجابة لهذه الاستشارة. شكراً على مساهمتكم."
+
+msgid "Responsibilities"
+msgstr "المسؤوليات"
+
+msgid "Media"
+msgstr "الإعلام"
+
+msgid "Latest"
+msgstr "آخر الأحداث"
+
+msgid "Transparency"
+msgstr "الشفافية"
+
+msgid "Articles and presentations"
+msgstr "مقالات وعروض تقديمية"
+
+msgid "Biography"
+msgstr "السيرة الذاتية"
+
+msgid "Declaration of interests"
+msgstr "إعلان المصالح "
+
+msgid "Show contact details"
+msgstr "إظهار تفاصيل الاتصال"
+
+msgid "Hide contact details"
+msgstr "إخفاء تفاصيل الاتصال"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-bg.po b/modules/oe_theme_helper/translations/oe_theme_helper-bg.po
index c9a90caa5..fb742a448 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-bg.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-bg.po
@@ -336,3 +336,6 @@ msgstr "Показване на координати за връзка"
msgid "Hide contact details"
msgstr "Скриване на координатите за връзка"
+
+msgid "Leadership and organisation"
+msgstr "Ръководство и организация"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-ca.po b/modules/oe_theme_helper/translations/oe_theme_helper-ca.po
new file mode 100644
index 000000000..4bcb30397
--- /dev/null
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-ca.po
@@ -0,0 +1,309 @@
+
+msgid ""
+msgstr ""
+
+msgid "Organisation type"
+msgstr "Tipus d'organització"
+
+msgid "Show @numb more items"
+msgstr "Mostra @numb elements més"
+
+msgid "When"
+msgstr "Quan"
+
+msgid "Where"
+msgstr "On"
+
+msgid "Organiser"
+msgstr "Organitzador"
+
+msgid "Website"
+msgstr "Lloc web"
+
+msgid "Social media"
+msgstr "Xarxes socials"
+
+msgid "Number of seats"
+msgstr "Nombre de localitats"
+
+msgid "Entrance fee"
+msgstr "Preu de l'entrada"
+
+msgid "Book your seat, @time_left left to register, registration will end on @end_date"
+msgstr "Reserveu la vostra plaça. Queden @time_left per inscriure's-hi. El termini acaba el @end_date."
+
+msgid "Registration will open in @time_left. You can register from @start_date, until @end_date."
+msgstr "El termini d'inscripció comença el @time_left. Podeu inscriure-us del @start_date al @end_date."
+
+msgid "Registration period ended on @date."
+msgstr "El termini d'inscripció va finalitzar el @end_date."
+
+msgid "Postal address"
+msgstr "Adreça postal"
+
+msgid "Authors"
+msgstr "Autors"
+
+msgid "Department"
+msgstr "Servei"
+
+msgid "Project duration"
+msgstr "Durada del projecte"
+
+msgid "Project website"
+msgstr "Lloc web del projecte"
+
+msgid "Contact organisation"
+msgstr "Organització de contacte"
+
+msgid "Call status: @label"
+msgstr "Estat de la convocatòria: @label"
+
+msgid "Press contacts"
+msgstr "Contactes de premsa"
+
+msgid "Call for tenders"
+msgstr "Convocatòria de licitacions"
+
+msgid "Related links"
+msgstr "Enllaços relacionats"
+
+msgid "Practical information"
+msgstr "Informació pràctica"
+
+msgid "Phone number"
+msgstr "Número de telèfon"
+
+msgid "Opening date"
+msgstr "Data d'obertura"
+
+msgid "Deadline date"
+msgstr "Data límit"
+
+msgid "Deadline dates"
+msgstr "Dates límit"
+
+msgid "Publication date"
+msgstr "Data de publicació"
+
+msgid "Author"
+msgstr "Autor"
+
+msgid "Location"
+msgstr "Lloc"
+
+msgid "News type"
+msgstr "Tipus de notícia"
+
+msgid "Project locations"
+msgstr "Llocs del projecte"
+
+msgid "Overall budget"
+msgstr "Pressupost total"
+
+msgid "EU contribution"
+msgstr "Contribució de la UE"
+
+msgid "Departments"
+msgstr "Serveis"
+
+msgid "Results"
+msgstr "Resultats"
+
+msgid "Stakeholders"
+msgstr "Parts interessades"
+
+msgid "Coordinators"
+msgstr "Coordinadors"
+
+msgid "Participants"
+msgstr "Participants"
+
+msgid "Country"
+msgstr "País"
+
+msgid "Countries"
+msgstr "Països"
+
+msgid "EU Organisation"
+msgstr "Organització de la UE"
+
+msgid "Non-EU organisation"
+msgstr "Organització no pertanyent a la UE"
+
+msgid "Reference"
+msgstr "Referència"
+
+msgid "Upcoming"
+msgstr "Properament"
+
+msgid "Open"
+msgstr "Obert"
+
+msgid "Closed"
+msgstr "Tancat"
+
+msgid "Details"
+msgstr "Detalls"
+
+msgid "Status"
+msgstr "Estat"
+
+msgid "Publication"
+msgstr "Publicació"
+
+msgid "Description"
+msgstr "Descripció"
+
+msgid "Email"
+msgstr "Correu electrònic"
+
+msgid "Contact"
+msgstr "Contacte"
+
+msgid "Contacts"
+msgstr "Contactes"
+
+msgid "Organisation"
+msgstr "Organització"
+
+msgid "Fax number"
+msgstr "Número de fax"
+
+msgid "Mobile number"
+msgstr "Número de mòbil"
+
+msgid "Office"
+msgstr "Oficina"
+
+msgid "Documents"
+msgstr "Documents"
+
+msgid "Funding"
+msgstr "Finançament"
+
+msgid "As planned"
+msgstr "Com estava previst"
+
+msgid "Cancelled"
+msgstr "Cancel·lat"
+
+msgid "Rescheduled"
+msgstr "Reprogramat"
+
+msgid "Postponed"
+msgstr "Ajornat"
+
+msgid "Address"
+msgstr "Adreça"
+
+msgid "Live stream"
+msgstr "Retransmissió en directe"
+
+msgid "Live streaming available"
+msgstr "Retransmissió en directe disponible"
+
+msgid "Project"
+msgstr "Projecte"
+
+msgid "Publication type"
+msgstr "Tipus de publicació"
+
+msgid "Call for proposals"
+msgstr "Convocatòria de propostes"
+
+msgid "Funding programme"
+msgstr "Programa de finançament"
+
+msgid "Deadline model"
+msgstr "Model de termini"
+
+msgid "Single-stage"
+msgstr "D'una fase"
+
+msgid "Two-stage"
+msgstr "De dues fases"
+
+msgid "Multiple cut-off"
+msgstr "Vàries dates límit"
+
+msgid "Permanent"
+msgstr "Permanent"
+
+msgid "Last updated on: @date"
+msgstr "Darrera actualització: @date "
+
+msgid "File"
+msgstr "Arxiu"
+
+msgid "Files"
+msgstr "Arxius"
+
+msgid "Identification"
+msgstr "Identificació"
+
+msgid "Identifications"
+msgstr "Identificacions"
+
+msgid "Related department"
+msgstr "Servei relacionat"
+
+msgid "Related departments"
+msgstr "Serveis relacionats"
+
+msgid "Consultation"
+msgstr "Consulta"
+
+msgid "Deadline"
+msgstr "Data límit"
+
+msgid "Respond to the questionnaire"
+msgstr "Responeu el qüestionari"
+
+msgid "Respond to the consultation"
+msgstr "Responeu a la consulta"
+
+msgid "Target audience"
+msgstr "Destinatari"
+
+msgid "Why we are consulting"
+msgstr "Per què fem aquesta consulta"
+
+msgid "Consultation outcome"
+msgstr "Resultat de la consulta"
+
+msgid "Additional information"
+msgstr "Informació addicional"
+
+msgid "Reference documents"
+msgstr "Documents de referència"
+
+msgid "Responsibilities"
+msgstr "Responsabilitats"
+
+msgid "Media"
+msgstr "Mitjans de comunicació"
+
+msgid "Latest"
+msgstr "Actualitat"
+
+msgid "Transparency"
+msgstr "Transparència"
+
+msgid "Articles and presentations"
+msgstr "Articles i presentacions"
+
+msgid "Biography"
+msgstr "Biografia"
+
+msgid "Declaration of interests"
+msgstr "Declaració d'interessos"
+
+msgid "Show contact details"
+msgstr "Mostra les dades de contacte"
+
+msgid "Hide contact details"
+msgstr "Amagueu les dades de contacte"
+
+msgid "Leadership and organisation"
+msgstr "Direcció i organització"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-cs.po b/modules/oe_theme_helper/translations/oe_theme_helper-cs.po
index 412a68f06..5f85d7d32 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-cs.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-cs.po
@@ -336,3 +336,6 @@ msgstr "Zobrazit kontaktní údaje"
msgid "Hide contact details"
msgstr "Skrýt kontaktní údaje"
+
+msgid "Leadership and organisation"
+msgstr "Vedení a organizace"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-da.po b/modules/oe_theme_helper/translations/oe_theme_helper-da.po
index 6ebf6a55a..16cda2851 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-da.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-da.po
@@ -336,3 +336,6 @@ msgstr "Vis kontaktoplysninger"
msgid "Hide contact details"
msgstr "Skjul kontaktoplysninger"
+
+msgid "Leadership and organisation"
+msgstr "Ledelse og organisation"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-de.po b/modules/oe_theme_helper/translations/oe_theme_helper-de.po
index 689d59aa4..a60084aec 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-de.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-de.po
@@ -336,3 +336,6 @@ msgstr "Kontaktdaten anzeigen"
msgid "Hide contact details"
msgstr "Kontaktdaten verbergen"
+
+msgid "Leadership and organisation"
+msgstr "Leitung und Organisation"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-el.po b/modules/oe_theme_helper/translations/oe_theme_helper-el.po
index 1bda39b7c..0bb6262b4 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-el.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-el.po
@@ -336,3 +336,6 @@ msgstr "Εμφάνιση στοιχείων επικοινωνίας"
msgid "Hide contact details"
msgstr "Απόκρυψη στοιχείων επικοινωνίας"
+
+msgid "Leadership and organisation"
+msgstr "Διοίκηση και οργάνωση"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-es.po b/modules/oe_theme_helper/translations/oe_theme_helper-es.po
index bfe23e5de..721fbfedb 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-es.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-es.po
@@ -336,3 +336,6 @@ msgstr "Mostrar datos del contacto"
msgid "Hide contact details"
msgstr "Ocultar datos de contacto"
+
+msgid "Leadership and organisation"
+msgstr "Dirección y organización"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-et.po b/modules/oe_theme_helper/translations/oe_theme_helper-et.po
index e60066c3c..af5c9ba19 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-et.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-et.po
@@ -336,3 +336,6 @@ msgstr "Näita kontaktandmeid"
msgid "Hide contact details"
msgstr "Peida kontaktandmed"
+
+msgid "Leadership and organisation"
+msgstr "Juhtkond ja struktuur"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-fi.po b/modules/oe_theme_helper/translations/oe_theme_helper-fi.po
index 0739c7b69..bf1b51bd5 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-fi.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-fi.po
@@ -336,3 +336,6 @@ msgstr "Näytä yhteystiedot"
msgid "Hide contact details"
msgstr "Piilota yhteystiedot"
+
+msgid "Leadership and organisation"
+msgstr "Johto ja organisaatio"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-fr.po b/modules/oe_theme_helper/translations/oe_theme_helper-fr.po
index dbeb04a78..60b1e0607 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-fr.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-fr.po
@@ -336,3 +336,6 @@ msgstr "Afficher les coordonnées"
msgid "Hide contact details"
msgstr "Masquer les coordonnées"
+
+msgid "Leadership and organisation"
+msgstr "Direction et organisation"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-ga.po b/modules/oe_theme_helper/translations/oe_theme_helper-ga.po
index 3a29ac65a..7ffb18190 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-ga.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-ga.po
@@ -336,3 +336,6 @@ msgstr "Taispeáin de shonraí teagmhála"
msgid "Hide contact details"
msgstr "Cuir na sonraí teagmhála i bhfolach"
+
+msgid "Leadership and organisation"
+msgstr "Ceannaireacht agus eagrúchán"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-hr.po b/modules/oe_theme_helper/translations/oe_theme_helper-hr.po
index becc6b5ce..9fc0aa703 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-hr.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-hr.po
@@ -336,3 +336,6 @@ msgstr "Prikaži podatke za kontakt"
msgid "Hide contact details"
msgstr "Sakrij podatke za kontakt"
+
+msgid "Leadership and organisation"
+msgstr "Vodstvo i ustroj"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-hu.po b/modules/oe_theme_helper/translations/oe_theme_helper-hu.po
index 65ed20db1..4dfd07511 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-hu.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-hu.po
@@ -336,3 +336,6 @@ msgstr "Elérhetőségi adatok megjelenítése"
msgid "Hide contact details"
msgstr "Elérhetőségi adatok elrejtése"
+
+msgid "Leadership and organisation"
+msgstr "Vezetés és szervezeti felépítés"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-it.po b/modules/oe_theme_helper/translations/oe_theme_helper-it.po
index 71026c4b8..dd8cf5230 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-it.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-it.po
@@ -336,3 +336,6 @@ msgstr "Mostra contatti"
msgid "Hide contact details"
msgstr "Nascondi i contatti"
+
+msgid "Leadership and organisation"
+msgstr "Direzione e organizzazione"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-lt.po b/modules/oe_theme_helper/translations/oe_theme_helper-lt.po
index 57cbcd6dd..a2e64b579 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-lt.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-lt.po
@@ -336,3 +336,6 @@ msgstr "Rodyti kontaktinius duomenis"
msgid "Hide contact details"
msgstr "Slėpti kontaktinius duomenis"
+
+msgid "Leadership and organisation"
+msgstr "Vadovybė ir organizacinė struktūra"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-lv.po b/modules/oe_theme_helper/translations/oe_theme_helper-lv.po
index a4045b769..d9b0adec3 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-lv.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-lv.po
@@ -336,3 +336,6 @@ msgstr "Parādīt kontaktinformāciju"
msgid "Hide contact details"
msgstr "Paslēpt kontaktinformāciju"
+
+msgid "Leadership and organisation"
+msgstr "Vadība un organizācija"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-mt.po b/modules/oe_theme_helper/translations/oe_theme_helper-mt.po
index cf5d67a85..8217638f1 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-mt.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-mt.po
@@ -336,3 +336,6 @@ msgstr "Uri d-dettalji ta' kuntatt"
msgid "Hide contact details"
msgstr "Aħbi d-dettalji ta' kuntatt"
+
+msgid "Leadership and organisation"
+msgstr "Tmexxija u organizzazzjoni"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-nl.po b/modules/oe_theme_helper/translations/oe_theme_helper-nl.po
index 8cf38098a..abe28feee 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-nl.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-nl.po
@@ -336,3 +336,6 @@ msgstr "Contactinformatie"
msgid "Hide contact details"
msgstr "Contactinformatie verbergen"
+
+msgid "Leadership and organisation"
+msgstr "Leiding en organisatie"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-pl.po b/modules/oe_theme_helper/translations/oe_theme_helper-pl.po
index 1941afa5e..861cebefb 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-pl.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-pl.po
@@ -336,3 +336,6 @@ msgstr "Pokaż dane kontaktowe"
msgid "Hide contact details"
msgstr "Ukryj dane kontaktowe"
+
+msgid "Leadership and organisation"
+msgstr "Kierownictwo i organizacja"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-pt-pt.po b/modules/oe_theme_helper/translations/oe_theme_helper-pt-pt.po
index 65503a919..6aa59fc8c 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-pt-pt.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-pt-pt.po
@@ -336,3 +336,6 @@ msgstr "Ver contactos"
msgid "Hide contact details"
msgstr "Ocultar contactos"
+
+msgid "Leadership and organisation"
+msgstr "Direção e organização"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-ro.po b/modules/oe_theme_helper/translations/oe_theme_helper-ro.po
index 830537045..8831fbcff 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-ro.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-ro.po
@@ -336,3 +336,6 @@ msgstr "Afișați datele de contact"
msgid "Hide contact details"
msgstr "Ascundeți datele de contact"
+
+msgid "Leadership and organisation"
+msgstr "Conducere și organizare"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-sk.po b/modules/oe_theme_helper/translations/oe_theme_helper-sk.po
index 315dca476..fb087dc67 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-sk.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-sk.po
@@ -336,3 +336,6 @@ msgstr "Zobraziť kontaktné informácie"
msgid "Hide contact details"
msgstr "Skryť kontaktné informácie"
+
+msgid "Leadership and organisation"
+msgstr "Vedenie a organizácia"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-sl.po b/modules/oe_theme_helper/translations/oe_theme_helper-sl.po
index 7916026d9..526a3fd3d 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-sl.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-sl.po
@@ -336,3 +336,6 @@ msgstr "Prikaži kontaktne podatke"
msgid "Hide contact details"
msgstr "Skrij kontaktne podatke"
+
+msgid "Leadership and organisation"
+msgstr "Vodstvo in organiziranost"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-sv.po b/modules/oe_theme_helper/translations/oe_theme_helper-sv.po
index d23fae659..6acc83c13 100644
--- a/modules/oe_theme_helper/translations/oe_theme_helper-sv.po
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-sv.po
@@ -336,3 +336,6 @@ msgstr "Visa kontaktuppgifter"
msgid "Hide contact details"
msgstr "Dölj kontaktuppgifter"
+
+msgid "Leadership and organisation"
+msgstr "Ledning och organisation"
diff --git a/modules/oe_theme_helper/translations/oe_theme_helper-tr.po b/modules/oe_theme_helper/translations/oe_theme_helper-tr.po
new file mode 100644
index 000000000..b66ffd880
--- /dev/null
+++ b/modules/oe_theme_helper/translations/oe_theme_helper-tr.po
@@ -0,0 +1,309 @@
+
+msgid ""
+msgstr ""
+
+msgid "Organisation type"
+msgstr "Organizasyon türü"
+
+msgid "Show @numb more items"
+msgstr "Daha fazla öğe göster @numb"
+
+msgid "When"
+msgstr "Tarih"
+
+msgid "Where"
+msgstr "Yer"
+
+msgid "Organiser"
+msgstr "Organizatör"
+
+msgid "Website"
+msgstr "İnternet sitesi"
+
+msgid "Social media"
+msgstr "Sosyal medya"
+
+msgid "Number of seats"
+msgstr "Yer sayısı"
+
+msgid "Entrance fee"
+msgstr "Giriş ücreti"
+
+msgid "Book your seat, @time_left left to register, registration will end on @end_date"
+msgstr "Yerinizi ayırmak için rezervasyon yapın, Kayıt için kalan süre: @time_left, Kayıtlar @end_date tarihinde sona erecek."
+
+msgid "Registration will open in @time_left. You can register from @start_date, until @end_date."
+msgstr "Kayıtlar @time_left içinde açılacaktır. @start_date tarihinden @end_date tarihine kadar kayıt yaptırabilirsiniz.yaptırabilirsiniz."
+
+msgid "Registration period ended on @date."
+msgstr "Kayıt dönemi @end_date tarihinde sona erdi."
+
+msgid "Postal address"
+msgstr "Posta adresi"
+
+msgid "Authors"
+msgstr "Yazarlar"
+
+msgid "Department"
+msgstr "Bölüm"
+
+msgid "Project duration"
+msgstr "Proje süresi"
+
+msgid "Project website"
+msgstr "Proje web sitesi"
+
+msgid "Contact organisation"
+msgstr "İletişime geçilecek kurum"
+
+msgid "Call status: @label"
+msgstr "Çağrı durumu: @label"
+
+msgid "Press contacts"
+msgstr "İletişime geçilecek basın görevlileri"
+
+msgid "Call for tenders"
+msgstr "İhale çağrısı"
+
+msgid "Related links"
+msgstr "İlgili linkler (bağlantılar)"
+
+msgid "Practical information"
+msgstr "Pratik bilgiler"
+
+msgid "Phone number"
+msgstr "Telefon numarası"
+
+msgid "Opening date"
+msgstr "Açılış tarihi"
+
+msgid "Deadline date"
+msgstr "Son teslim tarihi"
+
+msgid "Deadline dates"
+msgstr "Son teslim tarihleri"
+
+msgid "Publication date"
+msgstr "Yayın tarihi"
+
+msgid "Author"
+msgstr "Yazar"
+
+msgid "Location"
+msgstr "Konum "
+
+msgid "News type"
+msgstr "Haber türü"
+
+msgid "Project locations"
+msgstr "Proje yerleri"
+
+msgid "Overall budget"
+msgstr "Genel bütçe"
+
+msgid "EU contribution"
+msgstr "AB katkısı"
+
+msgid "Departments"
+msgstr "Bölümler"
+
+msgid "Results"
+msgstr "Sonuçlar"
+
+msgid "Stakeholders"
+msgstr "Paydaşlar"
+
+msgid "Coordinators"
+msgstr "Koordinatörler"
+
+msgid "Participants"
+msgstr "Katılımcılar"
+
+msgid "Country"
+msgstr "Ülke"
+
+msgid "Countries"
+msgstr "Ülkeler"
+
+msgid "EU Organisation"
+msgstr "AB Organizasyonu"
+
+msgid "Non-EU organisation"
+msgstr "AB Dışı Kuruluş"
+
+msgid "Reference"
+msgstr "Referans"
+
+msgid "Upcoming"
+msgstr "Önümüzdeki"
+
+msgid "Open"
+msgstr "Açık"
+
+msgid "Closed"
+msgstr "Kapalı"
+
+msgid "Details"
+msgstr "Detaylar"
+
+msgid "Status"
+msgstr "Durum"
+
+msgid "Publication"
+msgstr "Yayın"
+
+msgid "Description"
+msgstr "Açıklama"
+
+msgid "Email"
+msgstr "E-posta adresi"
+
+msgid "Contact"
+msgstr "İletişim"
+
+msgid "Contacts"
+msgstr "İletişime geçilecek kişiler"
+
+msgid "Organisation"
+msgstr "Organizasyon "
+
+msgid "Fax number"
+msgstr "Faks numarası"
+
+msgid "Mobile number"
+msgstr "Mobil telefon numarası"
+
+msgid "Office"
+msgstr "Ofis"
+
+msgid "Documents"
+msgstr "Belgeler"
+
+msgid "Funding"
+msgstr "Finansman"
+
+msgid "As planned"
+msgstr "Planlandığı üzere"
+
+msgid "Cancelled"
+msgstr "İptal edildi"
+
+msgid "Rescheduled"
+msgstr "Yeni bir tarihe ertelendi"
+
+msgid "Postponed"
+msgstr "Ertelendi"
+
+msgid "Address"
+msgstr "Adres"
+
+msgid "Live stream"
+msgstr "Canlı yayın"
+
+msgid "Live streaming available"
+msgstr "Canlı yayın mevcut"
+
+msgid "Project"
+msgstr "Proje"
+
+msgid "Publication type"
+msgstr "Yayın türü"
+
+msgid "Call for proposals"
+msgstr "Teklif çağrısı"
+
+msgid "Funding programme"
+msgstr "Finansman programı"
+
+msgid "Deadline model"
+msgstr "Son teslim tarihi modeli"
+
+msgid "Single-stage"
+msgstr "Tek aşamalı"
+
+msgid "Two-stage"
+msgstr "İki aşamalı"
+
+msgid "Multiple cut-off"
+msgstr "Çoklu aşamalı ihale düzeni"
+
+msgid "Permanent"
+msgstr "Kalıcı"
+
+msgid "File"
+msgstr "Dosya"
+
+msgid "Files"
+msgstr "Dosyalar"
+
+msgid "Identification"
+msgstr "Kimlik"
+
+msgid "Identifications"
+msgstr "Kimlikler"
+
+msgid "Related department"
+msgstr "İlgili bölüm"
+
+msgid "Related departments"
+msgstr "İlgili bölümler"
+
+msgid "Consultation"
+msgstr "İstişare "
+
+msgid "Deadline"
+msgstr "Son teslim tarihi"
+
+msgid "Respond to the questionnaire"
+msgstr "Ankete katılın"
+
+msgid "Respond to the consultation"
+msgstr "Halka açık istişare toplantısına katılın"
+
+msgid "Target audience"
+msgstr "Hedef kitle"
+
+msgid "Why we are consulting"
+msgstr "Neden istişare toplantısı düzenliyoruz"
+
+msgid "Consultation outcome"
+msgstr "İstişare toplantısı sonucu"
+
+msgid "Additional information"
+msgstr "Ek Bilgiler"
+
+msgid "Reference documents"
+msgstr "Referans dökümanlar"
+
+msgid "The response period for this consultation has ended. Thank you for your input."
+msgstr "Bu istişare toplantısı için yanıt süresi sona ermiştir. Katkılarınız için teşekkürler."
+
+msgid "Responsibilities"
+msgstr "Sorumluluklar"
+
+msgid "Media"
+msgstr "Medya"
+
+msgid "Latest"
+msgstr "Son"
+
+msgid "Transparency"
+msgstr "Şeffaflık"
+
+msgid "Articles and presentations"
+msgstr "Makaleler ve sunumlar"
+
+msgid "Biography"
+msgstr "Biyografi"
+
+msgid "Declaration of interests"
+msgstr "İlgi alanları beyanı"
+
+msgid "Show contact details"
+msgstr "İletişim bilgilerinizi gösteriniz"
+
+msgid "Hide contact details"
+msgstr "İletişim bilgilerinizi gizle"
+
+msgid "Leadership and organisation"
+msgstr "Liderlik ve organizasyon"
diff --git a/oe_theme.libraries.yml b/oe_theme.libraries.yml
index be19fce27..2c1d1c9f4 100644
--- a/oe_theme.libraries.yml
+++ b/oe_theme.libraries.yml
@@ -46,3 +46,10 @@ print:
css:
theme:
css/print.css: { media: print }
+
+inpage_navigation:
+ js:
+ js/inpage_navigation.js: {}
+ dependencies:
+ - core/drupal
+ - core/jquery
diff --git a/oe_theme.theme b/oe_theme.theme
index d9c65da4c..33d352b53 100644
--- a/oe_theme.theme
+++ b/oe_theme.theme
@@ -82,10 +82,15 @@ function oe_theme_preprocess(&$variables) {
* Implements hook_preprocess_breadcrumb().
*/
function oe_theme_preprocess_breadcrumb(array &$variables): void {
- $request = \Drupal::request();
+ $cacheability = CacheableMetadata::createFromRenderArray($variables);
+ $cacheability->addCacheContexts(['route']);
+ $cacheability->applyTo($variables);
+
+ $request = \Drupal::request();
$route_match = \Drupal::routeMatch();
- $title = \Drupal::service('title_resolver')
- ->getTitle($request, $route_match->getRouteObject());
+
+ $route = $route_match->getRouteObject();
+ $title = \Drupal::service('title_resolver')->getTitle($request, $route);
unset($variables['links']);
$variables['links'] = array_map(function ($item) {
@@ -401,10 +406,6 @@ function oe_theme_preprocess_form_element(array &$variables): void {
* Add paragraph formatting to body.
*/
function oe_theme_preprocess_field(&$variables, $hook): void {
- if ($variables['field_name'] === 'body') {
- $variables['attributes']['class'][] = 'ecl-editor';
- }
-
// Add the ECL image class to the image fields.
$field_name = $variables['field_name'];
if (in_array($field_name, ['oe_media_avportal_photo'])) {
@@ -928,6 +929,14 @@ function oe_theme_preprocess_paragraph__oe_text_feature_media(array &$variables)
// paragraph template.
$cacheability->addCacheableDependency($media);
+ // Run access checks on the media entity.
+ $access = $media->access('view', $variables['user'], TRUE);
+ $cacheability->addCacheableDependency($access);
+ if (!$access->isAllowed()) {
+ $cacheability->applyTo($variables);
+ return;
+ }
+
// Get the media source.
$source = $media->getSource();
@@ -978,6 +987,52 @@ function oe_theme_preprocess_paragraph__oe_text_feature_media(array &$variables)
$cacheability->applyTo($variables);
}
+/**
+ * Implements hook_preprocess_HOOK().
+ */
+function oe_theme_preprocess_paragraph__oe_iframe_media(&$variables) {
+ /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */
+ $paragraph = $variables['paragraph'];
+
+ /** @var \Drupal\media\Entity\Media $media */
+ $media = $paragraph->get('field_oe_media')->entity;
+ if (!$media instanceof MediaInterface) {
+ // The media entity is not available anymore, bail out.
+ return;
+ }
+
+ // Caches are handled by the formatter usually. Since we are not rendering
+ // the original render arrays, we need to propagate our caches to the
+ // paragraph template.
+ $cacheability = CacheableMetadata::createFromRenderArray($variables);
+ $cacheability->addCacheableDependency($media);
+ $media_type = \Drupal::entityTypeManager()->getStorage('media_type')->load($media->bundle());
+ $cacheability->addCacheableDependency($media_type);
+
+ $access = $media->access('view', $variables['user'], TRUE);
+ $cacheability->addCacheableDependency($access);
+ $cacheability->applyTo($variables);
+
+ if (!$access->isAllowed()) {
+ return;
+ }
+
+ // Get the full width value.
+ $variables['full_width'] = (bool) $paragraph->get('field_oe_iframe_media_full_width')->value;
+
+ // Retrieve the correct media translation.
+ $media = \Drupal::service('entity.repository')->getTranslationFromContext($media, $paragraph->language()->getId());
+
+ // Get the ratio value.
+ $variables['ratio'] = _oe_theme_get_oe_media_iframe_ratio($media);
+
+ // Get the Iframe content to render.
+ $variables['iframe'] = $media->get('oe_media_iframe')->view([
+ 'label' => 'hidden',
+ 'type' => 'oe_media_iframe',
+ ]);
+}
+
/**
* Implements hook_preprocess_pattern().
*/
@@ -1434,6 +1489,14 @@ function oe_theme_preprocess_paragraph__oe_banner(array &$variables): void {
// paragraph template.
$cacheability->addCacheableDependency($media);
+ // Run access checks on the media entity.
+ $access = $media->access('view', $variables['user'], TRUE);
+ $cacheability->addCacheableDependency($access);
+ if (!$access->isAllowed()) {
+ $cacheability->applyTo($variables);
+ return;
+ }
+
$source = $media->getSource();
// We only support images and AV Portal photos for now.
if (!$source instanceof MediaAvPortalSourceInterface && !$source instanceof Image) {
@@ -1525,13 +1588,27 @@ function oe_theme_preprocess_field__media__oe_media_iframe__video_iframe__oe_the
$variables['ratio'] = $variables['element']['#object']->get('oe_media_iframe_ratio')->value;
}
+/**
+ * Gets the value from oe_media_iframe_ratio field.
+ *
+ * @param \Drupal\media\MediaInterface $media
+ * Media with oe_media_iframe_ratio field.
+ *
+ * @return string
+ * Prepared ratio to be used in templates.
+ */
+function _oe_theme_get_oe_media_iframe_ratio(MediaInterface $media): string {
+ $ratio = $media->get('oe_media_iframe_ratio')->value ?? 'custom';
+ return str_replace('_', '-', $ratio);
+}
+
/**
* Implements hook_preprocess_HOOK().
*/
function oe_theme_preprocess_field__media__oe_media_iframe__iframe__oe_theme_main_content(array &$variables): void {
// Set iframe aspect ratio when rendering the "oe_theme_main_content"
// display mode.
- $variables['ratio'] = $variables['element']['#object']->get('oe_media_iframe_ratio')->value ?? 'custom';
+ $variables['ratio'] = _oe_theme_get_oe_media_iframe_ratio($variables['element']['#object']);
}
/**
diff --git a/src/ValueObject/GalleryItemValueObject.php b/src/ValueObject/GalleryItemValueObject.php
index d3bb19fdf..1d0395690 100644
--- a/src/ValueObject/GalleryItemValueObject.php
+++ b/src/ValueObject/GalleryItemValueObject.php
@@ -170,7 +170,7 @@ public function getArray(): array {
'image' => $this->getThumbnail()->getArray(),
'description' => $this->getCaption(),
'meta' => $this->getMeta(),
- 'icon' => '',
+ 'icon' => 'image',
];
// If video, then set the required source URL format and icon.
diff --git a/templates/blocks/block--oe-theme-inpage-navigation-menu.html.twig b/templates/blocks/block--oe-theme-inpage-navigation-menu.html.twig
new file mode 100644
index 000000000..bb484fe47
--- /dev/null
+++ b/templates/blocks/block--oe-theme-inpage-navigation-menu.html.twig
@@ -0,0 +1,9 @@
+{#
+/**
+ * @file
+ * Theme override for the breadcrumb block wrapper.
+ *
+ * @see ./core/themes/stable/templates/block/block.html.twig
+ */
+#}
+{% include '@oe_theme/blocks/block--bare.html.twig' %}
diff --git a/templates/blocks/block--region-content--oe-theme-main-page-content.html.twig b/templates/blocks/block--region-content--oe-theme-main-page-content.html.twig
new file mode 100644
index 000000000..69ec9fbff
--- /dev/null
+++ b/templates/blocks/block--region-content--oe-theme-main-page-content.html.twig
@@ -0,0 +1,10 @@
+{#
+/**
+ * @file
+ * Theme override for blocks in the content region for page content block.
+ *
+ * @see ./block--region-content.html.twig
+ */
+#}
+{% extends 'block--region-content.html.twig' %}
+{% set attributes = attributes.setAttribute('data-inpage-navigation-source-area', 'h2') %}
diff --git a/templates/content/node--oe-call-proposals--teaser.html.twig b/templates/content/node--oe-call-proposals--teaser.html.twig
index 3e9cd2334..cafe57937 100644
--- a/templates/content/node--oe-call-proposals--teaser.html.twig
+++ b/templates/content/node--oe-call-proposals--teaser.html.twig
@@ -14,7 +14,7 @@
{{ pattern('list_item', {
'variant': 'default',
'url': url,
- 'title': label,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
'meta': meta,
'additional_information': additional_information,
}) }}
diff --git a/templates/content/node--oe-call-tenders--teaser.html.twig b/templates/content/node--oe-call-tenders--teaser.html.twig
index 5001664a3..b138d1858 100644
--- a/templates/content/node--oe-call-tenders--teaser.html.twig
+++ b/templates/content/node--oe-call-tenders--teaser.html.twig
@@ -14,7 +14,7 @@
{{ pattern('list_item', {
'variant': 'default',
'url': url,
- 'title': label,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
'meta': meta,
'additional_information': additional_information,
}) }}
diff --git a/templates/content/node--oe-consultation--teaser.html.twig b/templates/content/node--oe-consultation--teaser.html.twig
index 024fa5862..71800eb58 100644
--- a/templates/content/node--oe-consultation--teaser.html.twig
+++ b/templates/content/node--oe-consultation--teaser.html.twig
@@ -11,7 +11,7 @@
{{ pattern('list_item', {
'variant': 'default',
'url': url,
- 'title': label,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
'meta': [
content.extra_field_oe_consultation_label_status|field_value,
],
diff --git a/templates/content/node--oe-event--teaser.html.twig b/templates/content/node--oe-event--teaser.html.twig
index fca5c5118..70f5766e7 100644
--- a/templates/content/node--oe-event--teaser.html.twig
+++ b/templates/content/node--oe-event--teaser.html.twig
@@ -16,7 +16,7 @@
{{ pattern('list_item', {
'variant': variant|default('date'),
'url': url,
- 'title': label,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
'date': pattern_date,
'meta': meta,
'detail': detail,
diff --git a/templates/content/node--oe-organisation--teaser.html.twig b/templates/content/node--oe-organisation--teaser.html.twig
index 5109f88ac..a921d98f0 100644
--- a/templates/content/node--oe-organisation--teaser.html.twig
+++ b/templates/content/node--oe-organisation--teaser.html.twig
@@ -16,7 +16,7 @@
not node.oe_organisation_eu_org_type.isEmpty() ? content.oe_organisation_eu_org_type|field_value : content.oe_organisation_non_eu_org_type|field_value,
not node.oe_organisation_acronym.isEmpty() ? content.oe_organisation_acronym|field_value,
],
- 'title': label,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
'detail': content.oe_teaser|field_value,
'additional_information': additional_information,
'image': image_url ? { 'src': image_url }
diff --git a/templates/content/node--oe-page--teaser.html.twig b/templates/content/node--oe-page--teaser.html.twig
new file mode 100644
index 000000000..64023b076
--- /dev/null
+++ b/templates/content/node--oe-page--teaser.html.twig
@@ -0,0 +1,15 @@
+{#
+/**
+ * @file
+ * Teaser template implementation for "Page" content type.
+ */
+#}
+{% block content %}
+ {{ pattern('list_item', {
+ 'variant': 'default',
+ 'url': url,
+ 'title': content.extra_field_oe_theme_helper_short_title_with_fallback|field_value,
+ 'detail': content.oe_teaser|field_value,
+ 'additional_information': additional_information|default([])
+ }) }}
+{% endblock %}
diff --git a/templates/content/node--oe-person--oe-compact-teaser.html.twig b/templates/content/node--oe-person--oe-compact-teaser.html.twig
new file mode 100644
index 000000000..bce166b8a
--- /dev/null
+++ b/templates/content/node--oe-person--oe-compact-teaser.html.twig
@@ -0,0 +1,15 @@
+{#
+/**
+ * @file
+ * Theme override to display a Person node in the Openeuropa Compact Teaser view mode.
+ */
+#}
+
+
{{ item.content }}
{% endfor %}
diff --git a/templates/field/field--node--oe-organisation-contact--oe-organisation--full.html.twig b/templates/field/field--node--oe-organisation-contact--oe-organisation--full.html.twig
new file mode 100644
index 000000000..594e3f2c9
--- /dev/null
+++ b/templates/field/field--node--oe-organisation-contact--oe-organisation--full.html.twig
@@ -0,0 +1,26 @@
+{#
+/**
+ * @file
+ * Organisation contacts field template.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{% set contacts %}{% for item in items %}{{ item.content }}{% endfor %}{% endset %}
+
+{% if contacts is not empty %}
+ {% if items|length == 1 %}
+ {{ contacts }}
+ {% else %}
+ {% include '@ecl-twig/expandable' with {
+ 'label_expanded': 'Hide contact details'|t,
+ 'label_collapsed': 'Show contact details'|t,
+ 'button': {
+ 'icon': {
+ 'path': ecl_icon_path,
+ },
+ },
+ content: contacts
+ } only %}
+ {% endif %}
+{% endif %}
diff --git a/templates/field/field--node--oe-organisation-staff-link--oe-organisation--full.html.twig b/templates/field/field--node--oe-organisation-staff-link--oe-organisation--full.html.twig
new file mode 100644
index 000000000..78838ce08
--- /dev/null
+++ b/templates/field/field--node--oe-organisation-staff-link--oe-organisation--full.html.twig
@@ -0,0 +1,22 @@
+{#
+/**
+ * @file
+ * Theme override for Organisation staff search link field template in the Organisation CT full view mode.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{% for item in items %}
+ {% set bubble_cache = item.content|render %}
+
+ {% include '@ecl-twig/link' with {
+ link: {
+ type: 'standalone',
+ label: item.content['#title'],
+ path: item.content['#url'],
+ icon_position: 'after'
+ },
+ icon: get_link_icon(item.content['#url'].toString())
+ } %}
+
+{% endfor %}
diff --git a/templates/field/field--node--oe-person-jobs--oe-person--oe-compact-teaser.html.twig b/templates/field/field--node--oe-person-jobs--oe-person--oe-compact-teaser.html.twig
new file mode 100644
index 000000000..43cb02b94
--- /dev/null
+++ b/templates/field/field--node--oe-person-jobs--oe-person--oe-compact-teaser.html.twig
@@ -0,0 +1,9 @@
+{#
+/**
+ * @file
+ * Theme override for the Jobs field template of the Person CT in the Openeuropa Compact Teaser view mode.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{%- include 'field--multiple-values--comma-separated.html.twig' -%}
diff --git a/templates/field/field--node--oe-project-results--oe-project--full.html.twig b/templates/field/field--node--oe-project-results--oe-project--full.html.twig
deleted file mode 100644
index aadfee7a3..000000000
--- a/templates/field/field--node--oe-project-results--oe-project--full.html.twig
+++ /dev/null
@@ -1,13 +0,0 @@
-{#
-/**
- * @file
- * Project results field template.
- *
- * @see ./core/themes/stable/templates/field/field.html.twig
- */
-#}
-{% for item in items %}
-
- {{ item.content }}
-
-{% endfor %}
diff --git a/templates/field/field--oe-contact--oe-body.html.twig b/templates/field/field--oe-contact--oe-body.html.twig
deleted file mode 100644
index 03168651e..000000000
--- a/templates/field/field--oe-contact--oe-body.html.twig
+++ /dev/null
@@ -1,13 +0,0 @@
-{#
-/**
- * @file
- * Theme override for the field template.
- *
- * @see ./core/themes/stable/templates/field/field.html.twig
- */
-#}
-
- {% for item in items %}
- {{- item.content -}}
- {% endfor %}
-
diff --git a/templates/field/field--oe-contact--oe-link--full.html.twig b/templates/field/field--oe-contact--oe-link--full.html.twig
new file mode 100644
index 000000000..5d66dbe47
--- /dev/null
+++ b/templates/field/field--oe-contact--oe-link--full.html.twig
@@ -0,0 +1,22 @@
+{#
+/**
+ * @file
+ * Link field in the Contact entity default view mode.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{% for item in items %}
+ {% set bubble_cache = item.content|render %}
+
+ {% include '@ecl-twig/link' with {
+ link: {
+ type: 'standalone',
+ label: item.content['#title'],
+ path: item.content['#url'],
+ icon_position: 'after'
+ },
+ icon: get_link_icon(item.content['#url'].toString())
+ } %}
+
+{% endfor %}
diff --git a/templates/field/field--oe-contact--oe-press-contact-url--full.html.twig b/templates/field/field--oe-contact--oe-press-contact-url--full.html.twig
index 329e4d753..b31ae97e0 100644
--- a/templates/field/field--oe-contact--oe-press-contact-url--full.html.twig
+++ b/templates/field/field--oe-contact--oe-press-contact-url--full.html.twig
@@ -7,15 +7,16 @@
*/
#}
{% for item in items %}
-
- {% include '@ecl-twig/link' with {
- link: {
- type: 'standalone',
- label: 'Press contacts'|t,
- path: item.content['#url'],
- icon_position: 'after'
- },
- icon: get_link_icon(item.content['#url'].toString())
- } %}
-
+ {% set bubble_cache = item.content|render %}
+
+ {% include '@ecl-twig/link' with {
+ link: {
+ type: 'standalone',
+ label: 'Press contacts'|t,
+ path: item.content['#url'],
+ icon_position: 'after'
+ },
+ icon: get_link_icon(item.content['#url'].toString())
+ } %}
+
{% endfor %}
diff --git a/templates/field/field--paragraph--field-oe-text-long.html.twig b/templates/field/field--paragraph--field-oe-text-long.html.twig
index 09164b2d4..98b31f765 100644
--- a/templates/field/field--paragraph--field-oe-text-long.html.twig
+++ b/templates/field/field--paragraph--field-oe-text-long.html.twig
@@ -6,6 +6,5 @@
* @see ./core/themes/stable/templates/field/field.html.twig
*/
#}
-
- {%- include 'field--bare.html.twig' -%}
-
+{% set label_hidden = true %}
+{% include '@oe_theme/field/field--text-long.html.twig' %}
diff --git a/templates/field/field--text-long.html.twig b/templates/field/field--text-long.html.twig
new file mode 100644
index 000000000..875009c91
--- /dev/null
+++ b/templates/field/field--text-long.html.twig
@@ -0,0 +1,23 @@
+{#
+/**
+ * @file
+ * Theme override for the text long fields.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{% spaceless %}
+ {% if not label_hidden %}
+ {%
+ set title_classes = [
+ 'ecl-u-type-bold',
+ 'ecl-u-mb-m',
+ label_display == 'visually_hidden' ? 'visually-hidden',
+ ]
+ %}
+
{{ label }}
+ {% endif %}
+
+ {%- include 'field--bare.html.twig' -%}
+
+{% endspaceless %}
diff --git a/templates/field/field--text-with-summary.html.twig b/templates/field/field--text-with-summary.html.twig
new file mode 100644
index 000000000..07d615c7b
--- /dev/null
+++ b/templates/field/field--text-with-summary.html.twig
@@ -0,0 +1,9 @@
+{#
+/**
+ * @file
+ * Theme override for the text with summary fields.
+ *
+ * @see ./core/themes/stable/templates/field/field.html.twig
+ */
+#}
+{% include '@oe_theme/field/field--text-long.html.twig' %}
diff --git a/templates/oe_contact/oe-contact--full.html.twig b/templates/oe_contact/oe-contact--full.html.twig
index 2f0c5da20..9dcccdcd8 100644
--- a/templates/oe_contact/oe-contact--full.html.twig
+++ b/templates/oe_contact/oe-contact--full.html.twig
@@ -16,7 +16,7 @@
{% endif %}
{% if entity.oe_body is not empty %}
-
+
{{ content.oe_body }}
{% endif %}
diff --git a/templates/paragraphs/paragraph--oe-iframe-media.html.twig b/templates/paragraphs/paragraph--oe-iframe-media.html.twig
new file mode 100644
index 000000000..0c2f2bff3
--- /dev/null
+++ b/templates/paragraphs/paragraph--oe-iframe-media.html.twig
@@ -0,0 +1,30 @@
+{#
+/**
+ * @file
+ * Theme override to display the 'Iframe' paragraph.
+ *
+ * @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
+ */
+#}
+
+{% set extra_classes = [] %}
+
+{% if full_width %}
+ {% set extra_classes = ['ecl-media-container--fullwidth'] %}
+{% endif %}
+
+{% if ratio == 'custom' %}
+ {% set extra_classes = extra_classes|merge(['ecl-media-container--custom-ratio']) %}
+{% endif %}
+
+{% if not paragraph.field_oe_title.isEmpty() %}
+
{{ content.field_oe_title }}
+{% endif %}
+
+{% if iframe is not empty %}
+ {% include '@ecl-twig/media-container' with {
+ 'embedded_media': iframe|default(''),
+ 'ratio': ratio,
+ 'extra_classes': extra_classes|join(' '),
+ } %}
+{% endif %}
diff --git a/templates/patterns/gallery/gallery.ui_patterns.yml b/templates/patterns/gallery/gallery.ui_patterns.yml
index 0dda6a7fc..b836aaa61 100644
--- a/templates/patterns/gallery/gallery.ui_patterns.yml
+++ b/templates/patterns/gallery/gallery.ui_patterns.yml
@@ -12,11 +12,11 @@ gallery:
description: 'List of GalleryItemValueObject objects.'
preview:
- thumbnail:
- src: 'http://i3.ytimg.com/vi/DSXipcdzfmM/maxresdefault.jpg'
+ src: 'https://inno-ecl.s3.amazonaws.com/media/examples/example-external-video.jpg'
alt: 'Example alt text'
caption: 'Bio-defence preparedness programme'
meta: 'Copyright © 2021, Author and Licence'
- source: 'https://www.youtube.com/embed/DSXipcdzfmM'
+ source: 'https://inno-ecl.s3.amazonaws.com/media/videos/big_buck_bunny.mp4'
media_type: 'video'
- thumbnail:
src: 'https://loremflickr.com/800/600/cat'
diff --git a/tests/Functional/BreadcrumbTest.php b/tests/Functional/BreadcrumbTest.php
new file mode 100644
index 000000000..0a5ab9f2a
--- /dev/null
+++ b/tests/Functional/BreadcrumbTest.php
@@ -0,0 +1,116 @@
+drupalPlaceBlock('system_breadcrumb_block', [
+ 'region' => 'page_header',
+ ]);
+
+ // Create a news node.
+ /** @var \Drupal\node\Entity\Node $node */
+ $node_1 = $this->getStorage('node')->create([
+ 'type' => 'oe_news',
+ 'title' => 'Test news node',
+ 'oe_news_types' => 'http://publications.europa.eu/resource/authority/resource-type/ARTICLE_NEWS',
+ 'oe_teaser' => 'News teaser',
+ 'oe_summary' => 'http://www.example.org is a web page',
+ 'body' => 'News body',
+ 'oe_reference_code' => 'News reference',
+ 'oe_publication_date' => [
+ 'value' => '2020-09-18',
+ ],
+ 'oe_author' => 'http://publications.europa.eu/resource/authority/corporate-body/ACJHR',
+ 'oe_content_content_owner' => 'http://publications.europa.eu/resource/authority/corporate-body/COMMU',
+ 'uid' => 0,
+ 'status' => 1,
+ ]);
+ $node_1->save();
+
+ // Create another news node with different title.
+ $node_2 = $this->getStorage('node')->create([
+ 'type' => 'oe_news',
+ 'title' => 'Test news article breadcrumb',
+ 'oe_news_types' => 'http://publications.europa.eu/resource/authority/resource-type/ARTICLE_NEWS',
+ 'oe_teaser' => 'News teaser',
+ 'oe_summary' => 'http://www.example.org is a web page',
+ 'body' => 'News body',
+ 'oe_reference_code' => 'News reference',
+ 'oe_publication_date' => [
+ 'value' => '2020-09-18',
+ ],
+ 'oe_author' => 'http://publications.europa.eu/resource/authority/corporate-body/ACJHR',
+ 'oe_content_content_owner' => 'http://publications.europa.eu/resource/authority/corporate-body/COMMU',
+ 'uid' => 0,
+ 'status' => 1,
+ ]);
+ $node_2->save();
+
+ $expected = [
+ 'Home',
+ 'Node',
+ 'Test news node',
+ ];
+ $this->drupalGet($node_1->toUrl());
+ $this->assertSystemBreadcrumbs($expected);
+
+ $expected = [
+ 'Home',
+ 'Node',
+ 'Test news article breadcrumb',
+ ];
+ $this->drupalGet($node_2->toUrl());
+ $this->assertSystemBreadcrumbs($expected);
+ }
+
+ /**
+ * Helper to assert system breadcrumbs on the page.
+ *
+ * @param array $expected
+ * The expected breadcrumb titles in the expected order.
+ */
+ protected function assertSystemBreadcrumbs(array $expected): void {
+ // Get the last segment title and the link titles.
+ $last_segment_title = array_pop($expected);
+ $page_breadcrumb = $this->assertSession()->elementExists('css', '[class="ecl-breadcrumb-core"]');
+
+ // Assert the link titles.
+ $links = $page_breadcrumb->findAll('css', 'a');
+ $this->assertSameSize($expected, $links);
+ foreach ($expected as $index => $title) {
+ $this->assertEquals($title, trim($links[$index]->getText()));
+ }
+
+ // Check the last segment title.
+ $current_page = $page_breadcrumb->findAll('css', 'li:last-child');
+ $this->assertCount(1, $current_page);
+ $current_page = reset($current_page);
+ $this->assertEquals($last_segment_title, trim($current_page->getText()));
+ }
+
+}
diff --git a/tests/Functional/ContentEventRenderTest.php b/tests/Functional/ContentEventRenderTest.php
index 88e773a6e..f6dd9bd79 100644
--- a/tests/Functional/ContentEventRenderTest.php
+++ b/tests/Functional/ContentEventRenderTest.php
@@ -125,8 +125,8 @@ public function testEventFeaturedMediaTranslation(): void {
$node->save();
$file_urls = [
- 'en' => $en_file->createFileUrl(),
'bg' => $bg_file->createFileUrl(),
+ 'en' => $en_file->createFileUrl(),
];
foreach ($node->getTranslationLanguages() as $node_langcode => $node_language) {
@@ -134,6 +134,13 @@ public function testEventFeaturedMediaTranslation(): void {
$this->drupalGet($node->toUrl());
$this->assertSession()->elementExists('css', 'figure[class="ecl-media-container"] img[src*="' . $file_urls[$node_langcode] . '"][alt="default ' . $node_langcode . ' alt"]');
}
+
+ // Unpublish the media and assert it is not rendered anymore.
+ $media->set('status', 0);
+ $media->save();
+
+ $this->drupalGet($node->toUrl());
+ $this->assertSession()->elementNotExists('css', 'figure[class="ecl-media-container"] img[src*="' . $file_urls['en'] . '"][alt="default en alt"]');
}
/**
@@ -270,7 +277,7 @@ public function testEventRendering(): void {
'items' => [
[
'label' => 'Where',
- 'body' => "event_venue\n Address event_venue, 1001 Brussels, Belgium",
+ 'body' => "event_venue\n Address event_venue, 1001
, Belgium",
], [
'label' => 'When',
'body' => "Friday 28 February 2020, 01:00\n to Monday 9 March 2020, 01:00",
@@ -284,10 +291,20 @@ public function testEventRendering(): void {
$icons_text_expected_values['items'][2] = [
'icon' => 'location',
- 'text' => 'Brussels, Belgium',
+ 'text' => ', Belgium',
];
$icons_text_assert->assertPattern($icons_text_expected_values, $details_list_content->getOuterHtml());
+ // Assert address in Venue using country only.
+ $venue_entity->set('oe_address', ['country_code' => 'MX'])->save();
+ $this->drupalGet($node->toUrl());
+
+ $field_list_expected_values['items'][0]['body'] = "event_venue\n Mexico";
+ $field_list_assert->assertPattern($field_list_expected_values, $practical_list_content->getOuterHtml());
+
+ $icons_text_expected_values['items'][2]['text'] = 'Mexico';
+ $icons_text_assert->assertPattern($icons_text_expected_values, $details_list_content->getOuterHtml());
+
// Assert "Internal organiser" field.
$node->set('oe_event_organiser_is_internal', TRUE);
$node->set('oe_event_organiser_internal', 'http://publications.europa.eu/resource/authority/corporate-body/AASM');
diff --git a/tests/Functional/ContentNewsRenderTest.php b/tests/Functional/ContentNewsRenderTest.php
index 41d8716a2..c6cf5bc45 100644
--- a/tests/Functional/ContentNewsRenderTest.php
+++ b/tests/Functional/ContentNewsRenderTest.php
@@ -142,6 +142,15 @@ public function testNewsRendering(): void {
$this->assertContentHeader($contacts_content, 'Contacts');
$this->assertContactDefaultRender($contacts_content, 'news_contact');
+ // Add a different and unpublished media and assert it is not rendered
+ // in the contact.
+ $media = $this->getStorage('media')->loadByProperties(['name' => 'Test image news_contact']);
+ $media = reset($media);
+ $media->set('status', 0)->save();
+
+ $this->drupalGet($node->toUrl());
+ $this->assertSession()->elementNotExists('css', 'div#news-contacts div figure.ecl-media-container img');
+
// Assert Featured media field.
$this->assertSession()->elementNotExists('css', 'article[role=article] article.ecl-u-type-paragraph.ecl-u-mb-l');
@@ -154,6 +163,17 @@ public function testNewsRendering(): void {
$this->assertContains('placeholder_news_featured_media.png', $image->getAttribute('src'));
$this->assertEquals('Alternative text news_featured_media', $image->getAttribute('alt'));
+ // Unpublish the media and assert it is not rendered anymore.
+ $media->set('status', 0);
+ $media->save();
+
+ $this->drupalGet($node->toUrl());
+ $this->assertSession()->elementNotExists('css', 'article[role=article] article.ecl-u-type-paragraph.ecl-u-mb-l picture');
+
+ // Publish the media.
+ $media->set('status', 1);
+ $media->save();
+
// Assert related links.
$node->set('oe_related_links', [
[
diff --git a/tests/Functional/ContentOrganisationRenderTest.php b/tests/Functional/ContentOrganisationRenderTest.php
index 314a59284..08629f4d5 100644
--- a/tests/Functional/ContentOrganisationRenderTest.php
+++ b/tests/Functional/ContentOrganisationRenderTest.php
@@ -4,6 +4,9 @@
namespace Drupal\Tests\oe_theme\Functional;
+use Drupal\oe_content_entity\Entity\CorporateEntityInterface;
+use Drupal\node\Entity\Node;
+use Drupal\oe_content_person\Entity\PersonJob;
use Drupal\user\Entity\Role;
use Drupal\user\RoleInterface;
use Drupal\Tests\oe_theme\PatternAssertions\PatternPageHeaderAssert;
@@ -29,6 +32,7 @@ class ContentOrganisationRenderTest extends ContentRenderTestBase {
'oe_theme_helper',
'oe_theme_content_entity_contact',
'oe_theme_content_organisation',
+ 'oe_theme_content_person',
'page_header_metadata_test',
'media_avportal_mock',
];
@@ -55,7 +59,7 @@ public function testOrganisationRendering(): void {
$file->setPermanent();
$file->save();
- $media = $this->getStorage('media')->create([
+ $media = Media::create([
'bundle' => 'image',
'name' => 'test image',
'oe_media_image' => [
@@ -67,8 +71,9 @@ public function testOrganisationRendering(): void {
]);
$media->save();
- /** @var \Drupal\node\Entity\Node $node */
- $node = $this->getStorage('node')->create([
+ $first_general_contact = $this->createContactEntity('first_general_contact', 'oe_general', CorporateEntityInterface::PUBLISHED);
+
+ $node = Node::create([
'type' => 'oe_organisation',
'title' => 'My node title',
'oe_summary' => 'My introduction',
@@ -111,6 +116,7 @@ public function testOrganisationRendering(): void {
// Add body text and contact values.
$node->set('body', 'My body text');
+ $node->set('oe_organisation_contact', [$first_general_contact]);
$node->save();
$this->drupalGet($node->toUrl());
@@ -120,7 +126,7 @@ public function testOrganisationRendering(): void {
$inpage_nav_expected_values = [
'title' => 'Page contents',
'list' => [
- ['label' => 'Description', 'href' => '#description'],
+ ['label' => 'Contact', 'href' => '#contact'],
],
];
$inpage_nav_assert->assertPattern($inpage_nav_expected_values, $navigation->getOuterHtml());
@@ -146,33 +152,136 @@ public function testOrganisationRendering(): void {
$logo = $this->assertSession()->elementExists('css', '.ecl-col-l-3 img.ecl-media-container__media');
$this->assertContains('files/styles/oe_theme_medium_no_crop/public/media_avportal_thumbnails/' . $file->getFilename(), $logo->getAttribute('src'));
+ // Add overview values.
+ $node->set('oe_organisation_overview', [
+ [
+ 'term' => 'Overview Term 1',
+ 'description' => 'Overview Description 1',
+ ],
+ [
+ 'term' => 'Overview Term 2',
+ 'description' => 'Overview Description 2',
+ ],
+ ]);
+ $node->save();
+ $this->drupalGet($node->toUrl());
+
// Assert content part.
$wrapper = $this->assertSession()->elementExists('css', '.ecl-row.ecl-u-mt-l');
$content = $this->assertSession()->elementExists('css', '.ecl-col-l-9', $wrapper);
$this->assertSession()->elementsCount('css', '.ecl-col-l-9', 1);
$content_items = $content->findAll('xpath', '/div');
- $this->assertCount(1, $content_items);
- // Assert header of first field group.
- $this->assertContentHeader($content_items[0], 'Description', 'description');
+ // Assert header of the first field group.
+ $this->assertContentHeader($content_items[0], 'Overview', 'overview');
+
+ // Assert values of the first group.
+ $overview = $content_items[0]->findAll('css', 'dl.ecl-description-list.ecl-description-list--horizontal');
+ $this->assertCount(1, $overview);
+ $overview_terms = $overview[0]->findAll('css', 'dt.ecl-description-list__term');
+ $this->assertCount(2, $overview_terms);
+ $this->assertEquals('Overview Term 1', $overview_terms[0]->getText());
+ $this->assertEquals('Overview Term 2', $overview_terms[1]->getText());
+ $overview_descriptions = $overview[0]->findAll('css', 'dd.ecl-description-list__definition');
+ $this->assertCount(2, $overview_descriptions);
+ $this->assertEquals('Overview Description 1', $overview_descriptions[0]->getText());
+ $this->assertEquals('Overview Description 2', $overview_descriptions[1]->getText());
- // Assert values for first group.
- $body = $content_items[0]->findAll('css', '.ecl-editor');
+ // Assert values of the second group.
+ $body = $content_items[1]->findAll('css', '.ecl-editor');
$this->assertCount(1, $body);
$this->assertEquals('My body text', $body[0]->getText());
- // Assert Organisation's contacts.
- $contact = $this->createContactEntity('organisation_contact');
- $node->set('oe_organisation_contact', [$contact])->save();
+ // Assert Organisation's contact is displayed expanded.
+ $contact_headers = $content_items[2]->findAll('css', 'h2');
+ // Assert header of the third field group.
+ $this->assertEquals('Contact', $contact_headers[0]->getText());
+ $this->assertSession()->pageTextNotContains('Show contact details');
+ $this->assertContactDefaultRender($content_items[2], 'first_general_contact');
+
+ // Create another contact and add it to the node.
+ $second_general_contact = $this->createContactEntity('second_general_contact', 'oe_general');
+ $node->set('oe_organisation_contact', [$first_general_contact, $second_general_contact]);
+ $node->save();
$this->drupalGet($node->toUrl());
+ // Assert rendering is updated.
+ $this->assertSession()->pageTextContains('Show contact details');
+ $contacts = $content->findAll('css', 'div#-content.ecl-expandable__content div.ecl-row.ecl-u-mv-xl');
+ $this->assertCount(2, $contacts);
+ $this->assertContactDefaultRender($contacts[0], 'first_general_contact');
+ $this->assertContactDefaultRender($contacts[1], 'second_general_contact');
+
+ // Set value for only the staff search link field and assert rendering is
+ // updated.
+ $node->set('oe_organisation_staff_link', [
+ 'uri' => 'https://example.com',
+ 'title' => 'Search for staff',
+ ])->save();
+ $this->drupalGet($node->toUrl());
+
+ // Assert Contact group was moved on the 4th position.
$content_items = $content->findAll('xpath', '/div');
- $this->assertCount(2, $content_items);
- $this->assertContentHeader($content_items[1], 'Contact', 'contact');
- $this->assertContactDefaultRender($content_items[1], 'organisation_contact');
+ $contact_headers = $content_items[3]->findAll('css', 'h2');
+ $this->assertEquals('Contact', $contact_headers[0]->getText());
+ // Assert Leadership and organisation region is rendered.
+ $this->assertContentHeader($content_items[2], 'Leadership and organisation', 'leadership-and-organisation');
+ // Assert staff search link values.
+ $staff_search_link = $content_items[2]->findAll('css', 'a.ecl-link.ecl-link--standalone.ecl-link--icon.ecl-link--icon-after');
+ $this->assertCount(1, $staff_search_link);
+ $this->assertEquals('Search for staff', $staff_search_link[0]->find('css', '.ecl-link__label')->getText());
+ $staff_search_link[0]->hasLink('https://example.com');
- $inpage_nav_expected_values['list'][] = ['label' => 'Contact', 'href' => '#contact'];
- $inpage_nav_assert->assertPattern($inpage_nav_expected_values, $navigation->getOuterHtml());
+ // Create jobs for person entity.
+ $person_job_1 = PersonJob::create([
+ 'type' => 'oe_default',
+ 'oe_role_reference' => 'http://publications.europa.eu/resource/authority/role-qualifier/ADVIS',
+ ]);
+ $person_job_1->save();
+ $person_job_2 = PersonJob::create([
+ 'type' => 'oe_default',
+ 'oe_role_reference' => 'http://publications.europa.eu/resource/authority/role-qualifier/ADVIS_CHIEF',
+ ]);
+ $person_job_2->save();
+ // Create a person node to be referenced by the organisation node.
+ $person = Node::create([
+ 'type' => 'oe_person',
+ 'oe_person_first_name' => 'Jane',
+ 'oe_person_last_name' => 'Doe',
+ 'status' => 1,
+ ]);
+ $person->save();
+ // Create document to be referenced as organisation chart.
+ $chart = $this->createMediaDocument('chart');
+
+ // Update the node values for person and organisation chart fields.
+ $node->set('oe_organisation_persons', $person)
+ ->set('oe_organisation_chart', $chart);
+ $node->save();
+ $this->drupalGet($node->toUrl());
+
+ $content_items = $content->findAll('xpath', '/div');
+ $person_content = $content_items[2]->findAll('css', 'article.ecl-u-d-flex.ecl-u-pv-m.ecl-u-border-bottom.ecl-u-border-color-grey-15');
+ $this->assertCount(1, $person_content);
+ $this->assertContains('node/2', $person_content[0]->find('css', 'a.ecl-link.ecl-link--standalone')->getAttribute('href'));
+ // Assert person content.
+ $first_person_image = $person_content[0]->find('css', '.ecl-u-flex-shrink-0.ecl-u-mr-s.ecl-u-media-a-s.ecl-u-media-bg-size-contain.ecl-u-media-bg-repeat-none');
+ // Assert default image.
+ $this->assertEquals('background-image:url(/build/themes/custom/oe_theme/images/user_icon.svg)', $first_person_image->getAttribute('style'));
+ // Assert role div is not printed when there are no jobs.
+ $this->assertCount(0, $person_content[0]->findAll('css', '.ecl-content-item__meta.ecl-u-type-s.ecl-u-type-color-grey-75.ecl-u-mb-xs'));
+ // Assert name.
+ $this->assertEquals('Jane Doe', $person_content[0]->find('css', 'a.ecl-link.ecl-link--standalone')->getText());
+ // Assert organisation chart document.
+ $chart_document = $content_items[2]->findAll('css', '.ecl-u-mb-l.ecl-u-mt-l');
+ $this->assertMediaDocumentDefaultRender($chart_document[0], 'chart', 'English', '2.96 KB - PDF', '', 'Download');
+
+ // Update person node with jobs and assert rendering is updated.
+ $person->set('oe_person_jobs', [$person_job_1, $person_job_2]);
+ $person->save();
+ $this->getSession()->reload();
+ $person_content = $content_items[2]->findAll('css', 'article.ecl-u-d-flex.ecl-u-pv-m.ecl-u-border-bottom.ecl-u-border-color-grey-15');
+ $this->assertEquals('Advisor, Chief advisor', $person_content[0]->find('css', '.ecl-content-item__meta.ecl-u-type-s.ecl-u-type-color-grey-75.ecl-u-mb-xs')->getText());
}
}
diff --git a/tests/Functional/ContentPersonRenderTest.php b/tests/Functional/ContentPersonRenderTest.php
index 209498c20..53c5984c5 100644
--- a/tests/Functional/ContentPersonRenderTest.php
+++ b/tests/Functional/ContentPersonRenderTest.php
@@ -114,6 +114,16 @@ public function testPersonRendering(): void {
$this->assertContains('/files/styles/oe_theme_medium_no_crop/public/placeholder_portrait.png', $portrait->getAttribute('src'));
$this->assertEquals('Alternative text portrait', $portrait->getAttribute('alt'));
+ // Unpublish the media and assert it is not rendered anymore.
+ $portrait_media->set('status', 0);
+ $portrait_media->save();
+ $this->drupalGet($node->toUrl());
+ $this->assertNotContains('/files/styles/oe_theme_medium_no_crop/public/placeholder_portrait.png', $portrait->getAttribute('src'));
+
+ // Publish the media.
+ $portrait_media->set('status', 1);
+ $portrait_media->save();
+
// Assert Department field with single value.
$node->set('oe_departments', 'http://publications.europa.eu/resource/authority/corporate-body/ABEC')->save();
$this->drupalGet($node->toUrl());
diff --git a/tests/Functional/ContentProjectRenderTest.php b/tests/Functional/ContentProjectRenderTest.php
index 6e6107410..52316fbf2 100644
--- a/tests/Functional/ContentProjectRenderTest.php
+++ b/tests/Functional/ContentProjectRenderTest.php
@@ -184,7 +184,7 @@ public function testProjectRendering(): void {
'body' => '€100',
], [
'label' => 'EU contribution',
- 'body' => "€100\n\n 100% of the overall budget",
+ 'body' => "€100100% of the overall budget",
],
],
];
@@ -210,7 +210,7 @@ public function testProjectRendering(): void {
$field_list_assert->assertPattern($first_field_list_expected_values, $description_lists[0]->getHtml());
// Assert the second description list block's labels and values.
- $second_field_list_expected_values['items'][1]['body'] = "€50\n\n 50% of the overall budget";
+ $second_field_list_expected_values['items'][1]['body'] = "€5050% of the overall budget";
$field_list_assert->assertPattern($second_field_list_expected_values, $description_lists[1]->getHtml());
// Assert the third description list block's labels and values.
@@ -265,6 +265,14 @@ public function testProjectRendering(): void {
$this->assertEquals($stakeholder_sub_headers[0]->getText(), 'Coordinators');
$this->assertStakeholderOrganisationRendering($project_stakeholders, 'coordinator');
+ // Load logo that is unpublished and assert that is not rendered.
+ $media = $this->getStorage('media')->loadByProperties(['name' => 'Test image coordinator']);
+ $media = reset($media);
+ $media->set('status', 0)->save();
+
+ $this->drupalGet($node->toUrl());
+ $this->assertEmpty($project_stakeholders->findAll('css', 'div[role=img]'));
+
// Unpublish Coordinator and publish Participant organisations.
$coordinator_organisation->set('status', CorporateEntityInterface::NOT_PUBLISHED);
$coordinator_organisation->save();
diff --git a/tests/Functional/ContentPublicationRenderTest.php b/tests/Functional/ContentPublicationRenderTest.php
index 8212087b6..7edcc6fa1 100644
--- a/tests/Functional/ContentPublicationRenderTest.php
+++ b/tests/Functional/ContentPublicationRenderTest.php
@@ -277,6 +277,17 @@ public function testPublicationRendering(): void {
$this->assertContains("oe_theme_publication_thumbnail", $image_element->getAttribute('src'));
$this->assertEquals("Alternative text publication_image", $image_element->getAttribute('alt'));
+ // Unpublish the media and assert it is not rendered anymore.
+ $media_image->set('status', 0);
+ $media_image->save();
+
+ $this->drupalGet($node->toUrl());
+ $this->assertSession()->elementNotExists('css', $thumbnail_wrapper_selector);
+
+ // Publish the media.
+ $media_image->set('status', 1);
+ $media_image->save();
+
// Assert Contact field.
$contact = $this->createContactEntity('publication_contact');
$node->set('oe_publication_contacts', $contact)->save();
diff --git a/tests/Functional/ContentRenderTestBase.php b/tests/Functional/ContentRenderTestBase.php
index 3891742d4..22cb5ccda 100644
--- a/tests/Functional/ContentRenderTestBase.php
+++ b/tests/Functional/ContentRenderTestBase.php
@@ -207,6 +207,10 @@ protected function createContactEntity(string $name, string $bundle = 'oe_genera
'oe_organisation' => "Organisation $name",
'oe_phone' => "Phone number $name",
'oe_press_contact_url' => ['uri' => "http://www.example.com/press_contact_$name"],
+ 'oe_link' => [
+ 'uri' => "http://www.example.com/link_$name",
+ 'title' => "Link title $name",
+ ],
'oe_social_media' => [
[
'uri' => "http://www.example.com/social_media_$name",
@@ -281,9 +285,13 @@ protected function assertContactDefaultRender(NodeElement $element, string $name
$field_list_assert->assertPattern($contact_expected_values, $contacts_html);
$field_list_assert->assertVariant('horizontal', $contacts_html);
- // Assert Press contacts.
- $press = $element->find('css', '.ecl-u-border-top.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-mt-s.ecl-u-pt-l.ecl-u-pb-l');
- $this->assertLinkIcon($press, 'Press contacts', "http://www.example.com/press_contact_$name");
+ // Assert Press contacts field.
+ $links_wrapper = $element->findAll('css', 'div.ecl-u-border-top.ecl-u-border-color-grey-15.ecl-u-mt-s div.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-pt-l.ecl-u-pb-l');
+ $this->assertCount(2, $links_wrapper);
+ $this->assertLinkIcon($links_wrapper[0], 'Press contacts', "http://www.example.com/press_contact_$name");
+
+ // Assert Link field.
+ $this->assertLinkIcon($links_wrapper[1], "Link title $name", "http://www.example.com/link_$name");
// Assert contacts Image.
$this->assertFeaturedMediaField($element, $name);
@@ -308,7 +316,7 @@ protected function createVenueEntity(string $name, string $bundle = 'oe_default'
'name' => $name,
'oe_address' => [
'country_code' => 'BE',
- 'locality' => 'Brussels',
+ 'locality' => '',
'address_line1' => "Address $name",
'postal_code' => '1001',
],
diff --git a/tests/Kernel/AbstractKernelTestBase.php b/tests/Kernel/AbstractKernelTestBase.php
index c7dd94471..8ff923c3e 100644
--- a/tests/Kernel/AbstractKernelTestBase.php
+++ b/tests/Kernel/AbstractKernelTestBase.php
@@ -31,6 +31,7 @@ abstract class AbstractKernelTestBase extends KernelTestBase {
'ui_patterns',
'ui_patterns_library',
'user',
+ 'node',
];
/**
diff --git a/tests/Kernel/CallForProposalsRenderTest.php b/tests/Kernel/CallForProposalsRenderTest.php
index 63bb11b23..d7173713d 100644
--- a/tests/Kernel/CallForProposalsRenderTest.php
+++ b/tests/Kernel/CallForProposalsRenderTest.php
@@ -137,6 +137,13 @@ public function testTeaser(): void {
$actual = $crawler->filter('span.call-status.ecl-label.ecl-u-text-uppercase.ecl-label--high.ecl-u-type-color-black');
$this->assertCount(1, $actual);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'CFP short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'CFP short title';
+ $assert->assertPattern($expected_values, $html);
+
// Check label for multiple deadline values.
$deadline_date2 = (clone $static_time)->modify('+ 4 days');
$deadline_date2->setTimeZone(new \DateTimeZone('Australia/Sydney'));
diff --git a/tests/Kernel/CallForTendersRenderTest.php b/tests/Kernel/CallForTendersRenderTest.php
index 420dd4539..3fb02bea7 100644
--- a/tests/Kernel/CallForTendersRenderTest.php
+++ b/tests/Kernel/CallForTendersRenderTest.php
@@ -137,6 +137,13 @@ public function testTeaser(): void {
$actual = $crawler->filter('span.call-status.ecl-label.ecl-u-text-uppercase.ecl-label--high.ecl-u-type-color-black');
$this->assertCount(1, $actual);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'CFT short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'CFT short title';
+ $assert->assertPattern($expected_values, $html);
+
// Check Department/s label for multiple department values.
$node->set('oe_departments', 'http://publications.europa.eu/resource/authority/corporate-body/ABEC')->save();
$build = $this->nodeViewBuilder->view($node, 'teaser');
diff --git a/tests/Kernel/ConsultationRenderTest.php b/tests/Kernel/ConsultationRenderTest.php
index 5a014fb9d..8f9c4178e 100644
--- a/tests/Kernel/ConsultationRenderTest.php
+++ b/tests/Kernel/ConsultationRenderTest.php
@@ -121,6 +121,13 @@ public function testTeaser(): void {
$actual = $crawler->filter('span.call-status.ecl-label.ecl-u-text-uppercase.ecl-label--high.ecl-u-type-color-black');
$this->assertCount(1, $actual);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Consultation short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'Consultation short title';
+ $assert->assertPattern($expected_values, $html);
+
// Check status Closed label and background.
$deadline_date->modify('- 4 days');
$node->set('oe_consultation_deadline', [
diff --git a/tests/Kernel/ContactRenderTest.php b/tests/Kernel/ContactRenderTest.php
index 5fc69439b..0b19141be 100644
--- a/tests/Kernel/ContactRenderTest.php
+++ b/tests/Kernel/ContactRenderTest.php
@@ -194,17 +194,23 @@ public function testFullView(): void {
$build = $this->contactViewBuilder->view($contact, 'full');
$html = $this->renderRoot($build);
$crawler = new Crawler($html);
- $press = $crawler->filter('.ecl-u-border-top.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-mt-s.ecl-u-pt-l.ecl-u-pb-l');
- $press_link = $press->filter('a');
- $this->assertCount(1, $press_link);
- $this->assertEquals("http://www.example.com/press_contact_$name", $press_link->attr('href'));
-
- $press_label = $press_link->filter('.ecl-link__label');
- $this->assertCount(1, $press_label);
- $this->assertEquals('Press contacts', trim($press_label->text()));
+ $links_wrapper = $crawler->filter('div.ecl-u-border-top.ecl-u-border-color-grey-15.ecl-u-mt-s div.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-pt-l.ecl-u-pb-l');
+ $press_link = $links_wrapper->filter('a');
+ $this->assertBottomLink($press_link, "http://www.example.com/press_contact_$name", 'Press contacts');
+
+ // Assert Link field.
+ $contact->set('oe_link', [
+ 'uri' => "http://www.example.com/link_$name",
+ 'title' => "Link title $name",
+ ])->save();
+ $build = $this->contactViewBuilder->view($contact, 'full');
+ $html = $this->renderRoot($build);
+ $crawler = new Crawler($html);
+ $links_wrapper = $crawler->filter('div.ecl-u-border-top.ecl-u-border-color-grey-15.ecl-u-mt-s div.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-pt-l.ecl-u-pb-l');
+ $this->assertCount(2, $links_wrapper);
- $press_icon = $press_link->filter('.ecl-icon.ecl-icon--s.ecl-icon--primary.ecl-link__icon');
- $this->assertCount(1, $press_icon);
+ $link = $links_wrapper->last()->filter('a');
+ $this->assertBottomLink($link, "http://www.example.com/link_$name", "Link title $name");
}
/**
@@ -254,4 +260,26 @@ protected function assertFeaturedMediaField(string $html, string $name): void {
$this->assertEquals("Caption $name", trim($caption->text()));
}
+ /**
+ * Asserts links in the bottom of full view rendering.
+ *
+ * @param \Symfony\Component\DomCrawler\Crawler $element
+ * Link element.
+ * @param string $link
+ * Expected href attribute.
+ * @param string $title
+ * Expected link title.
+ */
+ protected function assertBottomLink(Crawler $element, string $link, string $title): void {
+ $this->assertCount(1, $element);
+ $this->assertEquals($link, $element->attr('href'));
+
+ $link_label = $element->filter('.ecl-link__label');
+ $this->assertCount(1, $link_label);
+ $this->assertEquals($title, trim($link_label->text()));
+
+ $link_icon = $element->filter('.ecl-icon.ecl-icon--s.ecl-icon--primary.ecl-link__icon');
+ $this->assertCount(1, $link_icon);
+ }
+
}
diff --git a/tests/Kernel/EventRenderTest.php b/tests/Kernel/EventRenderTest.php
index 8c2102100..ebfeb5ee7 100644
--- a/tests/Kernel/EventRenderTest.php
+++ b/tests/Kernel/EventRenderTest.php
@@ -101,9 +101,6 @@ public function testEventTeaser(): void {
$venue->set('oe_address', [
'country_code' => 'BE',
- 'locality' => 'Brussels',
- 'postal_code' => 1000,
- 'address_line1' => 'The street',
]);
$venue->save();
@@ -162,7 +159,7 @@ public function testEventTeaser(): void {
'items' => [
[
'icon' => 'location',
- 'text' => 'Brussels, Belgium',
+ 'text' => 'Belgium',
],
],
]),
@@ -178,6 +175,21 @@ public function testEventTeaser(): void {
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('date', $html);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Event short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'Event short title';
+ $assert->assertPattern($expected_values, $html);
+
+ // Set full address in venue.
+ $venue->set('oe_address', [
+ 'country_code' => 'BE',
+ 'locality' => '',
+ 'postal_code' => 1000,
+ 'address_line1' => 'The street',
+ ])->save();
+
// Set the online type to be livestream and assert the details are updated.
$node->set('oe_event_online_type', 'livestream')->save();
$this->nodeViewBuilder->resetCache();
@@ -187,7 +199,7 @@ public function testEventTeaser(): void {
'items' => [
[
'icon' => 'location',
- 'text' => 'Brussels, Belgium',
+ 'text' => ', Belgium',
],
[
'icon' => 'livestreaming',
@@ -239,7 +251,7 @@ public function testEventTeaser(): void {
'items' => [
[
'icon' => 'location',
- 'text' => 'Brussels, Белгия',
+ 'text' => ', Белгия',
],
[
'icon' => 'livestreaming',
diff --git a/tests/Kernel/LegacyContentRenderTest.php b/tests/Kernel/LegacyContentRenderTest.php
index 366aaf49e..3e04e78ec 100644
--- a/tests/Kernel/LegacyContentRenderTest.php
+++ b/tests/Kernel/LegacyContentRenderTest.php
@@ -53,6 +53,9 @@ public function testPage(): void {
$crawler = new Crawler($html);
+ $title = $crawler->filter('h2 a span');
+ $this->assertEquals('Test page node', $title->text());
+
// Body wrapper.
$body_wrapper = $crawler->filter('.ecl-editor');
$this->assertCount(1, $body_wrapper);
@@ -63,6 +66,14 @@ public function testPage(): void {
$this->assertContains('Related links', $related_links_heading->text());
$related_links = $crawler->filter('.ecl-list .ecl-link.ecl-link--standalone');
$this->assertCount(2, $related_links);
+
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Page short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $crawler = new Crawler($html);
+ $title = $crawler->filter('.ecl-content-item__title.ecl-u-type-heading-5.ecl-u-mb-xs.ecl-u-mt-none');
+ $this->assertEquals('Page short title', $title->text());
}
/**
@@ -84,10 +95,21 @@ public function testPolicy(): void {
$crawler = new Crawler($html);
+ $title = $crawler->filter('h2 a span');
+ $this->assertEquals('Test policy node', $title->text());
+
// Body wrapper.
$body_wrapper = $crawler->filter('.ecl-editor');
$this->assertCount(1, $body_wrapper);
$this->assertContains('Body', $body_wrapper->text());
+
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Policy short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $crawler = new Crawler($html);
+ $title = $crawler->filter('.ecl-content-item__title.ecl-u-type-heading-5.ecl-u-mb-xs.ecl-u-mt-none');
+ $this->assertEquals('Policy short title', $title->text());
}
/**
diff --git a/tests/Kernel/MultilingualAbstractKernelTestBase.php b/tests/Kernel/MultilingualAbstractKernelTestBase.php
index 8f0c1956c..577aec5f4 100644
--- a/tests/Kernel/MultilingualAbstractKernelTestBase.php
+++ b/tests/Kernel/MultilingualAbstractKernelTestBase.php
@@ -56,7 +56,7 @@ protected function setUp() {
]);
$this->container->get('module_handler')->loadInclude('oe_multilingual', 'install');
- oe_multilingual_install();
+ oe_multilingual_install(FALSE);
// Rebuild the container in order to make sure tests pass.
// @todo: fix test setup so that we can get rid of this line.
diff --git a/tests/Kernel/NewsRenderTest.php b/tests/Kernel/NewsRenderTest.php
index 078d973d3..629ca70d4 100644
--- a/tests/Kernel/NewsRenderTest.php
+++ b/tests/Kernel/NewsRenderTest.php
@@ -7,7 +7,6 @@
use Drupal\media\Entity\Media;
use Drupal\Tests\oe_theme\PatternAssertions\ListItemAssert;
use Drupal\Tests\user\Traits\UserCreationTrait;
-use Drupal\user\Entity\User;
/**
* Tests the News content type rendering.
@@ -28,10 +27,6 @@ protected function setUp(): void {
module_load_include('install', 'oe_content');
oe_content_install();
-
- // Set current user to UID 1, so that by default we can access everything.
- $account = User::load(1);
- $this->setCurrentUser($account);
}
/**
@@ -88,6 +83,43 @@ public function testNewsTeaser(): void {
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('thumbnail_primary', $html);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'News short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'News short title';
+ $assert->assertPattern($expected_values, $html);
+
+ // Unpublish the media and assert it is not rendered anymore.
+ $media->set('status', 0);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
+ $this->nodeViewBuilder->resetCache();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+
+ $expected_values = [
+ 'title' => 'News short title',
+ 'url' => '/en/node/1',
+ 'description' => 'Teaser',
+ 'meta' => 'News article | 2 April 2019',
+ 'image' => NULL,
+ ];
+ $assert->assertPattern($expected_values, $html);
+ $assert->assertVariant('default', $html);
+
+ // Publish the media.
+ $media->set('status', 1);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
// Set news type.
$node->set('oe_news_types', 'http://publications.europa.eu/resource/authority/resource-type/PRESS_REL')->save();
$this->nodeViewBuilder->resetCache();
@@ -95,7 +127,16 @@ public function testNewsTeaser(): void {
$build = $this->nodeViewBuilder->view($node, 'teaser');
$html = $this->renderRoot($build);
- $expected_values['meta'] = 'Press release | 2 April 2019';
+ $expected_values = [
+ 'title' => 'News short title',
+ 'url' => '/en/node/1',
+ 'description' => 'Teaser',
+ 'meta' => 'Press release | 2 April 2019',
+ 'image' => [
+ 'src' => 'example_1.jpeg',
+ 'alt' => '',
+ ],
+ ];
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('thumbnail_primary', $html);
diff --git a/tests/Kernel/OrganisationRenderTest.php b/tests/Kernel/OrganisationRenderTest.php
index 7a11b19ce..c8a601d18 100644
--- a/tests/Kernel/OrganisationRenderTest.php
+++ b/tests/Kernel/OrganisationRenderTest.php
@@ -11,6 +11,7 @@
use Drupal\Tests\oe_theme\PatternAssertions\PatternAssertState;
use Drupal\Tests\user\Traits\UserCreationTrait;
use Drupal\user\Entity\User;
+use Symfony\Component\DomCrawler\Crawler;
/**
* Tests the organisation rendering.
@@ -40,6 +41,7 @@ class OrganisationRenderTest extends ContentRenderTestBase {
'composite_reference',
'oe_theme_content_entity_contact',
'oe_theme_content_organisation',
+ 'description_list_field',
];
/**
@@ -73,7 +75,7 @@ protected function setUp(): void {
*/
public function testOrganisationTeaser(): void {
$logo_media = $this->createMediaImage('organisation_logo');
- $contact = $this->createContactEntity('organisation_contact', 'oe_general');
+ $first_contact = $this->createContactEntity('first_contact', 'oe_general');
$node = Node::create([
'type' => 'oe_organisation',
@@ -90,8 +92,8 @@ public function testOrganisationTeaser(): void {
],
'oe_organisation_contact' => [
[
- 'target_id' => $contact->id(),
- 'target_revision_id' => $contact->getRevisionId(),
+ 'target_id' => $first_contact->id(),
+ 'target_revision_id' => $first_contact->getRevisionId(),
],
],
'status' => 1,
@@ -117,19 +119,19 @@ public function testOrganisationTeaser(): void {
'items' => [
[
'label' => 'Website',
- 'body' => 'http://www.example.com/website_organisation_contact',
+ 'body' => 'http://www.example.com/website_first_contact',
],
[
'label' => 'Email',
- 'body' => 'organisation_contact@example.com',
+ 'body' => 'first_contact@example.com',
],
[
'label' => 'Phone number',
- 'body' => 'Phone number organisation_contact',
+ 'body' => 'Phone number first_contact',
],
[
'label' => 'Address',
- 'body' => 'Address organisation_contact, 1001 Brussels, Belgium',
+ 'body' => 'Address first_contact, 1001 Brussels, Belgium',
],
],
]),
@@ -138,7 +140,50 @@ public function testOrganisationTeaser(): void {
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('thumbnail_secondary', $html);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Organisation short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'Organisation short title';
+ $assert->assertPattern($expected_values, $html);
+
+ // Create another contact and add it to the node.
+ $second_contact = $this->createContactEntity('second_contact', 'oe_general');
+ $node->set('oe_organisation_contact', [$first_contact, $second_contact]);
+ $node->save();
+
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $crawler = new Crawler($html);
+ $first_contact_render = $crawler->filter('article .ecl-content-item__additional_information.ecl-u-mb-s div.ecl-u-border-bottom.ecl-u-border-color-grey-15.ecl-u-mb-m.ecl-u-pb-m');
+ $this->assertCount(1, $first_contact_render);
+
+ $field_assert = new FieldListAssert();
+ $second_contact_expected_values = [
+ 'items' => [
+ [
+ 'label' => 'Website',
+ 'body' => 'http://www.example.com/website_second_contact',
+ ],
+ [
+ 'label' => 'Email',
+ 'body' => 'second_contact@example.com',
+ ],
+ [
+ 'label' => 'Phone number',
+ 'body' => 'Phone number second_contact',
+ ],
+ [
+ 'label' => 'Address',
+ 'body' => 'Address second_contact, 1001 Brussels, Belgium',
+ ],
+ ],
+ ];
+ $second_contact_render = $crawler->filter('article div.ecl-content-item__additional_information.ecl-u-mb-s div:nth-child(2)');
+ $field_assert->assertPattern($second_contact_expected_values, $second_contact_render->html());
+
// Change organisation type to non eu.
+ $node->set('oe_organisation_contact', NULL);
$node->set('oe_organisation_org_type', 'non_eu');
$node->set('oe_organisation_non_eu_org_type', 'http://data.europa.eu/uxp/5432');
$node->save();
@@ -146,6 +191,7 @@ public function testOrganisationTeaser(): void {
$build = $this->nodeViewBuilder->view($node, 'teaser');
$html = $this->renderRoot($build);
+ $expected_values['additional_information'] = NULL;
$expected_values['meta'] = 'embassy | Acronym';
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('thumbnail_secondary', $html);
diff --git a/tests/Kernel/Paragraphs/MediaParagraphsTest.php b/tests/Kernel/Paragraphs/MediaParagraphsTest.php
index ca27af6e8..c37a41ee5 100644
--- a/tests/Kernel/Paragraphs/MediaParagraphsTest.php
+++ b/tests/Kernel/Paragraphs/MediaParagraphsTest.php
@@ -25,6 +25,7 @@ class MediaParagraphsTest extends ParagraphsTestBase {
'oe_paragraphs_media',
'allowed_formats',
'oe_paragraphs_media_field_storage',
+ 'oe_paragraphs_iframe_media',
'oe_paragraphs_banner',
'views',
'entity_browser',
@@ -52,9 +53,13 @@ protected function setUp() {
'media_avportal',
'oe_media_avportal',
'oe_paragraphs_banner',
+ 'oe_paragraphs_iframe_media',
'options',
'oe_media_iframe',
]);
+ // Call the install hook of the Media module.
+ module_load_include('install', 'media');
+ media_install();
}
/**
@@ -153,6 +158,31 @@ public function testTextWithMedia(): void {
$html = $this->renderParagraph($paragraph, 'bg');
$assert->assertPattern($expected_values, $html);
+ // Unpublish the media and assert it is not rendered anymore.
+ $media->set('status', 0);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
+ $expected_values = [
+ 'title' => 'Title',
+ 'caption' => NULL,
+ 'text' => 'Full text',
+ 'image' => NULL,
+ ];
+ $html = $this->renderParagraph($paragraph);
+ $assert->assertPattern($expected_values, $html);
+
+ // Publish the media.
+ $media->set('status', 1);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
// Remove the text and assert the element is no longer rendered.
$paragraph->set('field_oe_text_long', '');
$paragraph->save();
@@ -348,6 +378,27 @@ public function testBanner(): void {
// Variant - image / Modifier - hero_left / Full width - No.
$paragraph->get('field_oe_banner_type')->setValue('hero_left');
$paragraph->save();
+
+ // Unpublish the media and assert it is not rendered anymore.
+ $media->set('status', 0);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
+ $html = $this->renderParagraph($paragraph);
+ $crawler = new Crawler($html);
+ $this->assertCount(0, $crawler->filter('section.ecl-hero-banner.ecl-hero-banner--image div.ecl-hero-banner__image'));
+
+ // Publish the media.
+ $media->set('status', 1);
+ $media->save();
+
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+
$html = $this->renderParagraph($paragraph);
$crawler = new Crawler($html);
@@ -688,4 +739,97 @@ public function testBanner(): void {
);
}
+ /**
+ * Test 'Iframe' paragraph rendering.
+ */
+ public function testIframe(): void {
+ // Set Iframe media translatable.
+ $this->container->get('content_translation.manager')->setEnabled('media', 'iframe', TRUE);
+
+ // Make the Iframe field translatable.
+ $field_config = $this->container->get('entity_type.manager')->getStorage('field_config')->load('media.iframe.oe_media_iframe');
+ $field_config->set('translatable', TRUE)->save();
+ $this->container->get('router.builder')->rebuild();
+
+ // Create unpublished Iframe media with required fields to check access.
+ $media_storage = $this->container->get('entity_type.manager')->getStorage('media');
+ $media = $media_storage->create([
+ 'bundle' => 'iframe',
+ 'name' => 'Test Iframe',
+ 'oe_media_iframe' => '',
+ 'status' => 0,
+ ]);
+ $media->save();
+
+ // Create a paragraph with required fields only.
+ $paragraph = $this->container
+ ->get('entity_type.manager')
+ ->getStorage('paragraph')->create([
+ 'type' => 'oe_iframe_media',
+ 'field_oe_media' => [
+ 'target_id' => $media->id(),
+ ],
+ ]);
+ $paragraph->save();
+
+ // Assert unpublished media isn't shown.
+ $html = $this->renderParagraph($paragraph);
+ $this->assertNotContains('figure', $html);
+ $this->assertNotContains('http://example.com/iframe', $html);
+ $this->assertNotContains('ecl-u-type-heading-2', $html);
+
+ // Publish media.
+ $media->setPublished()->save();
+ // Since static cache is not cleared due to lack of requests in the test we
+ // need to reset manually.
+ $this->container->get('entity_type.manager')->getAccessControlHandler('media')->resetCache();
+ $html = $this->renderParagraph($paragraph);
+ $crawler = new Crawler($html);
+ $iframe = $crawler->filter('figure.ecl-media-container.ecl-media-container--custom-ratio div.ecl-media-container__media.ecl-media-container__media--ratio-custom iframe');
+ $this->assertContains('http://example.com/iframe', $iframe->attr('src'));
+ $this->assertNotContains('ecl-u-type-heading-2', $html);
+
+ // Assert "Full width" field.
+ $paragraph->set('field_oe_iframe_media_full_width', TRUE)->save();
+ $html = $this->renderParagraph($paragraph);
+ $crawler = new Crawler($html);
+ $iframe = $crawler->filter('figure.ecl-media-container.ecl-media-container--fullwidth.ecl-media-container--custom-ratio div.ecl-media-container__media.ecl-media-container__media--ratio-custom iframe');
+ $this->assertContains('http://example.com/iframe', $iframe->attr('src'));
+
+ // Assert ratio.
+ $media->set('oe_media_iframe_ratio', '1_1')->save();
+ $html = $this->renderParagraph($paragraph);
+ $crawler = new Crawler($html);
+ $iframe = $crawler->filter('figure.ecl-media-container.ecl-media-container--fullwidth div.ecl-media-container__media.ecl-media-container__media--ratio-1-1 iframe');
+ $this->assertContains('http://example.com/iframe', $iframe->attr('src'));
+
+ // Assert title and full width.
+ $paragraph->set('field_oe_title', 'Iframe paragraph title');
+ $paragraph->set('field_oe_iframe_media_full_width', FALSE)->save();
+ $html = $this->renderParagraph($paragraph);
+ $crawler = new Crawler($html);
+ $title = $crawler->filter('h2.ecl-u-type-heading-2', $html);
+ $this->assertContains('Iframe paragraph title', $title->text());
+ $iframe = $crawler->filter('figure.ecl-media-container div.ecl-media-container__media.ecl-media-container__media--ratio-1-1 iframe');
+ $this->assertContains('http://example.com/iframe', $iframe->attr('src'));
+
+ // Translate the media to Bulgarian.
+ $media_bg = $media->addTranslation('bg', [
+ 'name' => 'Test Iframe bg',
+ 'oe_media_iframe' => '',
+ ]);
+ $media_bg->save();
+
+ // Add Bulgarian translation.
+ $paragraph->addTranslation('bg', ['field_oe_title' => 'Iframe paragraph title bg'])->save();
+
+ // Assert paragraph translation.
+ $html = $this->renderParagraph($paragraph, 'bg');
+ $crawler = new Crawler($html);
+ $title = $crawler->filter('h2.ecl-u-type-heading-2', $html);
+ $this->assertContains('Iframe paragraph title bg', $title->text());
+ $iframe = $crawler->filter('figure.ecl-media-container div.ecl-media-container__media.ecl-media-container__media--ratio-1-1 iframe');
+ $this->assertContains('http://example.com/iframe_bg', $iframe->attr('src'));
+ }
+
}
diff --git a/tests/Kernel/PersonRenderTest.php b/tests/Kernel/PersonRenderTest.php
index 1b4a843ad..b5a4e5fa0 100644
--- a/tests/Kernel/PersonRenderTest.php
+++ b/tests/Kernel/PersonRenderTest.php
@@ -42,6 +42,7 @@ class PersonRenderTest extends ContentRenderTestBase {
'oe_theme_content_organisation',
'oe_theme_content_organisation_reference',
'oe_theme_content_person',
+ 'description_list_field',
];
/**
diff --git a/tests/Kernel/ProjectRenderTest.php b/tests/Kernel/ProjectRenderTest.php
index e245ca253..b082b712a 100644
--- a/tests/Kernel/ProjectRenderTest.php
+++ b/tests/Kernel/ProjectRenderTest.php
@@ -180,6 +180,13 @@ public function testProjectTeaser(): void {
];
$assert->assertPattern($expected_values, $html);
$assert->assertVariant('thumbnail_secondary', $html);
+
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Project short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'Project short title';
+ $assert->assertPattern($expected_values, $html);
}
}
diff --git a/tests/Kernel/PublicationRenderTest.php b/tests/Kernel/PublicationRenderTest.php
index 960e63f4b..ad4cbe882 100644
--- a/tests/Kernel/PublicationRenderTest.php
+++ b/tests/Kernel/PublicationRenderTest.php
@@ -60,6 +60,13 @@ public function testTeaser(): void {
];
$assert->assertPattern($expected_values, $html);
+ // Test short title fallback.
+ $node->set('oe_content_short_title', 'Publication short title')->save();
+ $build = $this->nodeViewBuilder->view($node, 'teaser');
+ $html = $this->renderRoot($build);
+ $expected_values['title'] = 'Publication short title';
+ $assert->assertPattern($expected_values, $html);
+
// Add thumbnail.
$media_image = $this->createMediaImage('publication_image');
$node->set('oe_publication_thumbnail', $media_image)->save();
diff --git a/tests/Kernel/fixtures/rendering.yml b/tests/Kernel/fixtures/rendering.yml
index a1a442114..021863f99 100644
--- a/tests/Kernel/fixtures/rendering.yml
+++ b/tests/Kernel/fixtures/rendering.yml
@@ -736,9 +736,10 @@
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item .ecl-gallery__image[alt="Example alt text"]': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item figcaption.ecl-gallery__description': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item .ecl-gallery__meta': 1
- '.ecl-gallery .ecl-gallery__list .ecl-gallery__item svg.ecl-icon': 0
+ '.ecl-gallery .ecl-gallery__list .ecl-gallery__item figcaption.ecl-gallery__description svg.ecl-icon': 1
equals:
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item .ecl-gallery__meta': 'Copyright © 2021, Author and Licence'
+ '.ecl-gallery .ecl-gallery__list .ecl-gallery__item svg.ecl-icon': ''
contains:
- 'A picture of a cat'
- array:
@@ -769,7 +770,7 @@
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) .ecl-gallery__image[alt="Example alt text cat"]': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) figcaption.ecl-gallery__description': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) .ecl-gallery__meta': 0
- '.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) .ecl-gallery__image-container svg.ecl-icon': 0
+ '.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) .ecl-gallery__image-container figcaption.ecl-gallery__description svg.ecl-icon': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) a.ecl-gallery__item-link[href="https://www.youtube.com/watch?v=1-g73ty9v04"]': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__image[src="https://loremflickr.com/320/240/dog"]': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__image[alt="Example alt text dog"]': 1
@@ -777,6 +778,7 @@
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__meta': 1
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__image-container figcaption.ecl-gallery__description svg.ecl-icon': 1
equals:
+ '.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(1) .ecl-gallery__image-container svg.ecl-icon': ''
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__meta': 'Copyright © 2021 EC'
'.ecl-gallery .ecl-gallery__list .ecl-gallery__item:nth-child(2) .ecl-gallery__image-container figcaption.ecl-gallery__description svg.ecl-icon': ''
contains:
diff --git a/tests/PatternAssertions/InPageNavigationAssert.php b/tests/PatternAssertions/InPageNavigationAssert.php
index e4558aeb6..8cb73bd8d 100644
--- a/tests/PatternAssertions/InPageNavigationAssert.php
+++ b/tests/PatternAssertions/InPageNavigationAssert.php
@@ -47,16 +47,17 @@ protected function assertBaseElements(string $html, string $variant): void {
* The DomCrawler where to check the element.
*/
protected function assertList($expected, string $variant, Crawler $crawler): void {
- $list_selector = 'ul.ecl-inpage-navigation__list';
- $this->assertElementExists($list_selector, $crawler);
- $items = $crawler->filter('.ecl-inpage-navigation__item a');
- self::assertCount(count($expected), $items);
-
- foreach ($expected as $index => $expected_value) {
- $item = $items->eq($index);
- self::assertEquals($expected_value['label'], $item->text());
- self::assertEquals($expected_value['href'], $item->attr('href'));
- }
+ $this->assertElementExists('ul.ecl-inpage-navigation__list', $crawler);
+
+ $actual = [];
+ $crawler->filter('ul.ecl-inpage-navigation__list .ecl-inpage-navigation__item a')->each(function (Crawler $node) use (&$actual) {
+ $actual[] = [
+ 'label' => $node->text(),
+ 'href' => $node->attr('href'),
+ ];
+ });
+
+ self::assertEquals($expected, $actual);
}
}
diff --git a/tests/Unit/ValueObject/GalleryItemValueObjectTest.php b/tests/Unit/ValueObject/GalleryItemValueObjectTest.php
index aef56d843..738aae2df 100644
--- a/tests/Unit/ValueObject/GalleryItemValueObjectTest.php
+++ b/tests/Unit/ValueObject/GalleryItemValueObjectTest.php
@@ -19,17 +19,18 @@ class GalleryItemValueObjectTest extends UnitTestCase {
* Test constructing a gallery item value object from an array.
*/
public function testFromArray(): void {
+ $image_value_object = ImageValueObject::fromArray([
+ 'src' => 'http://placehold.it/380x185',
+ 'name' => 'Test thumbnail',
+ 'alt' => 'Alt text',
+ 'responsive' => TRUE,
+ ]);
$values = [
- 'thumbnail' => ImageValueObject::fromArray([
- 'src' => 'http://placehold.it/380x185',
- 'name' => 'Test thumbnail',
- 'alt' => 'Alt text',
- 'responsive' => TRUE,
- ]),
+ 'thumbnail' => $image_value_object,
'source' => 'http://placehold.it/600x400',
'type' => GalleryItemValueObject::TYPE_VIDEO,
- 'caption' => 'Test caption.',
- 'meta' => 'Test meta.',
+ 'caption' => 'Test video caption.',
+ 'meta' => 'Test video meta.',
];
/** @var \Drupal\oe_theme\ValueObject\GalleryItemValueObject $item */
@@ -41,6 +42,15 @@ public function testFromArray(): void {
$this->assertEquals($values['caption'], $item->getCaption());
$this->assertEquals($values['meta'], $item->getMeta());
+ $to_array = $item->getArray();
+ $this->assertEquals($to_array['image'], $image_value_object->getArray());
+ $this->assertEquals($to_array['embedded_video'], [
+ 'src' => 'http://placehold.it/600x400',
+ ]);
+ $this->assertEquals($to_array['icon'], 'video');
+ $this->assertEquals($to_array['description'], 'Test video caption.');
+ $this->assertEquals($to_array['meta'], 'Test video meta.');
+
// Verify that the thumbnail can be also passed as array.
$item = GalleryItemValueObject::fromArray([
'thumbnail' => $values['thumbnail']->getArray(),
@@ -51,6 +61,23 @@ public function testFromArray(): void {
$this->assertEquals($values['type'], $item->getType());
$this->assertEquals($values['caption'], $item->getCaption());
$this->assertEquals($values['meta'], $item->getMeta());
+
+ // Create an image-based Gallery item.
+ $values = [
+ 'thumbnail' => $image_value_object,
+ 'source' => 'http://placehold.it/800x600',
+ 'type' => GalleryItemValueObject::TYPE_IMAGE,
+ 'caption' => 'Test image caption.',
+ 'meta' => 'Test image meta.',
+ ];
+
+ /** @var \Drupal\oe_theme\ValueObject\GalleryItemValueObject $item */
+ $item = GalleryItemValueObject::fromArray($values);
+ $this->assertEquals($values['type'], $item->getType());
+ $to_array = $item->getArray();
+ $this->assertEquals($to_array['icon'], 'image');
+ $this->assertEquals($to_array['description'], 'Test image caption.');
+ $this->assertEquals($to_array['meta'], 'Test image meta.');
}
/**