hookkeywords + team with role
This commit is contained in:
parent
0726c50993
commit
243583d024
3 changed files with 77 additions and 12 deletions
|
|
@ -120,11 +120,22 @@
|
|||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($team = $page->team()->split()): ?>
|
||||
<?php if (count($team) > 0): ?>
|
||||
<?php if ($team = $page->team()->toStructure()): ?>
|
||||
<?php if ($team->isNotEmpty()): ?>
|
||||
<div class="dl__group">
|
||||
<dt>Équipe</dt>
|
||||
<dd><?= implode(', ', array_map('esc', $team)) ?></dd>
|
||||
<dd><?php
|
||||
$members = [];
|
||||
foreach ($team as $member) {
|
||||
$name = $member->name()->esc();
|
||||
if ($member->role()->isNotEmpty()) {
|
||||
$members[] = $name . ' (' . $member->role()->esc() . ')';
|
||||
} else {
|
||||
$members[] = $name;
|
||||
}
|
||||
}
|
||||
echo implode(', ', $members);
|
||||
?></dd>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue