Move event and notification templates to a subfolder

This commit is contained in:
Frédéric Guillot
2014-11-26 20:43:08 -05:00
parent b13dba46e7
commit c6b9a2a92e
29 changed files with 53 additions and 50 deletions

View File

@@ -0,0 +1,7 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
<?= Helper\markdown($comment['comment']) ?>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,7 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Comment updated') ?></h3>
<?= Helper\markdown($comment['comment']) ?>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,5 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('New attachment added "%s"', $file['name']) ?></p>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,6 @@
<hr/>
Kanboard
<?php if (isset($application_url) && ! empty($application_url)): ?>
- <a href="<?= $application_url.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= t('view the task on Kanboard') ?></a>.
<?php endif ?>

View File

@@ -0,0 +1,17 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('New sub-task') ?></h3>
<ul>
<li><?= t('Title:') ?> <?= Helper\escape($subtask['title']) ?></li>
<li><?= t('Status:') ?> <?= Helper\escape($subtask['status_name']) ?></li>
<li><?= t('Assignee:') ?> <?= Helper\escape($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
<li>
<?= t('Time tracking:') ?>
<?php if (! empty($subtask['time_estimated'])): ?>
<strong><?= Helper\escape($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</li>
</ul>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,21 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Sub-task updated') ?></h3>
<ul>
<li><?= t('Title:') ?> <?= Helper\escape($subtask['title']) ?></li>
<li><?= t('Status:') ?> <?= Helper\escape($subtask['status_name']) ?></li>
<li><?= t('Assignee:') ?> <?= Helper\escape($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
<li>
<?= t('Time tracking:') ?>
<?php if (! empty($subtask['time_spent'])): ?>
<strong><?= Helper\escape($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
<?php endif ?>
<?php if (! empty($subtask['time_estimated'])): ?>
<strong><?= Helper\escape($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</li>
</ul>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,20 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<strong>
<?php if ($task['assignee_username']): ?>
<?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('There is nobody assigned') ?>
<?php endif ?>
</strong>
</li>
</ul>
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
<?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
<?php endif ?>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,5 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been closed.', $task['id']) ?></p>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,43 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
</li>
<?php if ($task['date_due']): ?>
<li>
<strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
</li>
<?php endif ?>
<?php if ($task['creator_username']): ?>
<li>
<?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?>
</li>
<?php endif ?>
<li>
<strong>
<?php if ($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>
<?= t('Column on the board:') ?>
<strong><?= Helper\escape($task['column_title']) ?></strong>
</li>
<li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
<?php if ($task['category_name']): ?>
<li>
<?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong>
</li>
<?php endif ?>
</ul>
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
<?= Helper\markdown($task['description']) ?>
<?php endif ?>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,20 @@
<h2><?= t('List of due tasks for the project "%s"', $project) ?></h2>
<ul>
<?php foreach ($tasks as $task): ?>
<li>
(<strong>#<?= $task['id'] ?></strong>)
<?php if ($application_url): ?>
<a href="<?= $application_url.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= Helper\escape($task['title']) ?></a>
<?php else: ?>
<?= Helper\escape($task['title']) ?>
<?php endif ?>
(<?= dt('%B %e, %Y', $task['date_due']) ?>)
<?php if ($task['assignee_username']): ?>
(<strong><?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?></strong>)
<?php endif ?>
</li>
<?php endforeach ?>
</ul>
<?= Helper\template('notification/footer', array('task' => $task)) ?>

View File

@@ -0,0 +1,11 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= t('Column on the board:') ?>
<strong><?= Helper\escape($task['column_title']) ?></strong>
</li>
<li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
</ul>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,11 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= t('Column on the board:') ?>
<strong><?= Helper\escape($task['column_title']) ?></strong>
</li>
<li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
</ul>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,5 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been opened.', $task['id']) ?></p>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>

View File

@@ -0,0 +1,43 @@
<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul>
<li>
<?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
</li>
<?php if ($task['date_due']): ?>
<li>
<strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
</li>
<?php endif ?>
<?php if ($task['creator_username']): ?>
<li>
<?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?>
</li>
<?php endif ?>
<li>
<strong>
<?php if ($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>
<?= t('Column on the board:') ?>
<strong><?= Helper\escape($task['column_title']) ?></strong>
</li>
<li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
<?php if ($task['category_name']): ?>
<li>
<?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong>
</li>
<?php endif ?>
</ul>
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
<?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
<?php endif ?>
<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>