Open comments in board view with a modal dialog instead of tooltip
This commit is contained in:
23
app/Helper/CommentHelper.php
Normal file
23
app/Helper/CommentHelper.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Helper;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Model\UserMetadataModel;
|
||||
|
||||
/**
|
||||
* Class CommentHelper
|
||||
*
|
||||
* @package Kanboard\Helper
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class CommentHelper extends Base
|
||||
{
|
||||
public function toggleSorting()
|
||||
{
|
||||
$oldDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC');
|
||||
$newDirection = $oldDirection === 'ASC' ? 'DESC' : 'ASC';
|
||||
|
||||
$this->userMetadataCacheDecorator->set(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, $newDirection);
|
||||
}
|
||||
}
|
||||
@@ -47,10 +47,10 @@ class ModalHelper extends Base
|
||||
return $this->helper->url->link($html, $controller, $action, $params, false, 'js-modal-large');
|
||||
}
|
||||
|
||||
public function medium($icon, $label, $controller, $action, array $params = array())
|
||||
public function medium($icon, $label, $controller, $action, array $params = array(), $title = '')
|
||||
{
|
||||
$html = '<i class="fa fa-'.$icon.' fa-fw js-modal-medium" aria-hidden="true"></i>'.$label;
|
||||
return $this->helper->url->link($html, $controller, $action, $params, false, 'js-modal-medium');
|
||||
return $this->helper->url->link($html, $controller, $action, $params, false, 'js-modal-medium', $title);
|
||||
}
|
||||
|
||||
public function small($icon, $label, $controller, $action, array $params = array())
|
||||
|
||||
Reference in New Issue
Block a user