diff options
author | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
---|---|---|
committer | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
commit | b8fa0246803dab40cf57d40b45984c53046f2d55 (patch) | |
tree | dc92b167c7542137c385614a1d558e57669a4339 /plugins/Group_assign/Template/task | |
parent | 2a43146236fd8fb16f84398d85720ad84aa0a0b1 (diff) |
Plugins directory and local modifications
Diffstat (limited to 'plugins/Group_assign/Template/task')
-rw-r--r-- | plugins/Group_assign/Template/task/changes.php | 92 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task/details.php | 10 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task/multi.php | 6 |
3 files changed, 108 insertions, 0 deletions
diff --git a/plugins/Group_assign/Template/task/changes.php b/plugins/Group_assign/Template/task/changes.php new file mode 100644 index 00000000..7a0d2720 --- /dev/null +++ b/plugins/Group_assign/Template/task/changes.php @@ -0,0 +1,92 @@ +<?php if (! empty($changes)): ?> + <ul> + <?php + + foreach ($changes as $field => $value) { + switch ($field) { + case 'title': + echo '<li>'.t('New title: %s', $task['title']).'</li>'; + break; + case 'owner_id': + if (empty($task['owner_id'])) { + echo '<li>'.t('The task is not assigned anymore').'</li>'; + } else { + echo '<li>'.t('New assignee: %s', $task['assignee_name'] ?: $task['assignee_username']).'</li>'; + } + break; + case 'category_id': + if (empty($task['category_id'])) { + echo '<li>'.t('There is no category now').'</li>'; + } else { + echo '<li>'.t('New category: %s', $task['category_name']).'</li>'; + } + break; + case 'color_id': + echo '<li>'.t('New color: %s', $this->text->in($task['color_id'], $this->task->getColors())).'</li>'; + break; + case 'score': + echo '<li>'.t('New complexity: %d', $task['score']).'</li>'; + break; + case 'date_due': + if (empty($task['date_due'])) { + echo '<li>'.t('The due date have been removed').'</li>'; + } else { + echo '<li>'.t('New due date: ').$this->dt->datetime($task['date_due']).'</li>'; + } + break; + case 'description': + if (empty($task['description'])) { + echo '<li>'.t('There is no description anymore').'</li>'; + } + break; + case 'recurrence_status': + case 'recurrence_trigger': + case 'recurrence_factor': + case 'recurrence_timeframe': + case 'recurrence_basedate': + case 'recurrence_parent': + case 'recurrence_child': + echo '<li>'.t('Recurrence settings have been modified').'</li>'; + break; + case 'time_spent': + echo '<li>'.t('Time spent changed: %sh', $task['time_spent']).'</li>'; + break; + case 'time_estimated': + echo '<li>'.t('Time estimated changed: %sh', $task['time_estimated']).'</li>'; + break; + case 'date_started': + if ($value != 0) { + echo '<li>'.t('Start date changed: ').$this->dt->datetime($task['date_started']).'</li>'; + } + break; + case 'owner_gp': + if (empty($task['owner_gp'])) { + echo '<li>'.t('The task is not assigned to a group anymore').'</li>'; + } else { + echo '<li>'.t('New group assigned: %s', $task['assigned_groupname']).'</li>'; + } + break; + case 'owner_ms': + if (empty($task['owner_ms'])) { + echo '<li>'.t('The task is not assigned to multiple users anymore').'</li>'; + } else { + echo '<li>'.t('The task has been assigned other users').'</li>'; + } + break; + default: + echo '<li>'.t('The field "%s" have been updated', $field).'</li>'; + } + } + + ?> + </ul> + + <?php if (! empty($changes['description'])): ?> + <p><strong><?= t('The description has been modified:') ?></strong></p> + <?php if (isset($public)): ?> + <div class="markdown"><?= $this->text->markdown($task['description'], true) ?></div> + <?php else: ?> + <div class="markdown"><?= $this->text->markdown($task['description']) ?></div> + <?php endif ?> + <?php endif ?> +<?php endif ?> diff --git a/plugins/Group_assign/Template/task/details.php b/plugins/Group_assign/Template/task/details.php new file mode 100644 index 00000000..907739bc --- /dev/null +++ b/plugins/Group_assign/Template/task/details.php @@ -0,0 +1,10 @@ + <li> + <strong><?= t('Assigned Group:') ?></strong> + <span> + <?php if ($task['assigned_groupname']): ?> + <span class="assigned-group" style="background-color: #<?= $this->task->groupColorExtension->getGroupColor($task['assigned_groupname']) ?>; color:<?= $this->task->groupColorExtension->getFontColor($this->task->groupColorExtension->getGroupColor($task['assigned_groupname'])) ?>;"><?= $this->text->e($task['assigned_groupname'] ?: $task['owner_gp']) ?></span> + <?php else: ?> + <?= t('not assigned') ?> + <?php endif ?> + </span> + </li> diff --git a/plugins/Group_assign/Template/task/multi.php b/plugins/Group_assign/Template/task/multi.php new file mode 100644 index 00000000..5c1fcfb0 --- /dev/null +++ b/plugins/Group_assign/Template/task/multi.php @@ -0,0 +1,6 @@ + <?php if ($task['owner_ms'] > 0 && count($this->task->multiselectMemberModel->getMembers($task['owner_ms'])) > 0) : ?> + <li> + <strong><?= t('Other Assignees:') ?></strong> + </li> + <?= $this->helper->smallAvatarHelperExtend->smallMultiple($task['owner_ms'], 'avatar-inline') ?> + <?php endif ?> |