-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,12 @@ public function initialize() | |
if (!file_exists('plugins/AutoSubtasks')) { | ||
$this->template->setTemplateOverride('action_creation/params', 'kanboardEmailHistory:action_creation/params'); | ||
} | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
aljawaid
Author
Owner
|
||
//Task Comments | ||
$this->template->setTemplateOverride('notification/task_create', 'kanboardEmailHistory:notification/task_create'); | ||
$this->template->setTemplateOverride('task_comments/show', 'kanboardEmailHistory:task_comments/show'); | ||
$this->template->setTemplateOverride('comment/show', 'kanboardEmailHistory:comment/show'); | ||
$this->template->setTemplateOverride('notification/footer', 'kanboardEmailHistory:notification/footer'); | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>"> | ||
|
||
<div class="comment-title"> | ||
<?php if (! empty($comment['username'])): ?> | ||
<strong class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></strong> | ||
<?php endif ?> | ||
|
||
<small class="comment-date"><?= t('Created at:') ?> | ||
<kbd class="comment-created"><?= $this->dt->datetime($comment['date_creation']) ?><abbr title="Local Time">LT</abbr></kbd> | ||
</small> | ||
<small class="comment-date updated-comment"><?= t('Updated at:') ?> | ||
<kbd class="comment-updated"><?= $this->dt->datetime($comment['date_modification']) ?><abbr title="Local Time">LT</abbr></kbd> | ||
</small> | ||
<small class="comment-date comment-id"><i class="fa fa-comment-o fa-fw"></i> <?= t('ID: ') ?> <kbd class="comment-created"><?= $this->text->e($comment['id']) ?></kbd></small> | ||
</div> | ||
|
||
<div class="comment-content"> | ||
<div class="markdown"> | ||
<?= $this->text->markdown($comment['comment'], isset($is_public) && $is_public) ?> | ||
</div> | ||
</div> | ||
</div> | ||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<hr/> | ||
My PP Workspace | ||
|
||
<?php if ($this->app->config('application_url') != ''): ?> | ||
<?php if (isset($task['id'])): ?> | ||
- <?= $this->url->absoluteLink(t('view the task on Kanboard'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> | ||
<?php endif ?> | ||
- <?= $this->url->absoluteLink(t('view the board on Kanboard'), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?> | ||
<?php endif ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<html> | ||
<body> | ||
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> | ||
|
||
<h3><?= t('Summary') ?></h3> | ||
<ul class=""> | ||
<li class=""> | ||
Task Status: <?php if ($task['is_active'] == 1): ?> | ||
<strong style="text-transform: uppercase; color: green;"><?= t('open') ?></strong> | ||
<?php else: ?> | ||
<strong style="text-transform: uppercase; color: red;"><?= t('closed') ?></strong> | ||
<?php endif ?> | ||
</li> | ||
<li class=""> | ||
Task N°: <strong>#<?= $this->text->e($task['id']) ?></strong> | ||
</li> | ||
<li class=""> | ||
<?= t('Project:') ?> <strong><?= $this->text->e($task['project_name']) ?></strong> | ||
</li> | ||
<?php if (! empty($task['priority'])): ?> | ||
<li class=""> | ||
<hr style="list-style-type: none;"> | ||
<?= t('Priority:') ?> <strong><?= $this->text->e($task['priority']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<?php if (! empty($task['reference'])): ?> | ||
<li class=""> | ||
<?= t('Reference:') ?> <strong><?= $this->task->renderReference($task) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<?php if (! empty($task['score'])): ?> | ||
<li class=""> | ||
<?= t('Complexity:') ?> <strong><?= $this->text->e($task['score']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<li class=""> | ||
<hr style="list-style-type: none;"> | ||
<?= t('Created:').' '.$this->dt->datetime($task['date_creation']) ?> | ||
</li> | ||
<?php if ($task['date_started']): ?> | ||
<li class=""> | ||
<?= t('Started:') ?> <strong><?= $this->dt->datetime($task['date_started']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<li class=""> | ||
<?= t('Modified:').' '.$this->dt->datetime($task['date_modification']) ?> | ||
</li> | ||
<?php if ($task['date_due']): ?> | ||
<li class=""> | ||
<strong><?= t('Due date:').' '.$this->dt->datetime($task['date_due']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<?php if ($task['date_completed']): ?> | ||
<li class=""> | ||
<?= t('Completed:') ?> <strong><?= $this->dt->datetime($task['date_completed']) ?></strong> | ||
<hr style="list-style-type: none;"> | ||
</li> | ||
<?php endif ?> | ||
<?php if (! empty($task['creator_username'])): ?> | ||
<li class=""> | ||
<?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?> | ||
</li> | ||
<?php endif ?> | ||
<li class=""> | ||
<strong> | ||
<?php if (! empty($task['assignee_username'])): ?> | ||
<?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?> | ||
<?php else: ?> | ||
<?= t('There is nobody assigned') ?> | ||
<?php endif ?> | ||
</strong> | ||
</li> | ||
<li class=""> | ||
<hr style="list-style-type: none;"> | ||
<?= t('Column on the board:') ?> <strong><?= $this->text->e($task['column_title']) ?></strong> | ||
</li> | ||
<?php if (! empty($task['swimlane_name'])): ?> | ||
<li class=""> | ||
<?= t('Swimlane:') ?> <strong><?= $this->text->e($task['swimlane_name']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<?php if (! empty($task['category_name'])): ?> | ||
<li class=""> | ||
<?= t('Category:') ?> <strong><?= $this->text->e($task['category_name']) ?></strong> | ||
</li> | ||
<?php endif ?> | ||
<li class=""> | ||
<?= t('Task position:').' '.$this->text->e($task['position']) ?> | ||
</li> | ||
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?> | ||
<li class=""> | ||
<hr style="list-style-type: none;"> | ||
<?= t('Recurrence:') ?> <i><?= t('Recurrent task is scheduled to be generated') ?></i> | ||
</li> | ||
<?php endif ?> | ||
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> | ||
<li class=""> | ||
<hr style="list-style-type: none;"> | ||
<?= t('Recurrence:') ?> <?= t('Recurrent task has been generated') ?> | ||
</li> | ||
<?php if ($task['recurrence_parent'] || $task['recurrence_child']): ?> | ||
<?php if ($task['recurrence_parent']): ?> | ||
<li> | ||
<?= t('This task has been created by: ') ?> | ||
<?= $this->url->link('#'.$task['recurrence_parent'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?> | ||
</li> | ||
<?php endif ?> | ||
<?php if ($task['recurrence_child']): ?> | ||
<li> | ||
<?= t('This task has created this child task: ') ?> | ||
<?= $this->url->link('#'.$task['recurrence_child'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?> | ||
</li> | ||
<?php endif ?> | ||
<?php endif ?> | ||
<?php endif ?> | ||
</ul> | ||
<hr> | ||
<?php if (! empty($task['description'])): ?> | ||
<h3><?= t('Description') ?></h3> | ||
<?= $this->text->markdown($task['description'], true) ?> | ||
<?php endif ?> | ||
|
||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<details class="accordion-section" <?= empty($comments) ? '' : 'open' ?>> | ||
<summary class="accordion-title acc-comments-title"> | ||
<h3><?= t('Comments') ?></h3> | ||
<?php if (! empty($comments)): ?> | ||
<span class="">(<?= count($comments) ?>)</span> | ||
<?php endif ?> | ||
</summary> | ||
<div class="accordion-content comments" id="comments"> | ||
<?php if (empty($comments)): ?> | ||
<hr> | ||
<div class="no-data"><i><?= t('No comments') ?></i></div> | ||
<?php endif ?> | ||
|
||
<hr> | ||
<?php foreach ($comments as $comment): ?> | ||
<?= $this->render('comment/show', array( | ||
'comment' => $comment, | ||
'task' => $task, | ||
'project' => $project, | ||
'editable' => false, | ||
'is_public' => isset($is_public) && $is_public, | ||
)) ?> | ||
<?php endforeach ?> | ||
|
||
</div> | ||
</details> |
This is alot of overrides. If you are overriding just for the sake of the email that will be sent, it may be best just to use these templates, instead of overriding their main functions.