Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
Calm the people page and align it with the other list pages
Guido Boyke989b5b411336
diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.cssindex 096b956..ad59778 100644--- a/app/assets/stylesheets/application.tailwind.css+++ b/app/assets/stylesheets/application.tailwind.css@@ -25,16 +25,11 @@.members-state { @apply inline-flex shrink-0 items-center gap-1 text-[11px] text-muted; }.members-status-dot { width: 5px; height: 5px; @apply rounded-full bg-cream-500; }.members-presence { background: #6E9A3E; @apply absolute -bottom-0.5 -end-0.5 w-2 h-2 rounded-full border border-cream-50; }- .members-more { @apply inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded text-cream-500 hover:bg-cream-200; list-style: none; }- .members-more::-webkit-details-marker { display: none; }- .members-menu { position: relative; }- .members-menu[open] { z-index: 30; }- .members-menu-items { @apply absolute right-0 top-full z-30 mt-1 w-64 rounded-lg border border-cream-300 bg-surface-raised py-1 shadow-md; }- .members-menu-items a, .members-menu-items button { @apply block w-full px-4 py-2 text-left text-sm text-heading hover:bg-cream-100; }- .members-danger, .members-menu-items .members-danger { color: #B63426; }+ .members-more { @apply inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded text-cream-500 hover:bg-cream-200; }+ .members-danger { color: #B63426; }.members-role-select { @apply w-full cursor-pointer rounded border-0 bg-transparent py-1 pl-1 pr-6 text-[13px] text-heading hover:bg-cream-200; background-size: 12px; background-position: right 4px center; }.members-invitation-row { @apply flex items-center gap-4 border-b border-cream-200 py-3; }- .members-invitation-row .members-menu { margin-inline-start: auto; }+ .members-invitation-row .more-menu { margin-inline-start: auto; }.members-panel { @apply rounded-xl border border-cream-300 bg-surface-raised p-5; position: sticky; top: 16px; }.members-panel .members-role-select { @apply border border-cream-400 px-2 pr-6; width: auto; max-width: 190px; }.members-setting { @apply flex items-center justify-between gap-4 border-b border-cream-200 py-4; }@@ -45,7 +40,7 @@.members-row:focus-within, .members-invitation-row:focus-within { @apply bg-cream-200/70; }.members-row--selected, .members-row--selected:focus-within { @apply bg-cream-200; }.members-row--selected:hover { background-color: rgb(var(--selected-row-hover)); }- .dark .members-danger { color: var(--wash-danger-text); }+ .dark .more-menu__danger { color: var(--wash-danger-text); }/* The list is capped (layout.css, "Page widths"); open, the lane docks at thecap and adds its 24 px gap and its 400 px. */@media (min-width: 1100px) {@@ -386,15 +381,28 @@.bg-btn-primary, .mobile-primary, .bg-lime-200, .bg-lime-300, .bg-lime-400, .bg-lime-500,[class*="bg-lime-200"], [class*="bg-lime-300"], [class*="bg-lime-400"] { color: #14110c; }+/* "···": the rarer actions of a row or a lane behind one button (members+ page, people lane). A <details>, so it opens without a script; whoever+ closes it on an outside click or Escape is the page's controller+ (details-autoclose, or membership-workspace). A destructive item is red. */+@layer components {+ .more-menu { position: relative; }+ .more-menu[open] { z-index: 30; }+ .more-menu__trigger { @apply inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded text-cream-500 hover:bg-cream-200 hover:text-heading; list-style: none; }+ .more-menu__trigger::-webkit-details-marker { display: none; }+ .more-menu__items { @apply absolute right-0 top-full z-30 mt-1 w-64 rounded-lg border border-cream-300 bg-surface-raised py-1 shadow-md; }+ .more-menu__items a, .more-menu__items button { @apply block w-full px-4 py-2 text-left text-sm text-heading hover:bg-cream-100; }+ .more-menu__items .more-menu__danger { color: #B63426; }+ .dark .more-menu__items .more-menu__danger { color: var(--wash-danger-text); }+}+/* Personen: the shared people directory (organisations/people). One columnof rows, the person in the lane. Hairlines everywhere; only the main action(the primary Neo button) carries the hard edge and the offset shadow, as onthe rebuilt tickets. Tokens only, so all three themes follow. */@layer components {- .people-head { @apply flex items-start gap-4 px-6 pt-5; }- .people-head__title { @apply flex min-w-0 flex-col gap-1; }- .people-head__h1 { @apply text-[22px] font-bold leading-tight tracking-tight text-heading; }- .people-head__count { @apply text-[13px] text-muted; }+ .people-head { @apply flex items-center gap-4 px-6 pt-5; }+ .people-head > * { @apply min-w-0 flex-1; }.people-head__action { margin-inline-start: auto; }.people-tools { @apply flex flex-wrap items-center gap-2 px-6 pb-3 pt-4; }.people-search { width: 260px; max-width: 100%; }@@ -402,39 +410,35 @@.people-search__field input { @apply min-w-0 flex-1 border-0 bg-transparent p-0 text-[13px] text-heading outline-none focus:ring-0; }.people-search__field:focus-within { border-color: rgb(var(--ink)); }.people-filters { @apply flex flex-wrap items-center gap-2; }- .people-pill { @apply inline-flex items-baseline gap-1.5 rounded-full border border-cream-300 bg-surface-raised px-3 py-1 text-[13px] text-heading no-underline hover:bg-cream-200; }- .people-pill--active { @apply border-cream-600 font-semibold; background-color: rgb(var(--selected-row)); }- .people-pill__count { @apply font-mono text-[11px] font-normal text-muted; }+ .people-pill { @apply inline-flex items-baseline gap-1.5 rounded-full px-3 py-1 text-[13px] text-heading no-underline hover:bg-cream-100; }+ .people-pill--active { @apply font-semibold; background-color: rgb(var(--selected-row)); }+ .people-pill--active:hover { background-color: rgb(var(--selected-row-hover)); }+ .people-pill__count { @apply text-[11px] font-normal tabular-nums text-muted; }.people-list { @apply mx-6 mb-6 border-t border-ink; }.people-row { @apply -mx-2 flex cursor-pointer items-center gap-3 border-b border-cream-200 px-2 py-2.5 outline-none hover:bg-cream-100 focus-visible:bg-cream-100; }.people-row.selected-row { background-color: rgb(var(--selected-row)); }- .people-row.selected-row .people-row__name { @apply font-semibold; }.people-row__text { @apply flex min-w-0 flex-1 flex-col gap-0.5; }- .people-row__line { @apply flex min-w-0 items-baseline gap-2; }.people-row__name { @apply truncate text-sm font-medium text-heading; }.people-row__sub { @apply truncate text-xs text-muted; }- /* S2a: the column heads (NAME, ZULETZT) sort the list; the ink line moves- from the list to the heads. */+ /* S2a: the column heads (Name, Zuletzt) sort the list; the ink line moves+ from the list to the heads. Two plain words, the active one in ink. */.people-columns { @apply mx-6 flex items-center gap-3 border-b border-ink pb-1.5; }.people-columns + .people-list { border-top-width: 0; }.people-columns__head--name { @apply min-w-0 flex-1; padding-inline-start: 42px; }.people-columns__head--last { @apply w-[120px] flex-none text-end; }- .people-columns__link { @apply inline-flex items-center gap-1 font-mono text-[10px] uppercase tracking-[0.08em] text-muted no-underline hover:text-heading; }+ .people-columns__link { @apply inline-flex items-center gap-1 text-xs text-muted no-underline hover:text-heading; }.people-columns__link--active { @apply text-heading; }- .people-row__last { @apply w-[120px] flex-none whitespace-nowrap text-end text-xs text-cream-700; }- .people-row__last--none { @apply text-cream-500; }- .people-last { @apply flex items-baseline gap-2.5 rounded-lg bg-cream-50 px-3 py-2.5 text-[13px]; }- .people-last i, .people-last__label { @apply flex-none text-muted; }- .people-last__text { @apply min-w-0 flex-1 text-heading; }- .people-last__text--none { @apply text-muted; }- .people-meetings { @apply flex flex-col; }- .people-meetings__title { @apply pb-1.5 text-sm font-semibold text-heading; }- .people-meetings__empty { @apply py-1.5 text-[13px] text-muted; }- .people-meetings__row { @apply -mx-2 flex items-baseline gap-3 rounded-md border-t border-cream-200 px-2 py-2 text-heading no-underline hover:bg-cream-100; }- .people-meetings__date { @apply w-[88px] flex-none font-mono text-xs text-muted; }- .people-meetings__text { @apply flex min-w-0 flex-1 flex-col gap-px; }- .people-meetings__name { @apply truncate text-sm; }- .people-meetings__project { @apply text-xs text-muted; }+ .people-row__last { @apply w-[120px] flex-none whitespace-nowrap text-end text-xs tabular-nums text-muted; }+ /* The meetings: one line each, date and title. Without one the title and+ "Noch kein Meeting." share a line. */+ .people-meetings { @apply flex flex-col border-t border-cream-200 pt-4; }+ .people-meetings--empty { @apply flex-row items-baseline gap-2.5; }+ .people-meetings__title { @apply pb-1 text-sm font-semibold text-heading; }+ .people-meetings--empty .people-meetings__title { @apply pb-0; }+ .people-meetings__empty { @apply text-[13px] text-muted; }+ .people-meetings__row { @apply -mx-2 flex items-baseline gap-3 rounded-md px-2 py-1.5 text-heading no-underline hover:bg-cream-100; }+ .people-meetings__date { @apply w-[76px] flex-none font-mono text-xs text-muted; }+ .people-meetings__name { @apply min-w-0 flex-1 truncate text-sm; }.people-meetings .people-text-action { @apply mt-1 self-start; }.people-badge { @apply shrink-0 rounded-full border border-cream-300 bg-cream-100 px-1.5 text-[11px] text-cream-600; }/* Members keep the chip's own tone; contacts (no account) a lighter one.@@ -452,18 +456,15 @@.people-ghost-action { @apply inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-[13px] text-cream-600 no-underline hover:bg-cream-200 hover:text-heading; }.people-icon-action { @apply inline-grid h-[30px] w-[30px] place-items-center rounded-md text-[13px] text-cream-500 hover:bg-cream-200 hover:text-heading; }.people-secondary-action { @apply inline-flex items-center gap-1.5 rounded-lg border border-cream-400 bg-surface-raised px-3 py-1.5 text-[13px] text-heading no-underline hover:border-cream-600; }- .people-danger-action { color: #A03227; margin-inline-start: -8px; @apply self-start; }- .dark .people-danger-action { color: var(--wash-danger-text); }.people-lane { @apply flex flex-col gap-4; }.people-detail, .people-form-wrap { @apply flex flex-col gap-4; }- .people-lane__head { @apply flex items-center gap-1; }- .people-lane__kind { @apply mr-auto text-xs text-muted; }+ .people-detail__body { @apply flex flex-col gap-5; }+ .people-lane__head { @apply flex items-center justify-end gap-1; }.people-lane__divider { @apply mx-1 h-4 w-px bg-cream-200; }.people-identity { @apply flex items-center gap-3.5; }.people-identity__text { @apply flex min-w-0 flex-col gap-1; }.people-identity__name { @apply text-[22px] font-semibold leading-tight tracking-tight text-heading; }- .people-identity__status { @apply inline-flex items-center gap-2 text-[13px] text-cream-700; }- .people-identity__status i { @apply text-muted; }+ .people-identity__line { @apply text-[13px] text-muted; }.people-callout { @apply flex items-baseline gap-2.5 rounded-lg border border-cream-300 bg-cream-50 px-3 py-2.5 text-[13px] leading-normal text-heading; }.people-callout__body { @apply flex min-w-0 flex-1 flex-col items-start gap-2; }.people-callout--quiet { @apply border-transparent; }@@ -471,27 +472,28 @@.people-callout--warning > i { color: #C08A3E; }.people-callout--danger { @apply border-red-200 bg-red-50 text-red-800; }.people-callout__name { @apply font-semibold text-heading; }- .people-fields { @apply flex flex-col border-t border-cream-200; }- .people-fields__row { @apply flex items-baseline gap-3.5 border-b border-cream-200 py-2; }+ .people-fields { @apply flex flex-col gap-1.5; }+ .people-fields__row { @apply flex items-baseline gap-3.5; }.people-fields__row dt { @apply w-24 shrink-0 text-[13px] text-muted; }- .people-fields__row dd { @apply min-w-0 break-words text-sm text-heading; }+ .people-fields__row dd { @apply min-w-0 break-words text-sm tabular-nums text-heading; }.people-fields__row--stacked { @apply flex-col gap-0.5; }.people-fields__row--stacked dt { @apply w-auto text-xs; }- .people-fields__link { color: rgb(var(--text-action)); @apply inline-flex items-center gap-2 hover:underline; }- .people-fields__link i { @apply text-xs; }- .people-fields__link--mono { @apply font-mono; }- .people-tap { min-height: 52px; @apply flex items-center gap-3 rounded-[10px] border border-cream-300 bg-cream-50 px-3.5 text-[15px] text-heading no-underline; }- .people-tap--mono { @apply font-mono; }- .people-tap__hint { margin-inline-start: auto; @apply font-sans text-xs text-muted; }- .people-note h3 { @apply mb-1.5 text-[13px] font-normal text-muted; }- .people-note p { @apply whitespace-pre-line text-sm leading-relaxed text-cream-700; }- .people-footer { @apply flex flex-col gap-2 border-t border-cream-200 pt-3.5; }- .people-footer__created { @apply text-xs text-muted; }+ .people-fields__link { color: rgb(var(--text-action)); @apply hover:underline; }+ .people-tap { min-height: 52px; @apply flex items-center gap-3 rounded-[10px] border border-cream-300 bg-cream-50 px-3.5 text-[15px] tabular-nums text-heading no-underline; }+ .people-tap__hint { margin-inline-start: auto; @apply text-xs text-muted; }+ .people-note { @apply whitespace-pre-line text-sm leading-relaxed text-heading; }+ .people-footer { @apply flex flex-col gap-2 border-t border-cream-200 pt-4; }.people-footer__readonly { @apply text-xs text-muted; }- .people-history { @apply flex flex-col gap-1.5; }- .people-history li { @apply flex items-baseline gap-2.5 text-[13px] text-cream-600; }- .people-history li span { @apply min-w-0 flex-1; }- .people-history time { @apply shrink-0 font-mono text-xs text-muted; }+ /* The history folds into one line: who created it, how many changes. */+ .people-history__line { @apply text-[13px] text-muted; }+ summary.people-history__line { @apply inline-flex cursor-pointer items-center gap-1.5 hover:text-heading; list-style: none; }+ summary.people-history__line::-webkit-details-marker { display: none; }+ .people-history__chevron { @apply text-[10px] transition-transform; }+ .people-history[open] .people-history__chevron { transform: rotate(180deg); }+ .people-history__list { @apply mt-2.5 flex flex-col gap-1.5; }+ .people-history__list li { @apply flex items-baseline gap-2.5 text-[13px] text-cream-600; }+ .people-history__list li span { @apply min-w-0 flex-1; }+ .people-history__list time { @apply shrink-0 font-mono text-xs text-muted; }.people-form { @apply flex flex-col gap-3.5; }.people-form__title { @apply mr-auto text-[17px] font-semibold text-heading; }.people-form__field { @apply flex flex-col gap-1; }diff --git a/app/components/neo/users/avatar_component.rb b/app/components/neo/users/avatar_component.rbindex 0e8231c..f6b0e30 100644--- a/app/components/neo/users/avatar_component.rb+++ b/app/components/neo/users/avatar_component.rb@@ -26,6 +26,9 @@ module Neo## A block renders INSIDE the chip (e.g. the presence dot on the team page).#+ # title: replaces the tooltip (the user's name by default) where the name+ # stands next to the chip anyway; the people list names the kind there.+ ## Lists rendering many chips must preload `user: { avatar_attachment: :blob }`# or the attached? check below is an N+1.class AvatarComponent < ViewComponent::Base@@ -54,7 +57,7 @@ module Neopicture = avatar_imageinitials = picture ? tag.span(letters, hidden: true, data: { avatar_fallback_target: 'initials' }) : letterstag.span(safe_join([initials, picture, content].compact),- class: classes, title: user&.display_name, data: { controller: 'avatar-fallback' })+ class: classes, title: @options.fetch(:title) { user&.display_name }, data: { controller: 'avatar-fallback' })endprivatediff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rbindex 9bc5e20..a8321a2 100644--- a/app/helpers/people_helper.rb+++ b/app/helpers/people_helper.rb@@ -8,6 +8,9 @@ module PeopleHelperSELECTION_PARAMS = %w[person_id member_id].freeze# The icon of an additional detail that is a link (PersonDetail#href).PERSON_DETAIL_ICONS = { 'phone' => 'bi-telephone', 'email' => 'bi-envelope', 'url' => 'bi-link-45deg' }.freeze+ # The kinds of additional detail that say how to reach a person: they join+ # email and phone at the top of the lane (person_fields).+ PERSON_REACH_KINDS = %w[phone email].freeze# The page wrapper's data: the lane (layout-toggle, index-page) and the# desktop/mobile switch, the same controllers as "Alle Meetings"@@ -74,16 +77,15 @@ module PeopleHelperperson.user if activeend- # The link state under the name: [icon, words]. A member, a row whose member- # left (shown as a contact, without the account's name), or no account.- def person_link_state(person, member)- if member- ['bi-person-check', t('views.organisations.people.show.linked_member', name: viewer_display_name(member))]- elsif person&.user_id- ['bi-person-dash', t('views.organisations.people.show.former_member')]- else- ['bi-person-dash', t('views.organisations.people.show.no_account')]- end+ # The one line under the name in the lane: what the person is, and the+ # company when there is one ("Kontakt · campsys GmbH"). A row whose member+ # left reads as a former member; it is shown as a contact everywhere else.+ def person_kind_line(person, member)+ kind = if member then 'member'+ elsif person&.user_id then 'former_member'+ else 'contact'+ end+ [t("views.organisations.people.show.kind.#{kind}"), person&.company.presence].compact.join(' · ')end# The member whose account fills (and locks) name and email in the form: the@@ -111,10 +113,13 @@ module PeopleHelperend# The lines of the lane: label, value, and for email and phone the link. An- # active member's email is the account's (the form locks it). The- # additional details follow the phone, in their stored order.+ # active member's email is the account's (the form locks it). The ways to+ # reach the person come first (email, phone, then the additional phones and+ # emails), because that is what the lane is opened for; the rest follows in+ # the order of the form. The company is not a line: it stands under the+ # name (person_kind_line).def person_fields(person, member)- person_fixed_fields(person, member) + person_detail_fields(person)+ (person_fixed_fields(person, member) + person_detail_fields(person)).partition { |field| field[:reach] }.flattenend# One line per additional detail (PersonDetail): the label, or the name of@@ -129,11 +134,11 @@ module PeopleHelperdetail = PersonDetail.new(entry)label = detail.label.presence || person_detail_kind_name(detail.kind)field = { label: label, value: person_detail_value(detail) }+ field[:reach] = true if PERSON_REACH_KINDS.include?(detail.kind)href = detail.hrefnext field unless href- field.merge(href: href, icon: PERSON_DETAIL_ICONS[detail.kind], mono: detail.kind == 'phone',- action: label, external: detail.kind == 'url')+ field.merge(href: href, icon: PERSON_DETAIL_ICONS[detail.kind], action: label, external: detail.kind == 'url')endend@@ -175,7 +180,8 @@ module PeopleHelperdetail.valueend- # The fixed fields of the lane, in the order of the form.+ # The fixed fields of the lane, in the order of the form, without the+ # company (person_kind_line).def person_fixed_fields(person, member)email = member ? member.email : person&.emailphone = person&.phone@@ -183,13 +189,12 @@ module PeopleHelper({ label: Person.human_attribute_name(:salutation), value: person.salutation } if person&.salutation.present?),({ label: Person.human_attribute_name(:function), value: person.function } if person&.function.present?),({ label: Person.human_attribute_name(:department), value: person.department } if person&.department.present?),- ({ label: Person.human_attribute_name(:company), value: person.company } if person&.company.present?),# A member's email is the account's, checked by Devise only: linked as# it is, not through PersonDetail's stricter rule.- ({ label: Person.human_attribute_name(:email), value: email, href: "mailto:#{email}", icon: 'bi-envelope' } if email.present?),+ ({ label: Person.human_attribute_name(:email), value: email, href: "mailto:#{email}", icon: 'bi-envelope', reach: true } if email.present?),if phone.present?{ label: Person.human_attribute_name(:phone), value: phone, href: PersonDetail.new('kind' => 'phone', 'value' => phone).href,- icon: 'bi-telephone', mono: true, action: t('views.organisations.people.show.call') }+ icon: 'bi-telephone', action: t('views.organisations.people.show.call'), reach: true }end].compactend@@ -275,21 +280,40 @@ module PeopleHelperdef last_contact_text(last)scope = 'views.organisations.people.last_contact'if last.kind == :meeting- date = last.at.to_date- t("#{scope}.meeting", title: last.meeting_title,- date: l(date, format: date.year == Time.zone.today.year ? :short : :default))+ t("#{scope}.meeting", title: last.meeting_title, date: person_short_date(last.at.to_date))elset("#{scope}.ticket.#{last.action}", number: last.ticket_number, age: last_contact_age(last.at))endend- # The last contact and the readable meetings of one person or member in the- # lane. A member (the account, active) counts their ticket work too; a row- # of a former member only its meetings.- def person_contacts(person: nil, member: nil)- contacts = People::Contacts.new(viewer: current_user, organisation: current_organisation)- meetings = contacts.meetings_for(person: person, user: member).includes(:project)- { last: contacts.last_contacts([People::Contacts::Subject.for(person: person, member: member)]).first,- meetings: meetings }+ # A date of this year without the year (28.10.), an older one with it.+ def person_short_date(date)+ l(date, format: date.year == Time.zone.today.year ? :short : :default)+ end++ # The readable meetings of one person or member in the lane, newest first.+ # A member's count through the account (People::Contacts). The last contact+ # is not shown there: the row of the list carries it.+ def person_meetings(person: nil, member: nil)+ People::Contacts.new(viewer: current_user, organisation: current_organisation)+ .meetings_for(person: person, user: member)+ end++ # Who created a row and when: the first line of the folded history. A+ # member row nobody created by hand ("Angaben ergänzen" by a deleted+ # account, a later import) came from the account.+ def person_created_line(person, member)+ date = l(person.created_at.to_date, format: :default)+ scope = 'views.organisations.people.show'+ if person.creator then t("#{scope}.created_by", name: person_actor_name(person.creator), date: date)+ elsif member then t("#{scope}.from_account", date: date)+ else t("#{scope}.created_at", date: date)+ end+ end++ # How often a person row was changed after it was created: the number the+ # folded history names ("2 Änderungen").+ def person_change_count(person)+ person.activities.where.not(action: 'created').countendenddiff --git a/app/services/docs/contextual_help.rb b/app/services/docs/contextual_help.rbindex 129e097..3c04576 100644--- a/app/services/docs/contextual_help.rb+++ b/app/services/docs/contextual_help.rb@@ -97,6 +97,19 @@ module Docsslug: 'guides/meetings/ki-analysen',anchor: { de: 'im-assistenten-analysieren', en: 'analyse-in-the-assistant' } }],+ people: [+ { label_key: 'docs.contextual_help.people.what_is_it',+ slug: 'guides/people/directory',+ anchor: { de: 'wozu-der-bereich-da-ist', en: 'what-the-area-is-for' } },+ { label_key: 'docs.contextual_help.people.meetings',+ slug: 'guides/people/directory',+ anchor: { de: 'personen-und-meetings', en: 'people-and-meetings' } },+ { label_key: 'docs.contextual_help.people.link_participant',+ slug: 'guides/people/meeting-participants' },+ { label_key: 'docs.contextual_help.people.who_sees',+ slug: 'guides/people/directory',+ anchor: { de: 'wer-das-verzeichnis-sieht', en: 'who-sees-the-directory' } }+ ],documentation: [{ label_key: 'docs.contextual_help.documentation.what_is_it',slug: 'guides/documentation/write-and-sync' },diff --git a/app/views/organisations/memberships/_invitations.html.erb b/app/views/organisations/memberships/_invitations.html.erbindex 4dabfa2..0754903 100644--- a/app/views/organisations/memberships/_invitations.html.erb+++ b/app/views/organisations/memberships/_invitations.html.erb@@ -4,12 +4,12 @@<li class="members-invitation-row"><span class="min-w-0 flex-1 truncate text-sm text-heading"><%= invitation.email %></span><span class="text-xs text-muted"><%= t('member_management.sent') %> <time class="font-mono"><%= invitation.sent_at ? l(invitation.sent_at.to_date, format: :default) : '–' %></time></span>- <details class="members-menu" data-action="keydown.esc->membership-workspace#closeMenu">- <summary class="members-more" title="<%= t('member_management.actions_for', name: invitation.email) %>" aria-label="<%= t('member_management.actions_for', name: invitation.email) %>"><i class="bi bi-three-dots" aria-hidden="true"></i></summary>- <div class="members-menu-items">+ <details class="more-menu" data-action="keydown.esc->membership-workspace#closeMenu">+ <summary class="more-menu__trigger" title="<%= t('member_management.actions_for', name: invitation.email) %>" aria-label="<%= t('member_management.actions_for', name: invitation.email) %>"><i class="bi bi-three-dots" aria-hidden="true"></i></summary>+ <div class="more-menu__items"><button type="button" data-action="membership-workspace#copyLink" data-url="<%= copy_link_organisation_invitation_path(@current_organisation, invitation) %>" data-copied="<%= t('member_management.copied') %>" data-error="<%= t('member_management.copy_failed') %>" aria-live="polite"><%= t('member_management.copy_link') %></button><%= button_to t('member_management.resend'), resend_organisation_invitation_path(@current_organisation, invitation), form: { data: { turbo_confirm: t('member_management.confirm_resend', email: invitation.email) } } %>- <%= button_to t('member_management.withdraw'), organisation_invitation_path(@current_organisation, invitation), method: :delete, class: 'members-danger', form: { data: { turbo_confirm: t('member_management.confirm_withdraw', email: invitation.email) } } %>+ <%= button_to t('member_management.withdraw'), organisation_invitation_path(@current_organisation, invitation), method: :delete, class: 'more-menu__danger', form: { data: { turbo_confirm: t('member_management.confirm_withdraw', email: invitation.email) } } %></div></details></li>diff --git a/app/views/organisations/memberships/_member.html.erb b/app/views/organisations/memberships/_member.html.erbindex 5bae0e3..a4ea70e 100644--- a/app/views/organisations/memberships/_member.html.erb+++ b/app/views/organisations/memberships/_member.html.erb@@ -23,12 +23,12 @@<td class="members-col-since"><time datetime="<%= membership.created_at.to_date.iso8601 %>"><%= l(membership.created_at.to_date, format: :default) %></time></td><% if can_manage_members %><td class="members-col-actions">- <details class="members-menu" data-action="keydown.esc->membership-workspace#closeMenu">- <summary class="members-more" title="<%= membership.user_id == current_user.id ? t('member_management.cannot_remove_self') : t('member_management.actions_for', name: viewer_display_name(membership.user)) %>" aria-label="<%= t('member_management.actions_for', name: viewer_display_name(membership.user)) %>"><i class="bi bi-three-dots" aria-hidden="true"></i></summary>- <div class="members-menu-items">+ <details class="more-menu" data-action="keydown.esc->membership-workspace#closeMenu">+ <summary class="more-menu__trigger" title="<%= membership.user_id == current_user.id ? t('member_management.cannot_remove_self') : t('member_management.actions_for', name: viewer_display_name(membership.user)) %>" aria-label="<%= t('member_management.actions_for', name: viewer_display_name(membership.user)) %>"><i class="bi bi-three-dots" aria-hidden="true"></i></summary>+ <div class="more-menu__items"><%= link_to t('member_management.activity'), organisation_user_activities_path(@current_organisation, user_id: membership.user_id), data: { turbo_frame: '_top' } %><%= link_to t('member_management.edit_role'), membership_list_path(membership_id: membership.id) %>- <% if policy(membership).destroy? %><%= button_to t('member_management.remove'), organisation_membership_path(@current_organisation, membership), method: :delete, class: 'members-danger', form: { data: { turbo_confirm: t('member_management.confirm_remove', name: membership.user.full_name) } } %><% end %>+ <% if policy(membership).destroy? %><%= button_to t('member_management.remove'), organisation_membership_path(@current_organisation, membership), method: :delete, class: 'more-menu__danger', form: { data: { turbo_confirm: t('member_management.confirm_remove', name: membership.user.full_name) } } %><% end %></div></details></td>diff --git a/app/views/organisations/people/_contact_summary.html.erb b/app/views/organisations/people/_contact_summary.html.erbindex 8b4d9e0..1f1645d 100644--- a/app/views/organisations/people/_contact_summary.html.erb+++ b/app/views/organisations/people/_contact_summary.html.erb@@ -1,23 +1,14 @@<%# locals: (person: nil, member: nil, more_url:) %>-<%# Variant A of S2a: "Letzter Kontakt" right under the identity, then the- newest meetings (three, then "Alle N anzeigen", which reloads the lane- with ?meetings=all). Only what the viewer may read (People::Contacts); a- row opens the meeting where "Alle Meetings" opens it. No badge per- meeting: attendance is the only kind there is (E2). %>-<% summary = person_contacts(person: person, member: member) %>-<% last = summary[:last] %>+<%# The newest meetings of a person (three, then "Alle N anzeigen", which+ reloads the lane with ?meetings=all). Only what the viewer may read+ (People::Contacts); a row opens the meeting where "Alle Meetings" opens+ it. The last contact is not repeated here: the row of the list carries+ it, and without a meeting the section says so once. %>+<% scope = person_meetings(person: person, member: member) %><% all_shown = params[:meetings] == 'all' %>-<% total = summary[:meetings].count %>-<% meetings = all_shown ? summary[:meetings].to_a : summary[:meetings].limit(Organisations::PeopleController::MEETINGS_SHOWN).to_a %>-<p class="people-last">- <i class="bi bi-clock-history" aria-hidden="true"></i>- <span class="people-last__label"><%= t('views.organisations.people.show.last_contact') %></span>- <span class="people-last__text <%= 'people-last__text--none' unless last %>">- <%= last ? last_contact_text(last) : t('views.organisations.people.show.no_meeting') %>- </span>-</p>--<section class="people-meetings" aria-labelledby="people-meetings-title">+<% total = scope.count %>+<% meetings = all_shown ? scope.to_a : scope.limit(Organisations::PeopleController::MEETINGS_SHOWN).to_a %>+<section class="people-meetings <%= 'people-meetings--empty' if meetings.empty? %>" aria-labelledby="people-meetings-title"><h3 id="people-meetings-title" class="people-meetings__title"><%= t('views.organisations.people.show.meetings') %></h3><% if meetings.empty? %><p class="people-meetings__empty"><%= t('views.organisations.people.show.no_meeting') %></p>@@ -27,11 +18,9 @@<li><%= link_to organisation_meetings_path(@current_organisation, meeting_id: meeting.id), class: 'people-meetings__row',data: { turbo_frame: '_top' } do %>- <time class="people-meetings__date" datetime="<%= meeting.occurred_at.to_date.iso8601 %>"><%= l(meeting.occurred_at.to_date, format: :default) %></time>- <span class="people-meetings__text">- <span class="people-meetings__name"><%= meeting.title %></span>- <span class="people-meetings__project"><%= meeting.project.name %></span>- </span>+ <% date = meeting.occurred_at.to_date %>+ <time class="people-meetings__date" datetime="<%= date.iso8601 %>"><%= person_short_date(date) %></time>+ <span class="people-meetings__name"><%= meeting.title %></span><% end %></li><% end %>diff --git a/app/views/organisations/people/_detail.html.erb b/app/views/organisations/people/_detail.html.erbindex df2f0ba..df61d03 100644--- a/app/views/organisations/people/_detail.html.erb+++ b/app/views/organisations/people/_detail.html.erb@@ -1,82 +1,66 @@<%# locals: (person:) %>-<%# One person row: what it is, the fields, the note, who created it, the- history, rows that may be the same person (read only), and delete. For a- member the row holds the extra details; name and email come from the- account, and "delete" removes only those details (the account stays). %>+<%# One person row: the name with what it is, rows that may be the same+ person (read only), the ways to reach them and the other fields, the+ note, the meetings, and one line of who created it that unfolds the+ history. Delete waits behind "···". For a member the row holds the extra+ details; name and email come from the account, and "delete" removes only+ those details (the account stays). The body ends at reading width. %><% member = person_member_user(person) %><% can_write = policy(person).update? %><% name = person_display_name(person: person, user: member) %>-<% kind = member ? 'member' : 'contact' %>+<% if can_write %>+ <% key = member ? 'remove_details' : 'delete' %>+ <% menu = button_to t("views.organisations.people.show.#{key}"), organisation_person_path(@current_organisation, person, list_state),+ method: :delete, class: 'more-menu__danger',+ form: { data: { turbo_frame: '_top', turbo_confirm: t("views.organisations.people.show.#{key}_confirm", name: name) } } %>+<% end %><div class="people-detail"><%= render 'organisations/people/lane_head',- kind_label: t("views.organisations.people.show.kind.#{kind}"),- edit_url: (edit_organisation_person_path(@current_organisation, person, list_state) if can_write) %>+ edit_url: (edit_organisation_person_path(@current_organisation, person, list_state) if can_write), menu: menu %>- <% status_icon, status = person_link_state(person, member) %>- <%= render 'organisations/people/identity', name: name, user: member, status_icon: status_icon, status: status %>- <%= render 'organisations/people/contact_summary', person: person, member: member,- more_url: organisation_person_path(@current_organisation, person, list_state.merge('meetings' => 'all')) %>+ <div class="people-detail__body width-text">+ <%= render 'organisations/people/identity', name: name, user: member, line: person_kind_line(person, member) %>- <% duplicates = People::Directory.new(viewer: current_user, organisation: @current_organisation).duplicates_of(person) %>- <% if duplicates.any? %>- <div class="people-callout people-callout--warning">- <i class="bi bi-people" aria-hidden="true"></i>- <div class="people-callout__body">- <% duplicates.each do |entry| %>- <p>- <%= t('views.organisations.people.show.duplicate_prefix') %>- <%= link_to person_display_name(person: entry.person, user: entry.user),- organisation_people_path(@current_organisation, list_state.merge(entry.person ? { 'person_id' => entry.person.id } : { 'member_id' => entry.user.id })),- data: { turbo_frame: '_top' }, class: 'people-callout__name' %>- (<%= entry.member? ? t('views.organisations.people.index.member_badge') : t('views.organisations.people.show.contact_label') %>).- </p>- <% end %>- <% if can_write && member.nil? && duplicates.any?(&:member?) %>- <%= link_to t('views.organisations.people.show.duplicate_link'), edit_organisation_person_path(@current_organisation, person, list_state),- class: 'people-text-action' %>- <% end %>+ <% duplicates = People::Directory.new(viewer: current_user, organisation: @current_organisation).duplicates_of(person) %>+ <% if duplicates.any? %>+ <div class="people-callout people-callout--warning">+ <i class="bi bi-people" aria-hidden="true"></i>+ <div class="people-callout__body">+ <% duplicates.each do |entry| %>+ <p>+ <%= t('views.organisations.people.show.duplicate_prefix') %>+ <%= link_to person_display_name(person: entry.person, user: entry.user),+ organisation_people_path(@current_organisation, list_state.merge(entry.person ? { 'person_id' => entry.person.id } : { 'member_id' => entry.user.id })),+ data: { turbo_frame: '_top' }, class: 'people-callout__name' %>+ (<%= entry.member? ? t('views.organisations.people.index.member_badge') : t('views.organisations.people.show.contact_label') %>).+ </p>+ <% end %>+ <% if can_write && member.nil? && duplicates.any?(&:member?) %>+ <%= link_to t('views.organisations.people.show.duplicate_link'), edit_organisation_person_path(@current_organisation, person, list_state),+ class: 'people-text-action' %>+ <% end %>+ </div></div>- </div>- <% end %>+ <% end %>++ <% if member && person_bare?(person) %>+ <%= render 'organisations/people/bare_hint', member: member, url: (edit_organisation_person_path(@current_organisation, person, list_state) if can_write) %>+ <% end %>- <% if member && person_bare?(person) %>- <%= render 'organisations/people/bare_hint', member: member, url: (edit_organisation_person_path(@current_organisation, person, list_state) if can_write) %>- <% end %>+ <%= render 'organisations/people/fields', fields: person_fields(person, member) %>- <%= render 'organisations/people/fields', fields: person_fields(person, member) %>+ <% if person.notes.present? %>+ <p class="people-note"><%= person.notes %></p>+ <% end %>- <% if person.notes.present? %>- <section class="people-note">- <h3><%= Person.human_attribute_name(:notes) %></h3>- <p class="width-text"><%= person.notes %></p>- </section>- <% end %>+ <%= render 'organisations/people/contact_summary', person: person, member: member,+ more_url: organisation_person_path(@current_organisation, person, list_state.merge('meetings' => 'all')) %>- <div class="people-footer">- <p class="people-footer__created">- <% if person.creator %>- <%= t('views.organisations.people.show.created_by', name: person_actor_name(person.creator), date: l(person.created_at.to_date, format: :default)) %>- <% elsif member %>- <%# A member row nobody created by hand ("Angaben ergänzen" by a deleted account, a later import). %>- <%= t('views.organisations.people.show.from_account', date: l(person.created_at.to_date, format: :default)) %>- <% else %>- <%= t('views.organisations.people.show.created_at', date: l(person.created_at.to_date, format: :default)) %>+ <div class="people-footer">+ <%= render 'organisations/people/history', person: person, created_line: person_created_line(person, member) %>+ <% unless can_write %>+ <p class="people-footer__readonly"><%= t('views.organisations.people.show.read_only') %></p><% end %>- </p>- <%= render 'organisations/people/history', person: person %>+ </div></div>-- <% if can_write %>- <% key = member ? 'remove_details' : 'delete' %>- <%= render Neo::Buttons::ButtonComponent.new(- variant: :ghost, size: :small, icon: 'trash',- form: { action: organisation_person_path(@current_organisation, person, list_state), method: :delete, data: { turbo_frame: '_top' } },- confirm: t("views.organisations.people.show.#{key}_confirm", name: name),- class: 'people-danger-action'- ) do %>- <%= t("views.organisations.people.show.#{key}") %>- <% end %>- <% else %>- <p class="people-footer__readonly"><%= t('views.organisations.people.show.read_only') %></p>- <% end %></div>diff --git a/app/views/organisations/people/_fields.html.erb b/app/views/organisations/people/_fields.html.erbindex 61d41ea..9b5638c 100644--- a/app/views/organisations/people/_fields.html.erb+++ b/app/views/organisations/people/_fields.html.erb@@ -1,7 +1,9 @@<%# locals: (fields:) %>-<%# Label and value per line; email and phone are links. On a phone they are- large tap targets instead ("anrufen"). An additional detail that is a- web address (external) opens in a new tab, without the opener. %>+<%# Label and value per line; email and phone are links. The label says what+ a value is, so the desktop shows no icon before it. On a phone they are+ large tap targets instead ("anrufen"), with the icon. An additional+ detail that is a web address (external) opens in a new tab, without the+ opener. %><% if @viewport_mode == 'mobile' %><% plain, links = fields.partition { |field| field[:href].nil? } %><% if plain.any? %>@@ -12,7 +14,7 @@</dl><% end %><% links.each do |field| %>- <%= link_to field[:href], class: "people-tap #{'people-tap--mono' if field[:mono]}",+ <%= link_to field[:href], class: 'people-tap',**(field[:external] ? { target: '_blank', rel: 'noopener noreferrer' } : {}) do %><i class="bi <%= field[:icon] %>" aria-hidden="true"></i><%= field[:value] %><% if field[:action] %><span class="people-tap__hint"><%= field[:action] %></span><% end %>@@ -25,10 +27,8 @@<dt><%= field[:label] %></dt><dd><% if field[:href] %>- <%= link_to field[:href], class: "people-fields__link #{'people-fields__link--mono' if field[:mono]}",- **(field[:external] ? { target: '_blank', rel: 'noopener noreferrer' } : {}) do %>- <i class="bi <%= field[:icon] %>" aria-hidden="true"></i><%= field[:value] %>- <% end %>+ <%= link_to field[:value], field[:href], class: 'people-fields__link',+ **(field[:external] ? { target: '_blank', rel: 'noopener noreferrer' } : {}) %><% else %><%= field[:value] %><% end %>diff --git a/app/views/organisations/people/_history.html.erb b/app/views/organisations/people/_history.html.erbindex 34f9493..793f2cc 100644--- a/app/views/organisations/people/_history.html.erb+++ b/app/views/organisations/people/_history.html.erb@@ -1,15 +1,25 @@-<%# locals: (person:) %>-<%# The history of one person: who changed which field, never the values- (PersonTrackable). Read straight from the row's activities, like+<%# locals: (person:, created_line:) %>+<%# Who created the row, and how often it changed since: one line. With+ changes the line unfolds the history: who changed which field, never the+ values (PersonTrackable), read straight from the row's activities liketime_session_groups/_activities. %>-<% activities = person.activities.includes(:actor).where.not(action: 'created').order(created_at: :desc).limit(20).to_a %>-<% if activities.any? %>- <ul class="people-history" aria-label="<%= t('views.organisations.people.history.title') %>">- <% activities.each do |activity| %>- <li>- <span><%= person_history_line(activity) %></span>- <time datetime="<%= activity.created_at.iso8601 %>"><%= l(activity.created_at.to_date, format: :short) %></time>- </li>- <% end %>- </ul>+<% changes = person_change_count(person) %>+<% if changes.zero? %>+ <p class="people-history__line"><%= created_line %></p>+<% else %>+ <details class="people-history">+ <summary class="people-history__line">+ <%= created_line %> · <%= t('views.organisations.people.history.changes', count: changes) %>+ <i class="bi bi-chevron-down people-history__chevron" aria-hidden="true"></i>+ </summary>+ <% activities = person.activities.includes(:actor).where.not(action: 'created').order(created_at: :desc).limit(20).to_a %>+ <ul class="people-history__list" aria-label="<%= t('views.organisations.people.history.title') %>">+ <% activities.each do |activity| %>+ <li>+ <span><%= person_history_line(activity) %></span>+ <time datetime="<%= activity.created_at.iso8601 %>"><%= l(activity.created_at.to_date, format: :short) %></time>+ </li>+ <% end %>+ </ul>+ </details><% end %>diff --git a/app/views/organisations/people/_identity.html.erb b/app/views/organisations/people/_identity.html.erbindex bb560fc..6f32e07 100644--- a/app/views/organisations/people/_identity.html.erb+++ b/app/views/organisations/people/_identity.html.erb@@ -1,10 +1,11 @@-<%# locals: (name:, user: nil, status_icon:, status:) %>-<%# The big avatar, the name and the link state of a person or a member. %>+<%# locals: (name:, line:, user: nil) %>+<%# The big avatar, the name, and one line under it: what the person is and+ the company (person_kind_line). %><div class="people-identity"><%= render Neo::Users::AvatarComponent.new(user: user, size: :large, fallback_initials: person_initials(name),class: "people-avatar #{'people-avatar--contact' unless user}") %><div class="people-identity__text"><h2 class="people-identity__name"><%= name %></h2>- <p class="people-identity__status"><i class="bi <%= status_icon %>" aria-hidden="true"></i><%= status %></p>+ <p class="people-identity__line"><%= line %></p></div></div>diff --git a/app/views/organisations/people/_lane_head.html.erb b/app/views/organisations/people/_lane_head.html.erbindex e0a1e0d..3981054 100644--- a/app/views/organisations/people/_lane_head.html.erb+++ b/app/views/organisations/people/_lane_head.html.erb@@ -1,14 +1,22 @@-<%# locals: (kind_label:, edit_url: nil, edit_link: nil) %>-<%# The head of an open person: what it is (member, contact), "Bearbeiten" for- those who may write, and the way out. The ✕ closes the lane in place- (layout-toggle); on a phone the mobile view brings its own way back. %>+<%# locals: (edit_url: nil, edit_link: nil, menu: nil) %>+<%# The head of an open person: "Bearbeiten" for those who may write, the+ rarer actions behind "···" (menu: the items, captured by the caller), and+ the way out. What the person is stands under the name, not here. The ✕+ closes the lane in place (layout-toggle); on a phone the mobile view+ brings its own way back. %><div class="people-lane__head" data-lane-head data-lane-index-url="<%= organisation_people_path(@current_organisation) %>">- <span class="people-lane__kind"><%= kind_label %></span><% if edit_url || edit_link %><%= link_to(edit_link ? edit_link[:href] : edit_url, class: 'people-ghost-action', data: edit_link&.dig(:data)) do %><i class="bi bi-pencil" aria-hidden="true"></i><%= t('views.organisations.people.show.edit') %><% end %><% end %>+ <% if menu.present? %>+ <details class="more-menu" data-controller="details-autoclose">+ <summary class="more-menu__trigger" title="<%= t('views.organisations.people.show.more_actions') %>"+ aria-label="<%= t('views.organisations.people.show.more_actions') %>"><i class="bi bi-three-dots" aria-hidden="true"></i></summary>+ <div class="more-menu__items"><%= menu %></div>+ </details>+ <% end %><% unless @viewport_mode == 'mobile' %><span class="people-lane__divider" aria-hidden="true"></span><button type="button" class="people-icon-action" title="<%= t('views.organisations.people.show.close') %>"diff --git a/app/views/organisations/people/_list_head.html.erb b/app/views/organisations/people/_list_head.html.erbindex d7906c8..ca50bab 100644--- a/app/views/organisations/people/_list_head.html.erb+++ b/app/views/organisations/people/_list_head.html.erb@@ -1,9 +1,9 @@<%# locals: (counts:) %>-<%# The head of the list: the title with the count line, the main action, the- search and the three filters with their counts. A search or a filter is a- full visit of the index; the open person travels along. Only the main- action carries the hard edge and the offset shadow, everything else is a- hairline (the rule of the rebuilt tickets). %>+<%# The head of the list: the title, the main action, the search and the+ three filters with their counts (the only place the counts stand). A+ search or a filter is a full visit of the index; the open person travels+ along. Only the "+" carries the hard edge and the offset shadow;+ the active filter is a tint, the others are words. %><% frame_id = Organisations::PeopleController::DETAIL_FRAME_ID %><% mobile = @viewport_mode == 'mobile' %><% add_url = organisation_people_path(@current_organisation, list_state.merge('new' => Organisations::PeopleController::NEW_STATE)) %>@@ -16,28 +16,28 @@lane_link_remove_value: %w[person_id member_id user_id].to_json,lane_link_focus_value: '#person_name'} %>-<%# On a phone the shell already names the page; the head keeps the count and- a square "+". %>+<%# The head on a desktop is the shared title box with the square primary+ "+" as its title action and the "?" of the contextual help, as on "Alle+ Meetings" and "Zeiten". On a phone the shell already names the page; the+ head keeps a larger square "+". %><div class="people-head">- <div class="people-head__title">- <% unless mobile %>- <h1 class="people-head__h1"><%= t('views.organisations.people.index.title') %></h1>+ <% if mobile %>+ <% if policy(Person).create? %>+ <%= render Neo::Buttons::IconButtonComponent.new(variant: :primary, icon: 'plus-lg', size: :large, url: add_url,+ title: t('views.organisations.people.index.new_person'),+ class: 'people-head__action', data: add_data) %><% end %>- <p class="people-head__count">- <%= t('views.organisations.people.index.count_line',- people: t('views.organisations.people.index.count_people', count: counts['all']),- members: t('views.organisations.people.index.count_members', count: counts['members']),- contacts: t('views.organisations.people.index.count_contacts', count: counts['contacts'])) %>- </p>- </div>- <% if policy(Person).create? && mobile %>- <%= render Neo::Buttons::IconButtonComponent.new(variant: :primary, icon: 'plus-lg', size: :large, url: add_url,- title: t('views.organisations.people.index.new_person'),- class: 'people-head__action', data: add_data) %>- <% elsif policy(Person).create? %>- <%= render Neo::Buttons::ButtonComponent.new(variant: :primary, size: :medium, icon: 'plus-lg', url: add_url,- class: 'people-head__action', data: add_data) do %>- <%= t('views.organisations.people.index.new_person') %>+ <% else %>+ <%= render NeoTitleBoxComponent.new(title: t('views.organisations.people.index.title'), margin_bottom: nil) do |box| %>+ <% if policy(Person).create? %>+ <% box.with_title_action do %>+ <%= render Neo::Buttons::IconButtonComponent.new(variant: :primary, icon: 'plus-lg', size: :medium, url: add_url,+ title: t('views.organisations.people.index.new_person'), data: add_data) %>+ <% end %>+ <% end %>+ <% box.with_right_content do %>+ <%= render 'common/contextual_help_menu', context: :people %>+ <% end %><% end %><% end %></div>diff --git a/app/views/organisations/people/_member.html.erb b/app/views/organisations/people/_member.html.erbindex 657c1ec..d8d888e 100644--- a/app/views/organisations/people/_member.html.erb+++ b/app/views/organisations/people/_member.html.erb@@ -1,27 +1,28 @@<%# locals: (member:) %><%# A member who has no row of their own yet: name and email from the account,and the invitation to add the details. "Angaben ergänzen" opens the form- with the member chosen (?new=person&user_id=). %>+ with the member chosen (?new=person&user_id=). The same order as a person+ row (_detail), without history: nothing was changed yet. %><% can_write = policy(Person).create? %><% add_link = add_member_details_link(member) if can_write %><div class="people-detail">- <%= render 'organisations/people/lane_head', kind_label: t('views.organisations.people.show.kind.member'),- edit_link: add_link %>- <%= render 'organisations/people/identity', name: viewer_display_name(member), user: member, status_icon: 'bi-person-check',- status: t('views.organisations.people.show.linked_member', name: viewer_display_name(member)) %>- <%= render 'organisations/people/contact_summary', member: member,- more_url: member_organisation_people_path(@current_organisation, member.id, list_state.merge('meetings' => 'all')) %>- <%= render 'organisations/people/bare_hint', member: member, link: add_link %>- <%= render 'organisations/people/fields', fields: person_fields(nil, member) %>- <% membership = Membership.find_by(organisation: @current_organisation, user: member) %>- <% if membership %>- <div class="people-footer">- <p class="people-footer__created">- <%= t('views.organisations.people.show.from_account', date: l(membership.created_at.to_date, format: :default)) %>- </p>- </div>- <% end %>- <% unless can_write %>- <p class="people-footer__readonly"><%= t('views.organisations.people.show.read_only') %></p>- <% end %>+ <%= render 'organisations/people/lane_head', edit_link: add_link %>+ <div class="people-detail__body width-text">+ <%= render 'organisations/people/identity', name: viewer_display_name(member), user: member, line: person_kind_line(nil, member) %>+ <%= render 'organisations/people/bare_hint', member: member, link: add_link %>+ <%= render 'organisations/people/fields', fields: person_fields(nil, member) %>+ <%= render 'organisations/people/contact_summary', member: member,+ more_url: member_organisation_people_path(@current_organisation, member.id, list_state.merge('meetings' => 'all')) %>+ <% membership = Membership.find_by(organisation: @current_organisation, user: member) %>+ <% if membership || !can_write %>+ <div class="people-footer">+ <% if membership %>+ <p class="people-history__line"><%= t('views.organisations.people.show.from_account', date: l(membership.created_at.to_date, format: :default)) %></p>+ <% end %>+ <% unless can_write %>+ <p class="people-footer__readonly"><%= t('views.organisations.people.show.read_only') %></p>+ <% end %>+ </div>+ <% end %>+ </div></div>diff --git a/app/views/organisations/people/_results.html.erb b/app/views/organisations/people/_results.html.erbindex 8269917..65f414d 100644--- a/app/views/organisations/people/_results.html.erb+++ b/app/views/organisations/people/_results.html.erb@@ -1,7 +1,7 @@<%# locals: (entries:, counts:, selected: nil, member: nil) %>-<%# The rows of the directory (People::Directory): name with a "Mitglied"- badge, function and company below, the age of the last contact on the- right. Every row opens the lane: a person row through person_id, a member+<%# The rows of the directory (People::Directory): the chip (filled for a+ member, an outline for a contact), the name, function and company below,+ the age of the last contact on the right, empty without one. Every row opens the lane: a person row through person_id, a memberwithout a row through member_id. The two column heads sort the list(?sort=last, E5), a full visit that keeps search, filter and the openperson. The person is rendered from this request; a row click changes itdiff --git a/app/views/organisations/people/_row.html.erb b/app/views/organisations/people/_row.html.erbindex 705dbde..a6152d5 100644--- a/app/views/organisations/people/_row.html.erb+++ b/app/views/organisations/people/_row.html.erb@@ -16,23 +16,19 @@list_row_url_value: url, list_row_id_value: id, list_row_param_value: param,list_row_params_value: PeopleHelper::SELECTION_PARAMS.to_json,list_row_frame_value: Organisations::PeopleController::DETAIL_FRAME_ID } %>+<% kind_word = entry.member? ? t('views.organisations.people.show.kind.member') : t('views.organisations.people.show.kind.contact') %><%= tag.li data: row_data, tabindex: 0, class: "people-row #{'selected-row' if open}" do %>- <%= render Neo::Users::AvatarComponent.new(user: entry.user, size: :small, fallback_initials: person_initials(name),+ <%# The chip says member or contact: filled or an outline, the word in its+ tooltip and for a screen reader after the name. %>+ <%= render Neo::Users::AvatarComponent.new(user: entry.user, size: :small, fallback_initials: person_initials(name), title: kind_word,class: "people-avatar #{'people-avatar--contact' unless entry.member?}") %><span class="people-row__text">- <span class="people-row__line">- <span class="people-row__name"><%= name %></span>- <% if entry.member? %>- <span class="people-badge"><%= t('views.organisations.people.index.member_badge') %></span>- <% end %>- </span>+ <span class="people-row__name"><%= name %><span class="sr-only">, <%= kind_word %></span></span><% sub = entry.detail %><% if sub %><span class="people-row__sub"><%= sub %></span><% end %></span><% last = entry.last_contact %>- <%= tag.span(last ? last_contact_age(last.at) : t('views.organisations.people.index.never'),- class: "people-row__last #{'people-row__last--none' unless last}",- title: last ? last_contact_text(last) : t('views.organisations.people.show.no_meeting')) %>+ <%= tag.span(last ? last_contact_age(last.at) : '', class: 'people-row__last', title: (last_contact_text(last) if last)) %><% end %>diff --git a/config/locales/docs.de.yml b/config/locales/docs.de.ymlindex ae4c438..784d08f 100644--- a/config/locales/docs.de.yml+++ b/config/locales/docs.de.yml@@ -52,6 +52,11 @@ de:external_participant: "Was heißt „externer Teilnehmer\"?"what_is_linking: "Was passiert beim Verknüpfen?"analyses: "Wie erstelle ich eine KI-Analyse?"+ people:+ what_is_it: "Wozu ist der Bereich Personen da?"+ meetings: "Wie hängen Personen und Meetings zusammen?"+ link_participant: "Wie verknüpfe ich einen Meeting-Teilnehmer mit einer Person?"+ who_sees: "Wer sieht die Personen?"documentation:what_is_it: "Was ist eine Dokumentation – und was nicht?"stays_current: "Wie bleibt die Dokumentation aktuell?"diff --git a/config/locales/docs.en.yml b/config/locales/docs.en.ymlindex acbe67a..f676b2b 100644--- a/config/locales/docs.en.yml+++ b/config/locales/docs.en.yml@@ -51,6 +51,11 @@ en:external_participant: "What does \"external participant\" mean?"what_is_linking: "What happens when I link?"analyses: "How do I create an AI analysis?"+ people:+ what_is_it: "What is the people area for?"+ meetings: "How are people and meetings connected?"+ link_participant: "How do I link a meeting participant to a person?"+ who_sees: "Who sees the people?"documentation:what_is_it: "What is documentation — and what is it not?"stays_current: "How does the documentation stay up to date?"diff --git a/config/locales/views/personen.de.yml b/config/locales/views/personen.de.ymlindex 8373ddf..2770fcc 100644--- a/config/locales/views/personen.de.yml+++ b/config/locales/views/personen.de.yml@@ -16,16 +16,6 @@ de:people:index:title: "Personen"- count_line: "%{people} · %{members}, %{contacts}"- count_people:- one: "%{count} Person"- other: "%{count} Personen"- count_members:- one: "%{count} Mitglied"- other: "%{count} Mitglieder"- count_contacts:- one: "%{count} Kontakt"- other: "%{count} Kontakte"new_person: "Person anlegen"search_label: "Personen durchsuchen"search_placeholder: "Name, Funktion oder Firma"@@ -47,7 +37,6 @@ de:no_hits_text: "Gesucht wird in Name, Funktion, Abteilung, Firma und E-Mail."clear_search: "Suche zurücksetzen"back_to_list: "Personen"- never: "noch nie"columns:name: "Name"last: "Zuletzt"@@ -74,7 +63,6 @@ de:changed: "Hat Ticket #%{number} geändert, %{age}"commented: "Hat Ticket #%{number} kommentiert, %{age}"show:- last_contact: "Letzter Kontakt"no_meeting: "Noch kein Meeting."meetings: "Meetings"all_meetings:@@ -83,11 +71,10 @@ de:kind:member: "Mitglied"contact: "Kontakt"+ former_member: "Früheres Mitglied"+ more_actions: "Weitere Aktionen"close: "Schließen"edit: "Bearbeiten"- linked_member: "Mitglied: %{name}"- no_account: "Kein Konto"- former_member: "Früheres Mitglied"contact_label: "Kontakt"duplicate_prefix: "Gleicher Name:"duplicate_link: "Verknüpfen …"@@ -145,6 +132,9 @@ de:cancel: "Abbrechen"history:title: "Verlauf"+ changes:+ one: "%{count} Änderung"+ other: "%{count} Änderungen"created: "%{actor} hat die Person angelegt"updated: "%{actor} hat %{fields} geändert"other: "%{actor} hat die Person geändert"diff --git a/config/locales/views/personen.en.yml b/config/locales/views/personen.en.ymlindex 986f690..a190bbb 100644--- a/config/locales/views/personen.en.yml+++ b/config/locales/views/personen.en.yml@@ -16,16 +16,6 @@ en:people:index:title: "People"- count_line: "%{people} · %{members}, %{contacts}"- count_people:- one: "%{count} person"- other: "%{count} people"- count_members:- one: "%{count} member"- other: "%{count} members"- count_contacts:- one: "%{count} contact"- other: "%{count} contacts"new_person: "Add person"search_label: "Search people"search_placeholder: "Name, function or company"@@ -47,7 +37,6 @@ en:no_hits_text: "The search looks at name, function, department, company and email."clear_search: "Clear search"back_to_list: "People"- never: "never"columns:name: "Name"last: "Last"@@ -74,7 +63,6 @@ en:changed: "Changed ticket #%{number}, %{age}"commented: "Commented on ticket #%{number}, %{age}"show:- last_contact: "Last contact"no_meeting: "No meeting yet."meetings: "Meetings"all_meetings:@@ -83,11 +71,10 @@ en:kind:member: "Member"contact: "Contact"+ former_member: "Former member"+ more_actions: "More actions"close: "Close"edit: "Edit"- linked_member: "Member: %{name}"- no_account: "No account"- former_member: "Former member"contact_label: "Contact"duplicate_prefix: "Same name:"duplicate_link: "Link …"@@ -145,6 +132,9 @@ en:cancel: "Cancel"history:title: "History"+ changes:+ one: "%{count} change"+ other: "%{count} changes"created: "%{actor} added the person"updated: "%{actor} changed %{fields}"other: "%{actor} changed the person"diff --git a/spec/helpers/people_helper_spec.rb b/spec/helpers/people_helper_spec.rbindex 4a2d3f0..0a56a57 100644--- a/spec/helpers/people_helper_spec.rb+++ b/spec/helpers/people_helper_spec.rb@@ -77,7 +77,7 @@ RSpec.describe PeopleHelper, type: :helper dodetail('email', '[email protected]'),detail('url', 'https://example.com'), phone: nil)- expect(phone).to include(href: 'tel:+491701234567', mono: true, value: '+49 (170) 123-4567', action: 'Mobil')+ expect(phone).to include(href: 'tel:+491701234567', value: '+49 (170) 123-4567', action: 'Mobil', reach: true)expect(email).to include(href: 'mailto:[email protected]', value: '[email protected]')expect(url).to include(href: 'https://example.com', external: true)enddiff --git a/spec/requests/contextual_help_menu_spec.rb b/spec/requests/contextual_help_menu_spec.rbindex 6e9d74b..d877fe4 100644--- a/spec/requests/contextual_help_menu_spec.rb+++ b/spec/requests/contextual_help_menu_spec.rb@@ -4,7 +4,8 @@ require 'rails_helper'# What: The "?" contextual-help trigger (doc/kontexthilfe_plan.md) wired into the# phase-1 areas (Tickets, Wissen, Chat, Inbox, Übersicht) plus the phase-2-# areas Zeiten (time_sessions), Abrechnungen (billing) and Meetings.+# areas Zeiten (time_sessions), Abrechnungen (billing), Meetings and+# Personen (people).# Type: Request specs against the real controller actions (full stack).# Why: Docs::ContextualHelp + the guard spec already prove the DATA is correct# (spec/services/docs/contextual_help_spec.rb); this proves the trigger is@@ -116,6 +117,13 @@ RSpec.describe 'Contextual help menu', type: :request doexpect_contextual_help_trigger(response.body, :meetings)end+ it 'Personen: renders the trigger with the people questions' do+ get organisation_people_path(organisation)++ expect(response).to have_http_status(:ok)+ expect_contextual_help_trigger(response.body, :people)+ end+it 'Dokumentation: renders the trigger with the documentation questions' do# No documentation set connected → the empty state renders, but the "?" trigger# lives in the page header and is present regardless of connection state.diff --git a/spec/requests/organisations/memberships_management_spec.rb b/spec/requests/organisations/memberships_management_spec.rbindex d93a8cb..aa4c5cc 100644--- a/spec/requests/organisations/memberships_management_spec.rb+++ b/spec/requests/organisations/memberships_management_spec.rb@@ -49,7 +49,7 @@ RSpec.describe 'Membership management', :ci_guard, type: :request doget organisation_memberships_path(organisation)expect(response).to have_http_status(:ok)- expect(workspace.css('select, .members-menu, .members-invite, .members-text-action, #pending-invitations')).to be_empty+ expect(workspace.css('select, .more-menu, .members-invite, .members-text-action, #pending-invitations')).to be_emptyexpect(response.body).not_to include(invitation.email, invitation.token)enddiff --git a/spec/requests/organisations/people_last_contact_spec.rb b/spec/requests/organisations/people_last_contact_spec.rbindex 27586e9..69b4997 100644--- a/spec/requests/organisations/people_last_contact_spec.rb+++ b/spec/requests/organisations/people_last_contact_spec.rb@@ -2,8 +2,9 @@require 'rails_helper'-# The people page, S2a: the column "Zuletzt" with its sort, and in the lane-# "Letzter Kontakt" and the meetings of a person. Only what the viewer may+# The people page, S2a: the column "Zuletzt" with its sort (the row carries+# the last contact, its words in the tooltip), and in the lane the meetings+# of a person. Only what the viewer may# read counts; every negative claim below stands next to proof that the page# itself was rendered.RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request do@@ -68,14 +69,33 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dexpect(response.body.index('Carl Beispiel')).to be < response.body.index('Doris Dienstleister')end- it 'shows the age of the last contact and "noch nie" without one' do+ it 'shows the age of the last contact and nothing without one' domeeting(readable, at: 1.day.ago, title: 'Status', person: contact)sign_in viewerget organisation_people_path(organisation)expect(row_of(response.body, 'Doris Dienstleister')).to include('gestern', 'Letztes Meeting: Status')- expect(row_of(response.body, 'Carl Beispiel')).to include('noch nie')+ last = Nokogiri::HTML(row_of(response.body, 'Carl Beispiel')).at_css('.people-row__last')+ expect(last.text).to be_empty+ expect(last['title']).to be_nil+ end++ # The redesign of 29.10.2026: no "Mitglied" badge. The chip says it,+ # filled or an outline, the word in its tooltip and for a screen reader.+ it 'names member and contact through the chip, without a badge' do+ sign_in viewer++ get organisation_people_path(organisation)++ rows = Nokogiri::HTML(response.body).css('li.people-row')+ member = rows.find { |row| row.at_css('.people-row__name').text.include?('Carl Beispiel') }+ contact_row = rows.find { |row| row.at_css('.people-row__name').text.include?('Doris Dienstleister') }+ expect(member.at_css('.neo-user-avatar')['title']).to eq(I18n.t('views.organisations.people.show.kind.member'))+ expect(member.at_css('.people-row__name .sr-only').text).to include(I18n.t('views.organisations.people.show.kind.member'))+ expect(contact_row.at_css('.neo-user-avatar')['title']).to eq(I18n.t('views.organisations.people.show.kind.contact'))+ expect(contact_row.at_css('.neo-user-avatar')['class']).to include('people-avatar--contact')+ expect(response.body).not_to include('people-badge')endit 'sorts by ?sort=last, newest first, and keeps the sort in search, filter and selection links' do@@ -129,15 +149,14 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request denddescribe 'the lane' do- it 'shows the last contact and the three newest meetings of a contact, then "Alle N anzeigen"' do+ it 'shows the three newest meetings of a contact, then "Alle N anzeigen", without their project' domeetings = Array.new(4) { |index| meeting(readable, at: (index + 1).days.ago, title: "Runde #{index}", person: contact) }sign_in viewerget organisation_person_path(organisation, contact), headers: frame_headers- expect(response.body).to include(I18n.t('views.organisations.people.show.last_contact'), 'Letztes Meeting: Runde 0')- expect(response.body).to include('Runde 0', 'Runde 1', 'Runde 2', 'Relaunch')- expect(response.body).not_to include('Runde 3')+ expect(response.body).to include('Runde 0', 'Runde 1', 'Runde 2')+ expect(response.body).not_to include('Runde 3', 'Relaunch')expect(response.body).to include(I18n.t('views.organisations.people.show.all_meetings', count: 4))expect(response.body).to include(organisation_meetings_path(organisation, meeting_id: meetings.first.id))end@@ -162,7 +181,10 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dexpect(response.body).to include('Runde 0')expect(response.body).not_to include('Geheimrunde')expect(response.body).not_to include(I18n.t('views.organisations.people.show.all_meetings', count: 4))- expect(response.body).to include('Letztes Meeting: Runde 0')++ get organisation_people_path(organisation)+ expect(row_of(response.body, 'Doris Dienstleister')).to include('Letztes Meeting: Runde 0')+ expect(response.body).not_to include('Geheimrunde')sign_in adminget organisation_person_path(organisation, contact), headers: frame_headers@@ -181,7 +203,7 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request ddescribe 'a member (E3)' dolet(:ticket) { create(:ticket, organisation: organisation, project: readable) }- it 'shows their newer ticket work as the last contact, in the lane of a member without a row' do+ it 'shows their newer ticket work as the last contact in the row, and the meeting in the lane' domeeting(readable, at: 4.days.ago, title: 'Planung', user: colleague)post = create(:post, ticket: ticket, user: colleague, organisation: organisation)Activity.create!(actor: colleague, trackable: ticket, organisation: organisation, action: 'post_added',@@ -189,8 +211,10 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dsign_in viewerget member_organisation_people_path(organisation, colleague.id), headers: frame_headers+ expect(response.body).to include('Planung')- expect(response.body).to include("Hat Ticket ##{ticket.number} kommentiert, gestern", 'Planung')+ get organisation_people_path(organisation)+ expect(row_of(response.body, 'Carl Beispiel')).to include("Hat Ticket ##{ticket.number} kommentiert, gestern")endit 'does not count a comment the viewer may not read' do@@ -201,9 +225,9 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dsecondary: post, parameters: { 'skip_notifications' => true }, created_at: 1.day.ago)sign_in viewer- get member_organisation_people_path(organisation, colleague.id), headers: frame_headers+ get organisation_people_path(organisation)- expect(response.body).to include('Letztes Meeting: Planung')+ expect(row_of(response.body, 'Carl Beispiel')).to include('Letztes Meeting: Planung')expect(response.body).not_to include('kommentiert')end@@ -214,7 +238,7 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dget organisation_person_path(organisation, row), headers: frame_headers- expect(response.body).to include('Planung', 'Letztes Meeting: Planung')+ expect(response.body).to include('Planung')endend@@ -254,18 +278,18 @@ RSpec.describe 'Organisations::People last contact', :ci_guard, type: :request dit 'shows the meeting and not the ticket work in the lane' doget organisation_person_path(organisation, former_row), headers: frame_headers- expect(response.body).to include('Letztes Meeting: Altrunde', 'Altrunde')+ expect(response.body).to include('Altrunde')expect(response.body).not_to include("Hat Ticket ##{ticket.number}")endend- it 'shows the last contact and the meetings on a phone' do+ it 'shows the meetings on a phone' domeeting(readable, at: 1.day.ago, title: 'Status', person: contact)sign_in viewerget organisation_people_path(organisation, person_id: contact.id, viewport: 'mobile')- expect(response.body).to include('people-mobile-grid', I18n.t('views.organisations.people.show.last_contact'), 'Status')+ expect(response.body).to include('people-mobile-grid', I18n.t('views.organisations.people.show.meetings'), 'Status')endit 'asks the database as often for a list of two people as for a list of eight' dodiff --git a/spec/requests/organisations/people_spec.rb b/spec/requests/organisations/people_spec.rbindex e105fa0..72bd63c 100644--- a/spec/requests/organisations/people_spec.rb+++ b/spec/requests/organisations/people_spec.rb@@ -88,6 +88,7 @@ RSpec.describe 'Organisations::People', :ci_guard, type: :request doexpect(response.body).to include('Doris Dienstleister', '+49 30 1234567')expect(response.body).not_to include(new_organisation_person_path(organisation))expect(response.body).not_to include(edit_organisation_person_path(organisation, person))+ expect(Nokogiri::HTML(response.body).css('.people-lane__head .more-menu')).to be_emptyendit 'shows the person in the lane frame' do@@ -291,6 +292,44 @@ RSpec.describe 'Organisations::People', :ci_guard, type: :request doexpect(response.body).to include(I18n.t('views.organisations.people.history.title'))end+ # The redesign of 29.10.2026: the history folds into the line of who+ # created the row, with the number of changes in its own plural.+ it 'folds the history into one line that counts the changes' do+ created = I18n.t('views.organisations.people.show.created_at', date: I18n.l(person.created_at.to_date, format: :default))++ get organisation_person_path(organisation, person), headers: frame_headers+ lane = Nokogiri::HTML(response.body)+ expect(lane.at_css('.people-footer').text).to include(created)+ expect(lane.at_css('details.people-history')).to be_nil++ patch organisation_person_path(organisation, person), params: { person: { phone: '0', lock_version: person.reload.lock_version } }+ get organisation_person_path(organisation, person), headers: frame_headers+ summary = Nokogiri::HTML(response.body).at_css('details.people-history > summary').text.squish+ expect(summary).to include(created, I18n.t('views.organisations.people.history.changes', count: 1))+ expect(I18n.t('views.organisations.people.history.changes', count: 1)).not_to eq(I18n.t('views.organisations.people.history.changes', count: 2))+ end++ it 'puts delete behind the "···" menu, with its confirmation' do+ get organisation_person_path(organisation, person), headers: frame_headers++ menu = Nokogiri::HTML(response.body).at_css('.people-lane__head details.more-menu')+ button = menu.at_css('button.more-menu__danger')+ expect(button.text.strip).to eq(I18n.t('views.organisations.people.show.delete'))+ expect(button.ancestors('form').first['data-turbo-confirm'])+ .to eq(I18n.t('views.organisations.people.show.delete_confirm', name: 'Doris Dienstleister'))+ end++ it 'names what the person is and the company under the name, not as a line' do+ person.update!(company: 'Hoster GmbH')++ get organisation_person_path(organisation, person), headers: frame_headers+ lane = Nokogiri::HTML(response.body)++ expect(lane.at_css('.people-identity__line').text.strip)+ .to eq("#{I18n.t('views.organisations.people.show.kind.contact')} · Hoster GmbH")+ expect(lane.css('.people-fields__row dt').map { |dt| dt.text.strip }).not_to include(Person.human_attribute_name(:company))+ end+it 'filters and searches the list' doget organisation_people_path(organisation, kind: 'contacts', q: 'dienst')@@ -405,7 +444,20 @@ RSpec.describe 'Organisations::People', :ci_guard, type: :request doit 'shows no detail line for a person without details' dofields = lane_html.css('.people-fields__row dt').map { |dt| dt.text.strip }- expect(fields).to eq(%i[function company email phone].map { |field| Person.human_attribute_name(field) })+ expect(fields).to eq(%i[email phone function].map { |field| Person.human_attribute_name(field) })+ end++ # The redesign of 29.10.2026: the ways to reach a person come first, an+ # added phone or email among them; the label names the value, no icon.+ it 'puts the ways to reach the person first, without icons' do+ person.update!(additional_details: [row('text', 'nur vormittags', label: 'Erreichbar'), row('phone', '+49 30 1234568', label: 'Fax')])++ lane = lane_html+ fields = lane.css('.people-fields__row dt').map { |dt| dt.text.strip }++ expect(fields).to eq([Person.human_attribute_name(:email), Person.human_attribute_name(:phone), 'Fax',+ Person.human_attribute_name(:function), 'Erreichbar'])+ expect(lane.css('.people-fields i')).to be_emptyendit 'clears them when only the marker is sent (the last one removed)' do@@ -958,18 +1010,30 @@ RSpec.describe 'Organisations::People', :ci_guard, type: :request doendend- it 'counts all people, members and contacts in the head and the filters' do+ # 29.10.2026: the "+" of the people page is the square primary button of+ # "Alle Meetings" and "Zeiten", in the shared title box, not a text button.+ it 'offers "Person anlegen" as the square "+" of the title box' do+ sign_in admin++ get organisation_people_path(organisation)++ add = Nokogiri::HTML(response.body).at_css(".people-head a[title='#{I18n.t('views.organisations.people.index.new_person')}']")+ expect(add.at_css('svg')).to be_present+ expect(add.text.strip).to be_empty+ expect(add['data-lane-link-url-value']).to eq(new_organisation_person_path(organisation))+ end++ it 'counts all people, members and contacts at the filters only' dosign_in adminadminget organisation_people_path(organisation, kind: 'contacts')members = Membership.where(organisation: organisation, active: true).count- scope = 'views.organisations.people.index'- line = I18n.t("#{scope}.count_line", people: I18n.t("#{scope}.count_people", count: members + 1),- members: I18n.t("#{scope}.count_members", count: members),- contacts: I18n.t("#{scope}.count_contacts", count: 1))- expect(response.body).to include(line)+ page = Nokogiri::HTML(response.body)+ counts = page.css('.people-filters .people-pill__count').map { |count| count.text.strip }+ expect(counts).to eq([(members + 1).to_s, members.to_s, '1'])+ expect(page.css('.people-head p')).to be_emptyenddescribe 'the row of an active member' do@@ -1098,14 +1162,6 @@ RSpec.describe 'Organisations::People', :ci_guard, type: :request doexpect(response.body).not_to include('data-lane-close')end- it 'counts with the right singular and plural forms' do- sign_in admin- get organisation_people_path(organisation)-- expect(response.body).to match(/1 Kontakt(?!e)/)- expect(response.body).not_to include('1 Kontakte')- end-it 'names the member of the hint through the name display setting' doreader = adminreader.preference_store.set!('name_display', 'initial_last')