diff --git a/README.md b/README.md index 2bb48afeb..affcb0aa3 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Not all schemas that this app can handle are rendered by it in production. | Detailed guide | [View on GOV.UK](https://www.gov.uk/guidance/waste-exemption-nwfd-2-temporary-storage-at-the-place-of-production--2) | Migrated | | Document collection | [View on GOV.UK](https://www.gov.uk/government/collections/statutory-guidance-schools) | Migrated | | Fatality notice | [View on GOV.UK](https://www.gov.uk/government/fatalities/corporal-lee-churcher-dies-in-iraq) | Migrated | +| Fields of operation | [View on Gov.UK](https://www.gov.uk/government/fields-of-operation) | Migrated | | Help page | [View on GOV.UK](https://www.gov.uk/help/about-govuk) | Migrated | | HTML Publication | [View on GOV.UK](https://www.gov.uk/government/publications/budget-2016-documents/budget-2016)| Migrated | | Guide | [View on GOV.UK](https://www.gov.uk/log-in-register-hmrc-online-services)| Migrated | diff --git a/app/presenters/fields_of_operation_presenter.rb b/app/presenters/fields_of_operation_presenter.rb new file mode 100644 index 000000000..4c3d1dbdf --- /dev/null +++ b/app/presenters/fields_of_operation_presenter.rb @@ -0,0 +1,14 @@ +class FieldsOfOperationPresenter < ContentItemPresenter + include ContentItem::TitleAndContext + + def fields_of_operation + content_item.dig("links", "fields_of_operation").map { |field| [field["title"], field["base_path"]] } + end + + def title_and_context + super.tap do |t| + t[:context] = I18n.t("fields_of_operation.context") + t.delete(:average_title_length) + end + end +end diff --git a/app/views/content_items/fields_of_operation.html.erb b/app/views/content_items/fields_of_operation.html.erb new file mode 100644 index 000000000..463cd9c0d --- /dev/null +++ b/app/views/content_items/fields_of_operation.html.erb @@ -0,0 +1,16 @@ +
+
+ <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> + +
+
+
    + <% @content_item.fields_of_operation.each do |name, path| %> + <%= link_to name, path, class: "govuk-link" %> +
    + <% end %> +
+
+
+
+
diff --git a/config/locales/ar.yml b/config/locales/ar.yml index a0516193f..4c0f0d914 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -591,6 +591,8 @@ ar: alt_text: شعار وزارة الدفاع field_of_operation: ساحة العمليات operations_in: العمليات الدائرة في %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/az.yml b/config/locales/az.yml index e604b3a51..1dc2a9ff2 100644 --- a/config/locales/az.yml +++ b/config/locales/az.yml @@ -295,6 +295,8 @@ az: alt_text: Müdafiə nazirliyinin emblemi field_of_operation: Əməliyyat sahəsi operations_in: "%{location}-də olan əməliyyatlar" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/be.yml b/config/locales/be.yml index a4dfc160c..69f3043de 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -443,6 +443,8 @@ be: alt_text: Герб Міністэрства абароны field_of_operation: Сфера дзейнасці operations_in: Дзейнасць у %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/bg.yml b/config/locales/bg.yml index c4ebad059..476263cc6 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -295,6 +295,8 @@ bg: alt_text: Герб на Министерството на отбраната field_of_operation: Област на действие operations_in: Операции в %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/bn.yml b/config/locales/bn.yml index 12bbfd7a6..1580f8c1c 100644 --- a/config/locales/bn.yml +++ b/config/locales/bn.yml @@ -295,6 +295,8 @@ bn: alt_text: প্রতিরক্ষা মন্ত্রণালয়ের ক্রেস্ট field_of_operation: কার্যক্রমের ক্ষেত্র operations_in: "%{location}-এ পরিচালনা" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/cs.yml b/config/locales/cs.yml index df484f0a8..2e7e366ba 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -369,6 +369,8 @@ cs: alt_text: Ministerstvo obrany field_of_operation: Oblast provozu operations_in: Operace v %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 0470575c6..cd56764dc 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -591,6 +591,8 @@ cy: alt_text: Arwyddlun y Weinyddiaeth Amddiffyn field_of_operation: Maes gweithredu operations_in: Gweithrediadau yn %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/da.yml b/config/locales/da.yml index ca18c214f..a4fb1c409 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -307,6 +307,8 @@ da: alt_text: Forsvarsministeriets kam field_of_operation: Operationsområde operations_in: Handlinger i %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/de.yml b/config/locales/de.yml index 9f1e43902..805a034ab 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -295,6 +295,8 @@ de: alt_text: Wappen des Verteidigungsministeriums field_of_operation: Tätigkeitsbereich operations_in: Tätigkeiten in %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/dr.yml b/config/locales/dr.yml index d94ed4712..756b7c821 100644 --- a/config/locales/dr.yml +++ b/config/locales/dr.yml @@ -295,6 +295,8 @@ dr: alt_text: وزارت دفاع field_of_operation: ساحهء عملیات operations_in: عملیات در%{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/el.yml b/config/locales/el.yml index 0d30e91c9..5cc4dad92 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -295,6 +295,8 @@ el: alt_text: Οικόσημο Υπουργείου Άμυνας field_of_operation: Πεδίο λειτουργίας operations_in: Λειτουργίες στην τοποθεσία %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/en.yml b/config/locales/en.yml index 609be2ce8..2b24ca335 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -295,6 +295,8 @@ en: alt_text: Ministry of Defence crest field_of_operation: Field of operation operations_in: Operations in %{location} + fields_of_operation: + context: British fatalities get_involved: civil_service: Civil Service civil_service_quarterly: Civil Service Quarterly diff --git a/config/locales/es-419.yml b/config/locales/es-419.yml index 3f5780fa2..7ea767a57 100644 --- a/config/locales/es-419.yml +++ b/config/locales/es-419.yml @@ -295,6 +295,8 @@ es-419: alt_text: Escudo del Ministerio de Defensa field_of_operation: Campo de operación operations_in: Operaciones en %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/es.yml b/config/locales/es.yml index 8fb9c471e..c21e0ad65 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -295,6 +295,8 @@ es: alt_text: Escudo del Ministerio de Defensa field_of_operation: Campo de operación operations_in: Operaciones en %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/et.yml b/config/locales/et.yml index 9ed0cb6b1..bc5cfa7f7 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -295,6 +295,8 @@ et: alt_text: Kaitseministeeriumi teadus- ja tehnikauuringute komitee field_of_operation: Tegevusvaldkond operations_in: Toimingud asukohas %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/fa.yml b/config/locales/fa.yml index b15e8f86c..026ef3b2b 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -295,6 +295,8 @@ fa: alt_text: تاج وزارت دفاع field_of_operation: زمینه فعالیت operations_in: فعالیت در %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index da99a9adf..45a1c8b15 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -295,6 +295,8 @@ fi: alt_text: Puolustusministeriön vaakuna field_of_operation: Toiminta -alue operations_in: Toiminnot paikassa %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index bbfdd4e94..f8d0947fe 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -295,6 +295,8 @@ fr: alt_text: Emblème du ministère de la défense field_of_operation: Champ d'opération operations_in: Opérations à %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/gd.yml b/config/locales/gd.yml index adee072b3..198838a49 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -443,6 +443,8 @@ gd: alt_text: Suaitheantas rialtais Chónaidhme field_of_operation: Réimse oibríochta operations_in: Idirbhearta I %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/gu.yml b/config/locales/gu.yml index e3ac59511..c8f3cc8f4 100644 --- a/config/locales/gu.yml +++ b/config/locales/gu.yml @@ -295,6 +295,8 @@ gu: alt_text: સંરક્ષણ મંત્રાલય ક્રેસ્ટ field_of_operation: કામગીરીનું ક્ષેત્ર operations_in: "%{location} માં સંચાલનો" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/he.yml b/config/locales/he.yml index b5f3fe1cc..bde306253 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -295,6 +295,8 @@ he: alt_text: סמל משרד הביטחון field_of_operation: תחום הפעולה operations_in: פעולות ב- %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/hi.yml b/config/locales/hi.yml index 5ef227a7a..6d26f89fe 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -295,6 +295,8 @@ hi: alt_text: रक्षा मंत्रालय का क्रेस्ट field_of_operation: संचालन का क्षेत्र operations_in: "%{location} में संचालन" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/hr.yml b/config/locales/hr.yml index 3e18b29b2..5c774b5cc 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -369,6 +369,8 @@ hr: alt_text: Grb Ministarstva obrane field_of_operation: Područje djelovanja operations_in: Operacije u %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 84783b4fc..848b9d4a7 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -295,6 +295,8 @@ hu: alt_text: A Védelmi Minisztérium címere field_of_operation: Működési terület operations_in: 'Tevékenységek itt: %{location}' + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/hy.yml b/config/locales/hy.yml index a1874d342..ba5023015 100644 --- a/config/locales/hy.yml +++ b/config/locales/hy.yml @@ -295,6 +295,8 @@ hy: alt_text: Պաշտպանության նախարարության զինանշան field_of_operation: Գործունեության ոլորտ operations_in: Գործունեություն % {location}-ում + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/id.yml b/config/locales/id.yml index 84f7a8dc1..04518f92e 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -221,6 +221,8 @@ id: alt_text: Lambang Kementerian Pertahanan field_of_operation: Bidang operasi operations_in: Operasi di %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/is.yml b/config/locales/is.yml index c5d03015c..77588c009 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -295,6 +295,8 @@ is: alt_text: Skjaldarmerki Varnarmálaráðuneytisins field_of_operation: Starfsvið operations_in: Starfsemi á %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/it.yml b/config/locales/it.yml index 2595d5c03..6aa04da73 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -295,6 +295,8 @@ it: alt_text: Stemma del Ministero della Difesa field_of_operation: Campo operativo operations_in: Operazioni in %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c16f0dad1..3b81d01b5 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -221,6 +221,8 @@ ja: alt_text: 国防省の紋章 field_of_operation: 運用分野 operations_in: "%{location} での操作" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ka.yml b/config/locales/ka.yml index 5b6999ef3..0c2f9ec39 100644 --- a/config/locales/ka.yml +++ b/config/locales/ka.yml @@ -295,6 +295,8 @@ ka: alt_text: თავდაცვის სამინისტრო field_of_operation: ოპერაციის სფერო operations_in: ოპერაციები %{location}-ში + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/kk.yml b/config/locales/kk.yml index 68b1c29f4..eacc3bf7b 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -295,6 +295,8 @@ kk: alt_text: Қорғаныс министрлігінің елтаңбасы field_of_operation: Жұмыс аймағы operations_in: "%{location} орнындағы жұмыстар" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 83d2a68c2..fc390bd21 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -221,6 +221,8 @@ ko: alt_text: 국방부 문장 field_of_operation: 운영 현장 operations_in: "%{Location} 내 운영" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/lt.yml b/config/locales/lt.yml index b36f4d8ba..86b193d48 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -369,6 +369,8 @@ lt: alt_text: Apsaugos ministerijos herbas field_of_operation: Veiklos sritis operations_in: Veikla vykdoma %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 89776f5f4..969df597b 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -295,6 +295,8 @@ lv: alt_text: Aizsardzības ministrijas ģerbonis field_of_operation: Darbības joma operations_in: 'Darbības šeit: %{location}' + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ms.yml b/config/locales/ms.yml index 0c3760d09..23e1b904c 100644 --- a/config/locales/ms.yml +++ b/config/locales/ms.yml @@ -221,6 +221,8 @@ ms: alt_text: Lambang Kementerian Pertahanan field_of_operation: Medan operasi operations_in: Operasi di %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/mt.yml b/config/locales/mt.yml index 65c2abc83..acd3f8e15 100644 --- a/config/locales/mt.yml +++ b/config/locales/mt.yml @@ -443,6 +443,8 @@ mt: alt_text: Il-Ministeru tad-Difiża field_of_operation: Qasam tal-operazzjoni operations_in: Operazzjonijiet fil- %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ne.yml b/config/locales/ne.yml index 0672e7f6f..47cfcb99c 100644 --- a/config/locales/ne.yml +++ b/config/locales/ne.yml @@ -295,6 +295,8 @@ ne: alt_text: रक्षा मन्त्रालय क्रेस्ट field_of_operation: सञ्चालन क्षेत्र operations_in: "%{location} मा सञ्चालन" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index edb8df3b1..001dc9d91 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -295,6 +295,8 @@ nl: alt_text: Wapen van het ministerie van Defensie field_of_operation: Gebied van operatie operations_in: Operaties in %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/no.yml b/config/locales/no.yml index 6fc870953..a710e1b82 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -295,6 +295,8 @@ alt_text: Forsvarsdepartementets crest field_of_operation: Operasjonsfelt operations_in: Operasjoner i %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/pa-pk.yml b/config/locales/pa-pk.yml index f7750b612..f22e4b2c9 100644 --- a/config/locales/pa-pk.yml +++ b/config/locales/pa-pk.yml @@ -295,6 +295,8 @@ pa-pk: alt_text: وزارتِ دفاع کریسٹ field_of_operation: عمل کرن دا حلقہ operations_in: ایندے بارے عمل {location}% + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/pa.yml b/config/locales/pa.yml index 56f1f6ae1..9fece8186 100644 --- a/config/locales/pa.yml +++ b/config/locales/pa.yml @@ -295,6 +295,8 @@ pa: alt_text: ਰੱਖਿਆ ਮੰਤਰਾਲਾ ਸਿਖਰ field_of_operation: ਕਾਰਜ ਖੇਤਰ operations_in: "%{location} ਵਿੱਚ ਕਾਰਜ" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index d43326c62..abb639b32 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -443,6 +443,8 @@ pl: alt_text: Herb Ministerstwa Obrony field_of_operation: Zakres działania operations_in: Działania w %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ps.yml b/config/locales/ps.yml index 64c52823f..f8e1b79db 100644 --- a/config/locales/ps.yml +++ b/config/locales/ps.yml @@ -295,6 +295,8 @@ ps: alt_text: د دفاع وزارت کریسټ field_of_operation: د عملیاتو ساحه operations_in: په%{location} کې عملیات + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 74146b70e..fe2f19371 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -295,6 +295,8 @@ pt: alt_text: Brasão do Ministério da Defesa field_of_operation: Campo de operação operations_in: Operações em %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 2d7ec9dff..14ae32f14 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -369,6 +369,8 @@ ro: alt_text: Emblema Ministerului Apărării field_of_operation: Domeniul de activitate operations_in: Operațiuni în %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b7cb3452d..6986b8804 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -443,6 +443,8 @@ ru: alt_text: Герб Министерства Обороны field_of_operation: Сфера деятельности operations_in: Деятельность в %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/si.yml b/config/locales/si.yml index 88d724c38..27e044664 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -295,6 +295,8 @@ si: alt_text: ආරක්ෂක අමාත්යාංශ ලාංඡනය field_of_operation: මෙහෙයුම් ක්ෂේත්රය operations_in: "%{location} තුළ මෙහෙයුම්" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sk.yml b/config/locales/sk.yml index fb96ade33..52e94ce81 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -369,6 +369,8 @@ sk: alt_text: Erb ministerstva obrany field_of_operation: Oblasť činnosti operations_in: Operácie v %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index b4bace4f9..06fe8d4c9 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -443,6 +443,8 @@ sl: alt_text: Grb Ministrstva za obrambo field_of_operation: Področje delovanja operations_in: Dejavni v %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/so.yml b/config/locales/so.yml index d2f5da1ef..65540ae3b 100644 --- a/config/locales/so.yml +++ b/config/locales/so.yml @@ -295,6 +295,8 @@ so: alt_text: Calaamada Wasaarada Difaaca field_of_operation: Hawalaha dibadaa operations_in: Hawalaha %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sq.yml b/config/locales/sq.yml index c86c6a70f..e45acd3e5 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -295,6 +295,8 @@ sq: alt_text: Stema e Ministrisë së Mbrojtjes field_of_operation: Fusha e operimit operations_in: Operacione në %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 3715fc736..851cacdf9 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -369,6 +369,8 @@ sr: alt_text: Grb Ministarstva odbrane field_of_operation: Oblast delovanja operations_in: Delovanje na lokaciji %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 1d570d02a..d7825507e 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -295,6 +295,8 @@ sv: alt_text: Försvarsministeriets vapensköld field_of_operation: Verksamhetsområde operations_in: Verksamhet på %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/sw.yml b/config/locales/sw.yml index 6e6df2585..bff658bef 100644 --- a/config/locales/sw.yml +++ b/config/locales/sw.yml @@ -295,6 +295,8 @@ sw: alt_text: Eneo la Wizara ya Ulinzi field_of_operation: Sehemu ya kazi operations_in: Shughuli zinazofanywa katika %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ta.yml b/config/locales/ta.yml index 7a8375f0c..f58f1cc2b 100644 --- a/config/locales/ta.yml +++ b/config/locales/ta.yml @@ -295,6 +295,8 @@ ta: alt_text: பாதுகாப்பு காவல்துறை அமைச்சர் field_of_operation: இயங்குதளம் operations_in: "%{location}-ல் செயல்பாடுகள்" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/th.yml b/config/locales/th.yml index 583c9ba64..4a1120faa 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -221,6 +221,8 @@ th: alt_text: ตรากระทรวงกลาโหม field_of_operation: พื้นที่ปฏิบัติการ operations_in: การดำเนินงานใน %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/tk.yml b/config/locales/tk.yml index 2cd1ab1f5..caabefbc8 100644 --- a/config/locales/tk.yml +++ b/config/locales/tk.yml @@ -295,6 +295,8 @@ tk: alt_text: Goranmak ministrliginiň nyşany field_of_operation: Iş meýdany operations_in: "%{location} ýerindäki işler" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index b4000ed11..9341b1a36 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -295,6 +295,8 @@ tr: alt_text: Savunma Bakanlığı arması field_of_operation: Faaliyet alanı operations_in: "%{location} konumundaki faaliyetler" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 284802701..6f5e32fa1 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -443,6 +443,8 @@ uk: alt_text: Герб Міністерства оборони field_of_operation: Сфера діяльності operations_in: Операції в %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/ur.yml b/config/locales/ur.yml index 90de9c1ce..19053cc8e 100644 --- a/config/locales/ur.yml +++ b/config/locales/ur.yml @@ -295,6 +295,8 @@ ur: alt_text: وزارت دفاع کا کریسنٹ field_of_operation: کارروائی کی فیلڈ operations_in: "%{location} میں کارروائیاں" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/uz.yml b/config/locales/uz.yml index a1dbd4ea4..73595c962 100644 --- a/config/locales/uz.yml +++ b/config/locales/uz.yml @@ -295,6 +295,8 @@ uz: alt_text: Мудофаа вазирлигининг эмблемаси field_of_operation: Фаолият соҳаси operations_in: "%{location} да ишлаш" + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 5ea19d0c6..f844e62dc 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -221,6 +221,8 @@ vi: alt_text: Huy hiệu Bộ trưởng Quốc phòng field_of_operation: Lĩnh vực hoạt động operations_in: Hoạt động ở %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/yi.yml b/config/locales/yi.yml index 2df72c22d..00066aba7 100644 --- a/config/locales/yi.yml +++ b/config/locales/yi.yml @@ -295,6 +295,8 @@ yi: alt_text: field_of_operation: operations_in: + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/zh-hk.yml b/config/locales/zh-hk.yml index dfcea1058..41209eb5b 100644 --- a/config/locales/zh-hk.yml +++ b/config/locales/zh-hk.yml @@ -221,6 +221,8 @@ zh-hk: alt_text: 國防部徽章 field_of_operation: 行動領域 operations_in: 行動位置 %{location} + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/zh-tw.yml b/config/locales/zh-tw.yml index 2dac28915..9419252f7 100644 --- a/config/locales/zh-tw.yml +++ b/config/locales/zh-tw.yml @@ -221,6 +221,8 @@ zh-tw: alt_text: 國防部紋章 field_of_operation: 經營領域 operations_in: 在 %{location} 的領域 + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index c8ca1e275..8879ec56b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -221,6 +221,8 @@ zh: alt_text: 国防部徽章 field_of_operation: 经营领域 operations_in: 在 %{location} 经营 + fields_of_operation: + context: get_involved: civil_service: civil_service_quarterly: diff --git a/test/integration/fields_of_operation_test.rb b/test/integration/fields_of_operation_test.rb new file mode 100644 index 000000000..04e6a10e9 --- /dev/null +++ b/test/integration/fields_of_operation_test.rb @@ -0,0 +1,14 @@ +require "test_helper" + +class FieldsOfOperationTest < ActionDispatch::IntegrationTest + test "renders the relevant information on the page" do + setup_and_visit_content_item("fields_of_operation") + + assert page.has_title?("Fields of operation - GOV.UK") + + assert_has_component_title("Fields of operation") + + assert page.has_link? "A field of operation", href: "/government/fields-of-operation/field-of-operation-one" + assert page.has_link? "Another field of operation", href: "/government/fields-of-operation/field-of-operation-two" + end +end diff --git a/test/presenters/fields_of_operation_presenter_test.rb b/test/presenters/fields_of_operation_presenter_test.rb new file mode 100644 index 000000000..e740ad1ef --- /dev/null +++ b/test/presenters/fields_of_operation_presenter_test.rb @@ -0,0 +1,26 @@ +require "presenter_test_helper" + +class FieldsOfOperationPresenterTest < PresenterTestCase + def schema_name + "fields_of_operation" + end + + test "presents the title and context" do + title_component_params = { + title: "Fields of operation", + context: "British fatalities", + context_locale: :en, + } + + assert_equal title_component_params, presented_item.title_and_context + end + + test "presents the fields of operation" do + expected_fields_of_operation = [ + ["A field of operation", "/government/fields-of-operation/field-of-operation-one"], + ["Another field of operation", "/government/fields-of-operation/field-of-operation-two"], + ] + + assert_equal expected_fields_of_operation, presented_item.fields_of_operation + end +end