$newline never $# SPDX-FileCopyrightText: 2022 Gregor Kleen $# $# SPDX-License-Identifier: AGPL-3.0-or-later

_{MsgNewsActiveAllocations}
$forall allocs@(NonEmpty (Entity cId cAlloc, _) oldAllocs) <- toList activeAllocs $with (tid, ssh, ash) <- (allocationTerm cAlloc, allocationSchool cAlloc, allocationShorthand cAlloc)
#{toPathPiece tid} - #{ssh} - #{ash} #{allocationName cAlloc} $maybe tWidget <- allocTime cAlloc
^{tWidget} $if not (null oldAllocs)
$forall (Entity aId alloc, _) <- allocsToList allocs #{toPathPiece (allocationTerm alloc)}
_{MsgNewsActiveAllocationsPlaces} $forall (Entity aId _, allocInfo) <- allocsToList allocs #{auiPlaces allocInfo}
_{MsgNewsActiveAllocationsApplicants} $forall (Entity aId _, allocInfo) <- allocsToList allocs #{auiApplicants allocInfo}
_{MsgNewsActiveAllocationsPlacementsMade} $forall (Entity aId _, allocInfo) <- allocsToList allocs #{auiPlacementsMade allocInfo}
_{MsgNewsActiveAllocationsApplicantsPlaced} $forall (Entity aId _, allocInfo) <- allocsToList allocs #{auiApplicantsPlaced allocInfo} ^{allocationInfo}