Skip to content

Commit 36fe58a

Browse files
author
Simon Karlen
committed
fixed unknown comment author
fixed transforms and masks
1 parent 80f83f9 commit 36fe58a

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

src/views/task/item.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
<div class="d-flex justify-content-between">
5858
<h6 class="card-title">
5959
<?php if ($model->isRecurrentInstance()): ?>
60-
<?= FAS::i('infinity')->transform('shrink-4.5')->mask('circle'); ?>
60+
<?= FAS::i('infinity', [
61+
'fa-transform' => 'shrink-4.5',
62+
'fa-mask' => 'fas fa-circle'
63+
]); ?>
6164
<?php endif; ?>
6265
<?= Html::encode($model->subject); ?>
6366
</h6>

src/views/task/update.php

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -825,24 +825,35 @@
825825
<?php foreach ($model->comments as $comment): ?>
826826
<div class="kanban-task-comment media<?php if ($i++ !== 0): ?> mt-3<?php endif; ?>">
827827
<div class="kanban-user mr-3">
828-
<?php if ($comment->author->image): ?>
829-
<?= Html::img($comment->author->image, [
830-
'class' => ['rounded-circle'],
831-
'title' => Html::encode($comment->author->name),
832-
'data' => [
833-
'toggle' => 'tooltip'
834-
]
835-
]); ?>
828+
<?php if ($comment->author): ?>
829+
<?php if ($comment->author->image): ?>
830+
<?= Html::img($comment->author->image, [
831+
'class' => ['rounded-circle'],
832+
'title' => Html::encode($comment->author->name),
833+
'data' => [
834+
'toggle' => 'tooltip'
835+
]
836+
]); ?>
837+
<?php else: ?>
838+
<span class="kanban-visualisation" data-toggle="tooltip"
839+
title="<?= Html::encode($comment->author->name); ?>">
840+
<?= strtoupper(substr($comment->author->name, 0, 1)); ?>
841+
</span>
842+
<?php endif; ?>
836843
<?php else: ?>
837844
<span class="kanban-visualisation" data-toggle="tooltip"
838-
title="<?= Html::encode($comment->author->name); ?>">
839-
<?= strtoupper(substr($comment->author->name, 0, 1)); ?>
840-
</span>
845+
title="Unknown">
846+
U
847+
</span>
841848
<?php endif; ?>
842849
</div>
843850
<div class="media-body">
844851
<span class="text-muted d-flex flex-row justify-content-between">
845-
<span><?= Html::encode($comment->author->name); ?></span>
852+
<?php if ($comment->author): ?>
853+
<span><?= Html::encode($comment->author->name); ?></span>
854+
<?php else: ?>
855+
<span>Unknown</span>
856+
<?php endif; ?>
846857
<span>
847858
<?= Yii::$app->formatter->asDatetime($comment->created_at, 'medium'); ?>
848859
</span>

src/widgets/ToDo.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ function onHide() {
191191

192192
$subject = $task['subject'];
193193
if ($task->isRecurrentInstance()) {
194-
$subject = FAS::i('infinity')->transform('shrink-4.5')->mask('circle') . $subject;
194+
$subject = FAS::i('infinity', [
195+
'data' => [
196+
'fa-transform' => 'shrink-4.5',
197+
'fa-mask' => 'fas fa-circle'
198+
]
199+
]) . $subject;
195200
}
196201
$content = Html::tag('h6', $subject, ['class' => ['m-0']]);
197202
$small = $task['board']['name'];

0 commit comments

Comments
 (0)