mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix rendering of accompanying course commen with at_date
This commit is contained in:
parent
61877e0157
commit
ebb856fe85
@ -167,6 +167,11 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCreatedBy(): ?User
|
||||||
|
{
|
||||||
|
return $this->getCreator();
|
||||||
|
}
|
||||||
|
|
||||||
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
|
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
|
||||||
{
|
{
|
||||||
$this->updatedAt = $updatedAt;
|
$this->updatedAt = $updatedAt;
|
||||||
|
@ -7,10 +7,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<a id="comment-{{ comment.id }}" href="{{ '#comment-' ~ comment.id }}" class="fa fa-pencil-square-o fa-fw"></a>
|
<a id="comment-{{ comment.id }}" href="{{ '#comment-' ~ comment.id }}" class="fa fa-pencil-square-o fa-fw"></a>
|
||||||
|
|
||||||
{% set creator = comment.creator is defined ? comment.creator : comment.createdBy %}
|
{{ 'by'|trans }}
|
||||||
{{ 'by'|trans }}<b>{{ creator }}</b>
|
<span class="badge-user">{{ comment.createdBy|chill_entity_render_box({'at_date': comment.createdAt }) }}</span>{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}<br>
|
||||||
|
|
||||||
{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}<br>
|
|
||||||
<i>{{ 'Last updated on'|trans ~ ' ' ~ comment.updatedAt|format_datetime('long', 'short') }}</i>
|
<i>{{ 'Last updated on'|trans ~ ' ' ~ comment.updatedAt|format_datetime('long', 'short') }}</i>
|
||||||
</div>
|
</div>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user