mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +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) {
|
if (null === $si) {
|
||||||
$issues[] = $this->translator->trans('Not given');
|
$issues[] = $this->translator->trans('Not given');
|
||||||
} else {
|
} else {
|
||||||
$issues[] = $this->socialIssueRender->renderString($si, []);
|
$issues[] = $this->renderIssue($si);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,4 +128,17 @@ class SocialIssueFilter implements FilterInterface
|
|||||||
array_intersect_key($array, $unique_ids)
|
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