Added internal task links to activity stream
This commit is contained in:
@@ -60,8 +60,10 @@ class TaskAssignCategoryLink extends Base
|
||||
public function getEventRequiredParameters()
|
||||
{
|
||||
return array(
|
||||
'task_id',
|
||||
'link_id',
|
||||
'task_link' => array(
|
||||
'task_id',
|
||||
'link_id',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -75,7 +77,7 @@ class TaskAssignCategoryLink extends Base
|
||||
public function doAction(array $data)
|
||||
{
|
||||
$values = array(
|
||||
'id' => $data['task_id'],
|
||||
'id' => $data['task_link']['task_id'],
|
||||
'category_id' => $this->getParam('category_id'),
|
||||
);
|
||||
|
||||
@@ -91,9 +93,8 @@ class TaskAssignCategoryLink extends Base
|
||||
*/
|
||||
public function hasRequiredCondition(array $data)
|
||||
{
|
||||
if ($data['link_id'] == $this->getParam('link_id')) {
|
||||
$task = $this->taskFinderModel->getById($data['task_id']);
|
||||
return empty($task['category_id']);
|
||||
if ($data['task_link']['link_id'] == $this->getParam('link_id')) {
|
||||
return empty($data['task']['category_id']);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -59,8 +59,10 @@ class TaskAssignColorLink extends Base
|
||||
public function getEventRequiredParameters()
|
||||
{
|
||||
return array(
|
||||
'task_id',
|
||||
'link_id',
|
||||
'task_link' => array(
|
||||
'task_id',
|
||||
'link_id',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,7 +76,7 @@ class TaskAssignColorLink extends Base
|
||||
public function doAction(array $data)
|
||||
{
|
||||
$values = array(
|
||||
'id' => $data['task_id'],
|
||||
'id' => $data['task_link']['task_id'],
|
||||
'color_id' => $this->getParam('color_id'),
|
||||
);
|
||||
|
||||
@@ -90,6 +92,6 @@ class TaskAssignColorLink extends Base
|
||||
*/
|
||||
public function hasRequiredCondition(array $data)
|
||||
{
|
||||
return $data['link_id'] == $this->getParam('link_id');
|
||||
return $data['task_link']['link_id'] == $this->getParam('link_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,7 @@ use Pimple\Container;
|
||||
* @property \Kanboard\Job\SubtaskEventJob $subtaskEventJob
|
||||
* @property \Kanboard\Job\TaskEventJob $taskEventJob
|
||||
* @property \Kanboard\Job\TaskFileEventJob $taskFileEventJob
|
||||
* @property \Kanboard\Job\TaskLinkEventJob $taskLinkEventJob
|
||||
* @property \Kanboard\Job\ProjectFileEventJob $projectFileEventJob
|
||||
* @property \Kanboard\Job\NotificationJob $notificationJob
|
||||
* @property \Psr\Log\LoggerInterface $logger
|
||||
|
||||
89
app/EventBuilder/TaskLinkEventBuilder.php
Normal file
89
app/EventBuilder/TaskLinkEventBuilder.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\EventBuilder;
|
||||
|
||||
use Kanboard\Event\TaskLinkEvent;
|
||||
use Kanboard\Model\TaskLinkModel;
|
||||
|
||||
/**
|
||||
* Class TaskLinkEventBuilder
|
||||
*
|
||||
* @package Kanboard\EventBuilder
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class TaskLinkEventBuilder extends BaseEventBuilder
|
||||
{
|
||||
protected $taskLinkId = 0;
|
||||
|
||||
/**
|
||||
* Set taskLinkId
|
||||
*
|
||||
* @param int $taskLinkId
|
||||
* @return $this
|
||||
*/
|
||||
public function withTaskLinkId($taskLinkId)
|
||||
{
|
||||
$this->taskLinkId = $taskLinkId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build event data
|
||||
*
|
||||
* @access public
|
||||
* @return TaskLinkEvent|null
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$taskLink = $this->taskLinkModel->getById($this->taskLinkId);
|
||||
|
||||
if (empty($taskLink)) {
|
||||
$this->logger->debug(__METHOD__.': TaskLink not found');
|
||||
return null;
|
||||
}
|
||||
|
||||
return new TaskLinkEvent(array(
|
||||
'task_link' => $taskLink,
|
||||
'task' => $this->taskFinderModel->getDetails($taskLink['task_id']),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event title with author
|
||||
*
|
||||
* @access public
|
||||
* @param string $author
|
||||
* @param string $eventName
|
||||
* @param array $eventData
|
||||
* @return string
|
||||
*/
|
||||
public function buildTitleWithAuthor($author, $eventName, array $eventData)
|
||||
{
|
||||
if ($eventName === TaskLinkModel::EVENT_CREATE_UPDATE) {
|
||||
return e('%s set a new internal link for the task #%d', $author, $eventData['task']['id']);
|
||||
} elseif ($eventName === TaskLinkModel::EVENT_DELETE) {
|
||||
return e('%s removed an internal link for the task #%d', $author, $eventData['task']['id']);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event title without author
|
||||
*
|
||||
* @access public
|
||||
* @param string $eventName
|
||||
* @param array $eventData
|
||||
* @return string
|
||||
*/
|
||||
public function buildTitleWithoutAuthor($eventName, array $eventData)
|
||||
{
|
||||
if ($eventName === TaskLinkModel::EVENT_CREATE_UPDATE) {
|
||||
return e('A new internal link for the task #%d have been defined', $eventData['task']['id']);
|
||||
} elseif ($eventName === TaskLinkModel::EVENT_DELETE) {
|
||||
return e('Internal link removed for the task #%d', $eventData['task']['id']);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class HookHelper extends Base
|
||||
* @access public
|
||||
* @param string $hook
|
||||
* @param string $template
|
||||
* @return \Kanboard\Helper\Hook
|
||||
* @return $this
|
||||
*/
|
||||
public function attach($hook, $template)
|
||||
{
|
||||
|
||||
45
app/Job/TaskLinkEventJob.php
Normal file
45
app/Job/TaskLinkEventJob.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Job;
|
||||
|
||||
use Kanboard\EventBuilder\TaskLinkEventBuilder;
|
||||
|
||||
/**
|
||||
* Class TaskLinkEventJob
|
||||
*
|
||||
* @package Kanboard\Job
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class TaskLinkEventJob extends BaseJob
|
||||
{
|
||||
/**
|
||||
* Set job params
|
||||
*
|
||||
* @param int $taskLinkId
|
||||
* @param string $eventName
|
||||
* @return $this
|
||||
*/
|
||||
public function withParams($taskLinkId, $eventName)
|
||||
{
|
||||
$this->jobParams = array($taskLinkId, $eventName);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute job
|
||||
*
|
||||
* @param int $taskLinkId
|
||||
* @param string $eventName
|
||||
* @return $this
|
||||
*/
|
||||
public function execute($taskLinkId, $eventName)
|
||||
{
|
||||
$event = TaskLinkEventBuilder::getInstance($this->container)
|
||||
->withTaskLinkId($taskLinkId)
|
||||
->build();
|
||||
|
||||
if ($event !== null) {
|
||||
$this->dispatcher->dispatch($eventName, $event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Kanboard\Model;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\EventBuilder\TaskLinkEventBuilder;
|
||||
|
||||
/**
|
||||
* Notification
|
||||
@@ -85,7 +86,9 @@ class NotificationModel extends Base
|
||||
case CommentModel::EVENT_USER_MENTION:
|
||||
return e('%s mentioned you in a comment on the task #%d', $event_author, $event_data['task']['id']);
|
||||
default:
|
||||
return e('Notification');
|
||||
return TaskLinkEventBuilder::getInstance($this->container)
|
||||
->buildTitleWithAuthor($event_author, $event_name, $event_data) ?:
|
||||
e('Notification');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +141,9 @@ class NotificationModel extends Base
|
||||
case CommentModel::EVENT_USER_MENTION:
|
||||
return e('You were mentioned in a comment on the task #%d', $event_data['task']['id']);
|
||||
default:
|
||||
return e('Notification');
|
||||
return TaskLinkEventBuilder::getInstance($this->container)
|
||||
->buildTitleWithoutAuthor($event_name, $event_data) ?:
|
||||
e('Notification');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,32 +157,10 @@ class NotificationModel extends Base
|
||||
*/
|
||||
public function getTaskIdFromEvent($event_name, array $event_data)
|
||||
{
|
||||
switch ($event_name) {
|
||||
case TaskFileModel::EVENT_CREATE:
|
||||
return $event_data['file']['task_id'];
|
||||
case CommentModel::EVENT_CREATE:
|
||||
case CommentModel::EVENT_UPDATE:
|
||||
case CommentModel::EVENT_DELETE:
|
||||
return $event_data['comment']['task_id'];
|
||||
case SubtaskModel::EVENT_CREATE:
|
||||
case SubtaskModel::EVENT_UPDATE:
|
||||
case SubtaskModel::EVENT_DELETE:
|
||||
return $event_data['subtask']['task_id'];
|
||||
case TaskModel::EVENT_CREATE:
|
||||
case TaskModel::EVENT_UPDATE:
|
||||
case TaskModel::EVENT_CLOSE:
|
||||
case TaskModel::EVENT_OPEN:
|
||||
case TaskModel::EVENT_MOVE_COLUMN:
|
||||
case TaskModel::EVENT_MOVE_POSITION:
|
||||
case TaskModel::EVENT_MOVE_SWIMLANE:
|
||||
case TaskModel::EVENT_ASSIGNEE_CHANGE:
|
||||
case CommentModel::EVENT_USER_MENTION:
|
||||
case TaskModel::EVENT_USER_MENTION:
|
||||
return $event_data['task']['id'];
|
||||
case TaskModel::EVENT_OVERDUE:
|
||||
return $event_data['tasks'][0]['id'];
|
||||
default:
|
||||
return 0;
|
||||
if ($event_name === TaskModel::EVENT_OVERDUE) {
|
||||
return $event_data['tasks'][0]['id'];
|
||||
}
|
||||
|
||||
return isset($event_data['task']['id']) ? $event_data['task']['id'] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Kanboard\Model;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Event\TaskLinkEvent;
|
||||
|
||||
/**
|
||||
* TaskLink model
|
||||
@@ -26,7 +25,8 @@ class TaskLinkModel extends Base
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_CREATE_UPDATE = 'tasklink.create_update';
|
||||
const EVENT_CREATE_UPDATE = 'task_internal_link.create_update';
|
||||
const EVENT_DELETE = 'task_internal_link.delete';
|
||||
|
||||
/**
|
||||
* Get projectId from $task_link_id
|
||||
@@ -53,7 +53,19 @@ class TaskLinkModel extends Base
|
||||
*/
|
||||
public function getById($task_link_id)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->eq('id', $task_link_id)->findOne();
|
||||
return $this->db
|
||||
->table(self::TABLE)
|
||||
->columns(
|
||||
self::TABLE.'.id',
|
||||
self::TABLE.'.opposite_task_id',
|
||||
self::TABLE.'.task_id',
|
||||
self::TABLE.'.link_id',
|
||||
LinkModel::TABLE.'.label',
|
||||
LinkModel::TABLE.'.opposite_id AS opposite_link_id'
|
||||
)
|
||||
->eq(self::TABLE.'.id', $task_link_id)
|
||||
->join(LinkModel::TABLE, 'id', 'link_id')
|
||||
->findOne();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,20 +151,6 @@ class TaskLinkModel extends Base
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish events
|
||||
*
|
||||
* @access private
|
||||
* @param array $events
|
||||
*/
|
||||
private function fireEvents(array $events)
|
||||
{
|
||||
foreach ($events as $event) {
|
||||
$event['project_id'] = $this->taskFinderModel->getProjectId($event['task_id']);
|
||||
$this->container['dispatcher']->dispatch(self::EVENT_CREATE_UPDATE, new TaskLinkEvent($event));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new link
|
||||
*
|
||||
@@ -160,42 +158,25 @@ class TaskLinkModel extends Base
|
||||
* @param integer $task_id Task id
|
||||
* @param integer $opposite_task_id Opposite task id
|
||||
* @param integer $link_id Link id
|
||||
* @return integer Task link id
|
||||
* @return integer|boolean
|
||||
*/
|
||||
public function create($task_id, $opposite_task_id, $link_id)
|
||||
{
|
||||
$events = array();
|
||||
$this->db->startTransaction();
|
||||
|
||||
// Get opposite link
|
||||
$opposite_link_id = $this->linkModel->getOppositeLinkId($link_id);
|
||||
$task_link_id1 = $this->createTaskLink($task_id, $opposite_task_id, $link_id);
|
||||
$task_link_id2 = $this->createTaskLink($opposite_task_id, $task_id, $opposite_link_id);
|
||||
|
||||
$values = array(
|
||||
'task_id' => $task_id,
|
||||
'opposite_task_id' => $opposite_task_id,
|
||||
'link_id' => $link_id,
|
||||
);
|
||||
|
||||
// Create the original task link
|
||||
$this->db->table(self::TABLE)->insert($values);
|
||||
$task_link_id = $this->db->getLastId();
|
||||
$events[] = $values;
|
||||
|
||||
// Create the opposite task link
|
||||
$values = array(
|
||||
'task_id' => $opposite_task_id,
|
||||
'opposite_task_id' => $task_id,
|
||||
'link_id' => $opposite_link_id,
|
||||
);
|
||||
|
||||
$this->db->table(self::TABLE)->insert($values);
|
||||
$events[] = $values;
|
||||
if ($task_link_id1 === false || $task_link_id2 === false) {
|
||||
$this->db->cancelTransaction();
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db->closeTransaction();
|
||||
$this->fireEvents(array($task_link_id1, $task_link_id2), self::EVENT_CREATE_UPDATE);
|
||||
|
||||
$this->fireEvents($events);
|
||||
|
||||
return (int) $task_link_id;
|
||||
return $task_link_id1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,46 +191,24 @@ class TaskLinkModel extends Base
|
||||
*/
|
||||
public function update($task_link_id, $task_id, $opposite_task_id, $link_id)
|
||||
{
|
||||
$events = array();
|
||||
$this->db->startTransaction();
|
||||
|
||||
// Get original task link
|
||||
$task_link = $this->getById($task_link_id);
|
||||
|
||||
// Find opposite task link
|
||||
$opposite_task_link = $this->getOppositeTaskLink($task_link);
|
||||
|
||||
// Get opposite link
|
||||
$opposite_link_id = $this->linkModel->getOppositeLinkId($link_id);
|
||||
|
||||
// Update the original task link
|
||||
$values = array(
|
||||
'task_id' => $task_id,
|
||||
'opposite_task_id' => $opposite_task_id,
|
||||
'link_id' => $link_id,
|
||||
);
|
||||
$result1 = $this->updateTaskLink($task_link_id, $task_id, $opposite_task_id, $link_id);
|
||||
$result2 = $this->updateTaskLink($opposite_task_link['id'], $opposite_task_id, $task_id, $opposite_link_id);
|
||||
|
||||
$rs1 = $this->db->table(self::TABLE)->eq('id', $task_link_id)->update($values);
|
||||
$events[] = $values;
|
||||
|
||||
// Update the opposite link
|
||||
$values = array(
|
||||
'task_id' => $opposite_task_id,
|
||||
'opposite_task_id' => $task_id,
|
||||
'link_id' => $opposite_link_id,
|
||||
);
|
||||
|
||||
$rs2 = $this->db->table(self::TABLE)->eq('id', $opposite_task_link['id'])->update($values);
|
||||
$events[] = $values;
|
||||
|
||||
$this->db->closeTransaction();
|
||||
|
||||
if ($rs1 && $rs2) {
|
||||
$this->fireEvents($events);
|
||||
return true;
|
||||
if ($result1 === false || $result2 === false) {
|
||||
$this->db->cancelTransaction();
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
$this->db->closeTransaction();
|
||||
$this->fireEvents(array($task_link_id, $opposite_task_link['id']), self::EVENT_CREATE_UPDATE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -261,21 +220,83 @@ class TaskLinkModel extends Base
|
||||
*/
|
||||
public function remove($task_link_id)
|
||||
{
|
||||
$this->taskLinkEventJob->execute($task_link_id, self::EVENT_DELETE);
|
||||
|
||||
$this->db->startTransaction();
|
||||
|
||||
$link = $this->getById($task_link_id);
|
||||
$link_id = $this->linkModel->getOppositeLinkId($link['link_id']);
|
||||
|
||||
$this->db->table(self::TABLE)->eq('id', $task_link_id)->remove();
|
||||
$result1 = $this->db
|
||||
->table(self::TABLE)
|
||||
->eq('id', $task_link_id)
|
||||
->remove();
|
||||
|
||||
$this->db
|
||||
$result2 = $this->db
|
||||
->table(self::TABLE)
|
||||
->eq('opposite_task_id', $link['task_id'])
|
||||
->eq('task_id', $link['opposite_task_id'])
|
||||
->eq('link_id', $link_id)->remove();
|
||||
->eq('link_id', $link_id)
|
||||
->remove();
|
||||
|
||||
if ($result1 === false || $result2 === false) {
|
||||
$this->db->cancelTransaction();
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db->closeTransaction();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish events
|
||||
*
|
||||
* @access protected
|
||||
* @param integer[] $task_link_ids
|
||||
* @param string $eventName
|
||||
*/
|
||||
protected function fireEvents(array $task_link_ids, $eventName)
|
||||
{
|
||||
foreach ($task_link_ids as $task_link_id) {
|
||||
$this->queueManager->push($this->taskLinkEventJob->withParams($task_link_id, $eventName));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create task link
|
||||
*
|
||||
* @access protected
|
||||
* @param integer $task_id
|
||||
* @param integer $opposite_task_id
|
||||
* @param integer $link_id
|
||||
* @return integer|boolean
|
||||
*/
|
||||
protected function createTaskLink($task_id, $opposite_task_id, $link_id)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->persist(array(
|
||||
'task_id' => $task_id,
|
||||
'opposite_task_id' => $opposite_task_id,
|
||||
'link_id' => $link_id,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update task link
|
||||
*
|
||||
* @access protected
|
||||
* @param integer $task_link_id
|
||||
* @param integer $task_id
|
||||
* @param integer $opposite_task_id
|
||||
* @param integer $link_id
|
||||
* @return boolean
|
||||
*/
|
||||
protected function updateTaskLink($task_link_id, $task_id, $opposite_task_id, $link_id)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->eq('id', $task_link_id)->update(array(
|
||||
'task_id' => $task_id,
|
||||
'opposite_task_id' => $opposite_task_id,
|
||||
'link_id' => $link_id,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use Kanboard\Job\ProjectFileEventJob;
|
||||
use Kanboard\Job\SubtaskEventJob;
|
||||
use Kanboard\Job\TaskEventJob;
|
||||
use Kanboard\Job\TaskFileEventJob;
|
||||
use Kanboard\Job\TaskLinkEventJob;
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
|
||||
@@ -44,6 +45,10 @@ class JobProvider implements ServiceProviderInterface
|
||||
return new TaskFileEventJob($c);
|
||||
});
|
||||
|
||||
$container['taskLinkEventJob'] = $container->factory(function ($c) {
|
||||
return new TaskLinkEventJob($c);
|
||||
});
|
||||
|
||||
$container['projectFileEventJob'] = $container->factory(function ($c) {
|
||||
return new ProjectFileEventJob($c);
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Kanboard\Subscriber;
|
||||
|
||||
use Kanboard\Event\GenericEvent;
|
||||
use Kanboard\Model\TaskLinkModel;
|
||||
use Kanboard\Model\TaskModel;
|
||||
use Kanboard\Model\CommentModel;
|
||||
use Kanboard\Model\SubtaskModel;
|
||||
@@ -31,6 +32,8 @@ class NotificationSubscriber extends BaseSubscriber implements EventSubscriberIn
|
||||
CommentModel::EVENT_DELETE => 'handleEvent',
|
||||
CommentModel::EVENT_USER_MENTION => 'handleEvent',
|
||||
TaskFileModel::EVENT_CREATE => 'handleEvent',
|
||||
TaskLinkModel::EVENT_CREATE_UPDATE => 'handleEvent',
|
||||
TaskLinkModel::EVENT_DELETE => 'handleEvent',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
16
app/Template/event/task_internal_link_create_update.php
Normal file
16
app/Template/event/task_internal_link_create_update.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s set a new internal link for the task %s',
|
||||
$this->text->e($author),
|
||||
$this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
<span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<p class="activity-task-title">
|
||||
<?= e(
|
||||
'This task is now linked to the task %s with the relation "%s"',
|
||||
$this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])),
|
||||
$this->text->e($task_link['label'])
|
||||
) ?>
|
||||
</p>
|
||||
</div>
|
||||
16
app/Template/event/task_internal_link_delete.php
Normal file
16
app/Template/event/task_internal_link_delete.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s removed an internal link for the task %s',
|
||||
$this->text->e($author),
|
||||
$this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
<span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<p class="activity-task-title">
|
||||
<?= e(
|
||||
'The link with the relation "%s" to the task %s have been removed',
|
||||
$this->text->e($task_link['label']),
|
||||
$this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id']))
|
||||
) ?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
<p><?= t('New attachment added "%s"', $file['name']) ?></p>
|
||||
|
||||
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
|
||||
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
|
||||
|
||||
<p>
|
||||
<?= e(
|
||||
'This task is now linked to the task %s with the relation "%s"',
|
||||
$this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])),
|
||||
$this->text->e($task_link['label'])
|
||||
) ?>
|
||||
</p>
|
||||
|
||||
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
|
||||
11
app/Template/notification/task_internal_link_delete.php
Normal file
11
app/Template/notification/task_internal_link_delete.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
|
||||
|
||||
<p>
|
||||
<?= e(
|
||||
'The link with the relation "%s" to the task %s have been removed',
|
||||
$this->text->e($task_link['label']),
|
||||
$this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id']))
|
||||
) ?>
|
||||
</p>
|
||||
|
||||
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
|
||||
Reference in New Issue
Block a user