Skip to content

Commit

Permalink
Remove 'previous roles' from person pages
Browse files Browse the repository at this point in the history
  • Loading branch information
andysellick committed Aug 6, 2024
1 parent 2385d8b commit 23b2634
Show file tree
Hide file tree
Showing 71 changed files with 0 additions and 195 deletions.
30 changes: 0 additions & 30 deletions app/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ def current_roles_title
current_roles.map { |role| role["title"] }.to_sentence(locale: content_item.locale)
end

def previous_roles_items
previous_roles.map do |role|
{
link: {
text: role["title"],
path: role["base_path"],
},
metadata: {
appointment_duration: "#{role['start_year']} to #{role['end_year']}",
},
}
end
end

def has_previous_roles?
previous_roles.present?
end

def image_url
details.dig("image", "url")
end
Expand Down Expand Up @@ -101,18 +83,6 @@ def previous_role_appointments
@previous_role_appointments ||= role_appointments(current: false)
end

def previous_roles
previous_role_appointments
.sort_by { |role_appointment| role_appointment["details"]["started_on"] }
.reverse
.map do |role_appointment|
role_appointment["links"]["role"].first.tap do |role|
role["start_year"] = Time.zone.parse(role_appointment["details"]["started_on"]).strftime("%Y")
role["end_year"] = Time.zone.parse(role_appointment["details"]["ended_on"]).strftime("%Y")
end
end
end

def links
@content_item.content_item_data["links"]
end
Expand Down
5 changes: 0 additions & 5 deletions app/views/people/_contents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
href: "#current-roles"
} : nil,

person.has_previous_roles? ? {
text: t("people.previous_roles"),
href: "#previous-roles"
} : nil,

person.announcements.items.present? ? {
text: t("shared.schema_name.announcement.other"),
href: "#announcements"
Expand Down
14 changes: 0 additions & 14 deletions app/views/people/_previous_roles.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/people/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<div class="govuk-grid-column-two-thirds">
<%= render partial: "biography", locals: { person: person } %>
<%= render partial: "current_roles", locals: { person: person } %>
<%= render partial: "previous_roles", locals: { person: person } %>
<%= render partial: "shared/announcements", locals: { announcements: person.announcements, locale: I18n.locale } %>
</div>
</div>
2 changes: 0 additions & 2 deletions config/locales/ar/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ar:
people:
biography: سيرة ذاتية
previous_roles: الأدوار السابقة
previous_roles_in_government: الأدوار السابقة بالحكومة
read_more: المزيد عن هذه الشخصية
2 changes: 0 additions & 2 deletions config/locales/az/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
az:
people:
biography: Bioqrafiya
previous_roles: Əvvəlki vəzifələri
previous_roles_in_government: Hökumət orqanında əvvəlki vəzifələri
read_more: Bu şəxs haqqında ətraflı
2 changes: 0 additions & 2 deletions config/locales/be/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
be:
people:
biography: Бiяграфiя
previous_roles: Папярэднія пасады
previous_roles_in_government: Папярэднія дзяржаўныя пасады
read_more: Больш аб гэтай персоне
2 changes: 0 additions & 2 deletions config/locales/bg/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
bg:
people:
biography: Биография
previous_roles: Предишни длъжности
previous_roles_in_government: Предишни длъжности в правителството
read_more: Повече за това лице
2 changes: 0 additions & 2 deletions config/locales/bn/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
bn:
people:
biography: জীবনী
previous_roles: পূর্ববর্তী ভূমিকা
previous_roles_in_government: সরকারে পূর্ববর্তী ভূমিকা
read_more: এই ব্যক্তি সম্পর্কে আরও
2 changes: 0 additions & 2 deletions config/locales/cs/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
cs:
people:
biography: Životopis
previous_roles: Předchozí funkce
previous_roles_in_government: Předchozí funkce ve státní správě
read_more: Více o této osobě
2 changes: 0 additions & 2 deletions config/locales/cy/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
cy:
people:
biography: Bywgraffiad
previous_roles: Rolau blaenorol
previous_roles_in_government: Rolau blaenorol yn y llywodraeth
read_more: Mwy am y person hwn
2 changes: 0 additions & 2 deletions config/locales/da/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
da:
people:
biography: Biografi
previous_roles: Tidligere roller
previous_roles_in_government: Tidligere roller i regeringen
read_more: Mere om denne person
2 changes: 0 additions & 2 deletions config/locales/de/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
de:
people:
biography: Biografie
previous_roles: Frühere Funktionen
previous_roles_in_government: Frühere Funktionen in der Regierung
read_more: Mehr über diese Person
2 changes: 0 additions & 2 deletions config/locales/dr/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
dr:
people:
biography: بیوگرافی
previous_roles: وظیفه هایی قبلی
previous_roles_in_government: وظیفه هایی قبلی در دولت
read_more: اطلاعات بیشتر در بارهء این شخص
2 changes: 0 additions & 2 deletions config/locales/el/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
el:
people:
biography: Βιογραφία
previous_roles: Προηγούμενοι ρόλοι
previous_roles_in_government: Προηγούμενοι ρόλοι στην κυβέρνηση
read_more: Περισσότερα για αυτό το άτομο
2 changes: 0 additions & 2 deletions config/locales/en/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
en:
people:
biography: Biography
previous_roles: Previous roles
previous_roles_in_government: Previous roles in government
read_more: More about this person
2 changes: 0 additions & 2 deletions config/locales/es-419/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
es-419:
people:
biography: Biografía
previous_roles: Funciones anteriores
previous_roles_in_government: Funciones anteriores en el gobierno
read_more: Más información sobre esta persona
2 changes: 0 additions & 2 deletions config/locales/es/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
es:
people:
biography: Biografía
previous_roles: Funciones anteriores
previous_roles_in_government: Funciones anteriores en el gobierno
read_more: Más sobre esta persona
2 changes: 0 additions & 2 deletions config/locales/et/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
et:
people:
biography: Biograafia
previous_roles: Varasemad rollid
previous_roles_in_government: Varasemad rollid valitsuses
read_more: Rohkem selle isiku kohta
2 changes: 0 additions & 2 deletions config/locales/fa/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
fa:
people:
biography: زندگی‌نامه
previous_roles: نقش‌های قبلی
previous_roles_in_government: نقش‌های قبلی در دولت
read_more: اطلاعات بیشتر درباره این فرد
2 changes: 0 additions & 2 deletions config/locales/fi/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
fi:
people:
biography: Elämäkerta
previous_roles: Aiemmat roolit
previous_roles_in_government: Aiemmat tehtävät julkishallinnossa
read_more: Lisää tästä henkilöstä
2 changes: 0 additions & 2 deletions config/locales/fr/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
fr:
people:
biography: Biographie
previous_roles: Rôles précédents
previous_roles_in_government: Rôles précédents au gouvernement
read_more: Plus d'informations sur cette personne
2 changes: 0 additions & 2 deletions config/locales/gd/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
gd:
people:
biography: Beathaisnéis
previous_roles: Feidhmeanna roimhe seo
previous_roles_in_government: Róil a bhí ar siúl roimhe seo ag Aireacht an Taobh istigh
read_more: Níos mó a fhoghlaim faoin duine seo
2 changes: 0 additions & 2 deletions config/locales/gu/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
gu:
people:
biography: જીવનચરિત્ર
previous_roles: અગાઉની ભૂમિકાઓ
previous_roles_in_government: સરકારમાં અગાઉની ભૂમિકાઓ
read_more: આ વ્યક્તિ વિશે વધુ
2 changes: 0 additions & 2 deletions config/locales/he/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
he:
people:
biography: ביוגרפיה
previous_roles: תפקידים קודמים
previous_roles_in_government: תפקידים קודמים בממשלה
read_more: עוד על האדם הזה
2 changes: 0 additions & 2 deletions config/locales/hi/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
hi:
people:
biography: जीवनी
previous_roles: पिछली भूमिकाएं
previous_roles_in_government: सरकार में पिछली भूमिकाएं
read_more: इस व्यक्ति के बारे में और बातें
2 changes: 0 additions & 2 deletions config/locales/hr/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
hr:
people:
biography: Biografija
previous_roles: Prethodne uloge
previous_roles_in_government: Ranije uloge u vladi
read_more: Više o ovoj osobi
2 changes: 0 additions & 2 deletions config/locales/hu/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
hu:
people:
biography: Életrajz
previous_roles: Korábbi beosztások
previous_roles_in_government: Korábbi állami beosztások
read_more: Több erről a személyről
2 changes: 0 additions & 2 deletions config/locales/hy/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
hy:
people:
biography: Կենսագրություն
previous_roles: Նախկին պաշտոններ
previous_roles_in_government: Նախկին պաշտոններ կառավարությունում
read_more: Ավելի շատ տեղեկություն այս անձի մասին
2 changes: 0 additions & 2 deletions config/locales/id/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
id:
people:
biography: Biografi
previous_roles: Peran sebelumnya
previous_roles_in_government: Peran sebelumnya dalam pemerintahan
read_more: Selengkapnya tentang orang ini
2 changes: 0 additions & 2 deletions config/locales/is/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
is:
people:
biography: Ævisaga
previous_roles: Fyrri hlutverki
previous_roles_in_government: Fyrri hlutverk hjá ríkinu
read_more: Meira um þessa manneskju
2 changes: 0 additions & 2 deletions config/locales/it/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
it:
people:
biography: Biografia
previous_roles: Ruoli precedenti
previous_roles_in_government: Ruoli precedenti nel governo
read_more: Maggiori informazioni su questa persona
2 changes: 0 additions & 2 deletions config/locales/ja/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ja:
people:
biography: 経歴
previous_roles: 以前の役割
previous_roles_in_government: 政府における以前の役割
read_more: この人についての詳細
2 changes: 0 additions & 2 deletions config/locales/ka/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ka:
people:
biography: ბიოგრაფია
previous_roles: წინა როლები
previous_roles_in_government: წინა რომელი სახელმწიფოში
read_more: მეტი ამ ადამიანის შესახებ
2 changes: 0 additions & 2 deletions config/locales/kk/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
kk:
people:
biography: Биография
previous_roles: Алдыңғы рөлдер
previous_roles_in_government: Мемлекеттегі алдыңғы рөлдер
read_more: Осы адам туралы қосымша ақпарат
2 changes: 0 additions & 2 deletions config/locales/ko/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ko:
people:
biography: 약력
previous_roles: 이전 역할
previous_roles_in_government: 정부 내 이전 역할
read_more: 이 사람에 대해 자세히 살펴보기
2 changes: 0 additions & 2 deletions config/locales/lt/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
lt:
people:
biography: Biografija
previous_roles: Ankstesnė funkcija
previous_roles_in_government: Ankstesnė funkcija vyriausybėje
read_more: Daugiau informacijos apie šį asmenį
2 changes: 0 additions & 2 deletions config/locales/lv/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
lv:
people:
biography: Biogrāfija
previous_roles: Iepriekšējie amati
previous_roles_in_government: Iepriekšējie amati valdībā
read_more: Vairāk par šo personu
2 changes: 0 additions & 2 deletions config/locales/ms/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ms:
people:
biography: Biografi
previous_roles: Peranan sebelum ini
previous_roles_in_government: Peranan sebelum ini dalam kerajaan
read_more: Lebih lanjut tentang individu ini
2 changes: 0 additions & 2 deletions config/locales/mt/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
mt:
people:
biography: Bijografija
previous_roles: Rwolijiet preċedenti
previous_roles_in_government: Rwolijiet preċedenti fil-gvern
read_more: Iktar dwar din il-persuna
2 changes: 0 additions & 2 deletions config/locales/ne/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ne:
people:
biography:
previous_roles:
previous_roles_in_government:
read_more:
2 changes: 0 additions & 2 deletions config/locales/nl/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
nl:
people:
biography: Biografie
previous_roles: Vorige functies
previous_roles_in_government: Eerdere functies bij de overheid
read_more: Meer over deze persoon
2 changes: 0 additions & 2 deletions config/locales/no/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
'no':
people:
biography: Biografi
previous_roles: Tidligere roller
previous_roles_in_government: Tidligere roller i regjeringen
read_more: Mer om denne personen
2 changes: 0 additions & 2 deletions config/locales/pa-pk/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
pa-pk:
people:
biography: سوانح حیات
previous_roles: پچھلے کردار
previous_roles_in_government: حکومت دے وچ پچھلا کردار
read_more: ایس بندے بارے کُج ہور
2 changes: 0 additions & 2 deletions config/locales/pa/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
pa:
people:
biography: ਜੀਵਨੀ
previous_roles: ਪਿਛਲੀਆਂ ਭੂਮਿਕਾਵਾਂ
previous_roles_in_government: ਸਰਕਾਰ ਵਿੱਚ ਪਿਛਲੀਆਂ ਭੂਮਿਕਾਵਾਂ
read_more: ਇਸ ਵਿਅਕਤੀ ਬਾਰੇ ਹੋਰ
2 changes: 0 additions & 2 deletions config/locales/pl/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
pl:
people:
biography: Biografia
previous_roles: Poprzednie funkcje
previous_roles_in_government: Poprzednie funkcje w rządzie
read_more: Więcej o tej osobie
2 changes: 0 additions & 2 deletions config/locales/ps/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ps:
people:
biography: ژوندلیک
previous_roles: پخواني رولونه
previous_roles_in_government: په حکومت کې پخوانی رول
read_more: د دې کس په اړه نور
2 changes: 0 additions & 2 deletions config/locales/pt/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
pt:
people:
biography: Biografia
previous_roles: Cargos anteriores
previous_roles_in_government: Cargos anteriores no governo
read_more: Mais sobre esta pessoa
2 changes: 0 additions & 2 deletions config/locales/ro/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
ro:
people:
biography: Biografie
previous_roles: Roluri anterioare
previous_roles_in_government: Roluri anterioare în guvern
read_more: Mai multe despre această persoană
Loading

0 comments on commit 23b2634

Please sign in to comment.