f2 comment icon always on, v0.3
This commit is contained in:
14
Template/board/task_comment_icon.php
Normal file
14
Template/board/task_comment_icon.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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'])): ?>
|
||||
<?= $this->modal->medium('comments-o', '+', 'CommentListController', 'show', array('task_id' => $task['id']), t('Add a comment')) ?>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user