Línea 124... |
Línea 124... |
124 |
|
124 |
|
Línea 125... |
Línea 125... |
125 |
$dt = \DateTime::createFromFormat('Y-m-d H:i:s', $record->added_on);
|
125 |
$dt = \DateTime::createFromFormat('Y-m-d H:i:s', $record->added_on);
|
126 |
|
126 |
|
127 |
array_push($comments, [
|
127 |
array_push($comments, [
|
128 |
'date' => $dt->format($serviceDatetimeFormat),
|
128 |
'date' => $dt->format($serviceDatetimeFormat),
|
129 |
'image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]),
|
129 |
'image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image], ['force_canonical' => true]),
|
130 |
'fullname' => trim(trim($user->first_name) . ' ' . trim($user->last_name)),
|
130 |
'fullname' => trim(trim($user->first_name) . ' ' . trim($user->last_name)),
|
131 |
'rating' => $record->rating,
|
131 |
'rating' => $record->rating,
|
132 |
'comment' => $record->comment,
|
132 |
'comment' => $record->comment,
|
133 |
'link_delete' => $record->user_id == $currentUser->id ? $this->url()->fromRoute('services/microlearning/capsules/comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $record->uuid]) : '',
|
133 |
'link_delete' => $record->user_id == $currentUser->id ? $this->url()->fromRoute('services/microlearning/capsules/comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $record->uuid], ['force_canonical' => true]) : '',
|
Línea 134... |
Línea 134... |
134 |
]);
|
134 |
]);
|
Línea 315... |
Línea 315... |
315 |
'message' =>'LABEL_CAPSULE_COMMENT_HAVE_BEEN_SUCCESSFULLY_ADDED',
|
315 |
'message' =>'LABEL_CAPSULE_COMMENT_HAVE_BEEN_SUCCESSFULLY_ADDED',
|
Línea 316... |
Línea 316... |
316 |
|
316 |
|
317 |
'comment' => [
|
317 |
'comment' => [
|
318 |
'comment' => $capsuleComment->comment,
|
318 |
'comment' => $capsuleComment->comment,
|
319 |
'rating' => $capsuleComment->rating,
|
319 |
'rating' => $capsuleComment->rating,
|
320 |
'link_delete' => $this->url()->fromRoute('services/microlearning/capsules/comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $capsuleComment->uuid])
|
320 |
'link_delete' => $this->url()->fromRoute('services/microlearning/capsules/comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $capsuleComment->uuid], ['force_canonical' => true])
|
321 |
],
|
321 |
],
|
322 |
'capsule' => [
|
322 |
'capsule' => [
|
323 |
'total_comments' => $dataCountrAndRatingAverage['total_comments'],
|
323 |
'total_comments' => $dataCountrAndRatingAverage['total_comments'],
|
324 |
'total_rating' => $dataCountrAndRatingAverage['total_rating']
|
324 |
'total_rating' => $dataCountrAndRatingAverage['total_rating']
|