People blocks and host teams
- A "People" content block: a team's members as people tiles, people
picked one by one as items (each with a title), or both.
content_blocks gains team_id (migration 054 rebuilds it for the
type CHECK); a picked person rides on the item's person_id.
- An organization host can name a team (any organization's) to show
in its place: event_hosts.team_id, carried by v_event_hosts. The
event page reads "Hosted by" the team, linked to its page.
- Admin fields can show on `when: { path, filled: true }`.
- The showcase post has a people block; the past showcase event is
hosted by the region shown as its team.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6f86a113e0
commit
7c7cdaac14
10 changed files with 228 additions and 11 deletions
|
|
@ -88,7 +88,8 @@ function loadHosts(db, ids) {
|
|||
|
||||
const rows = db
|
||||
.prepare(
|
||||
`SELECT event_id, host_kind, host_id, host_name, host_org_kind
|
||||
`SELECT event_id, host_kind, host_id, host_name, host_org_kind,
|
||||
host_team_id, host_team_name
|
||||
FROM v_event_hosts
|
||||
WHERE event_id IN (${marks(ids.length)})
|
||||
AND host_is_published = 1
|
||||
|
|
@ -115,6 +116,9 @@ function shapeHost(row) {
|
|||
// Which of /regions, /groups, /partners the slug belongs to.
|
||||
// Null for a person, whose route needs no disambiguating.
|
||||
org_kind: row.host_org_kind,
|
||||
// The team an organization host is shown as, when one is set
|
||||
// (and published): the event page names and links it instead.
|
||||
team: row.host_team_id ? { id: row.host_team_id, name: row.host_team_name } : null,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue