mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
FEATURE [banner][render] display the A icon within accourse banner if user is absent instead of string
This commit is contained in:
parent
4dd81da1ef
commit
d46304e229
@ -87,6 +87,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
|||||||
'user_job' => $this->normalizer->normalize($object->getUserJob(), $format, $userJobContext),
|
'user_job' => $this->normalizer->normalize($object->getUserJob(), $format, $userJobContext),
|
||||||
'main_center' => $this->normalizer->normalize($object->getMainCenter(), $format, $centerContext),
|
'main_center' => $this->normalizer->normalize($object->getMainCenter(), $format, $centerContext),
|
||||||
'main_scope' => $this->normalizer->normalize($object->getMainScope(), $format, $scopeContext),
|
'main_scope' => $this->normalizer->normalize($object->getMainScope(), $format, $scopeContext),
|
||||||
|
'isAbsent' => $object->isAbsent()
|
||||||
];
|
];
|
||||||
|
|
||||||
if ('docgen' === $format) {
|
if ('docgen' === $format) {
|
||||||
|
@ -71,10 +71,6 @@ class UserRender implements ChillEntityRenderInterface
|
|||||||
|
|
||||||
$current_date = new DateTimeImmutable();
|
$current_date = new DateTimeImmutable();
|
||||||
|
|
||||||
if ($entity->isAbsent() && $opts['main_scope']) {
|
|
||||||
$str .= ' (' . $this->translator->trans('absence.Absent') . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
|
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
|
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
|
||||||
<span class="item-key">{{ $t('course.referrer') }}:</span> <b>{{ accompanyingCourse.user.text }}</b>
|
<span class="item-key">{{ $t('course.referrer') }}:</span>
|
||||||
|
<b>{{ accompanyingCourse.user.text }}</b>
|
||||||
|
<span v-if="accompanyingCourse.user.isAbsent" class="fa-stack fa-holder" title="{{ 'absence.Absent'|trans }}">
|
||||||
|
<i class="fa fa-circle fa-stack-1x text-danger"></i>
|
||||||
|
<i class="fa fa-stack-1x text-white">A</i>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user