mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
issue641: don't list all children if parent is chosen
add mechanism to differenciate string in export
This commit is contained in:
parent
ccea6dd95c
commit
6b1155b9d8
@ -85,7 +85,8 @@ class SocialIssueFilter implements FilterInterface
|
||||
if (null === $si) {
|
||||
$issues[] = $this->translator->trans('Not given');
|
||||
} else {
|
||||
$issues[] = $this->socialIssueRender->renderString($si, []);
|
||||
$issues[] = $this->renderIssue($si);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,4 +128,17 @@ class SocialIssueFilter implements FilterInterface
|
||||
array_intersect_key($array, $unique_ids)
|
||||
);
|
||||
}
|
||||
|
||||
private function renderIssue(SocialIssue $si): string
|
||||
{
|
||||
$render_str = $this->socialIssueRender->renderString($si, []);
|
||||
|
||||
if (!$si->hasParent()) {
|
||||
if (count($si->getDescendants()) > 0) {
|
||||
return $render_str . " (et dérivés)";
|
||||
}
|
||||
}
|
||||
|
||||
return $render_str;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user