2026-07-05 10:20:45 -03:00
|
|
|
<?php /*
|
|
|
|
|
* Rendered by the template:board:task:icons hook, inside the card icons row. When a card
|
|
|
|
|
* has no comments yet, Kanboard shows no comment icon at all -- so adding the first comment
|
|
|
|
|
* means opening the card and finding the sidebar link. This adds a comment bubble with a
|
|
|
|
|
* "+" that opens the same comment modal (CommentListController::show) the native count icon
|
|
|
|
|
* uses, so the first comment can be added straight from the board. Cards that already have
|
|
|
|
|
* comments render nothing here (the native count icon already shows).
|
|
|
|
|
*
|
|
|
|
|
* Only shown to users who may create a comment (CommentController::save is PROJECT_MEMBER),
|
|
|
|
|
* so it does not appear for read-only viewers.
|
|
|
|
|
*/ ?>
|
|
|
|
|
<?php if (empty($task['nb_comments']) && $this->user->hasProjectAccess('CommentController', 'save', $task['project_id'])): ?>
|
2026-07-06 07:28:06 -03:00
|
|
|
<?php /* The hook renders at the END of the icons row; relocate.js moves this span up to
|
|
|
|
|
the native comment slot (before the description icon) so the order matches. */ ?>
|
|
|
|
|
<span class="organontweaks-comment-add">
|
|
|
|
|
<?= $this->modal->medium('comments-o', '+', 'CommentListController', 'show', array('task_id' => $task['id']), t('Add a comment')) ?>
|
|
|
|
|
</span>
|
2026-07-05 10:20:45 -03:00
|
|
|
<?php endif ?>
|