Project activity refactoring and listeners improvements
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s commented the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em><br/>
|
||||
<div class="markdown"><?= Helper\markdown($comment) ?></div>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<em><?= Helper\escape($task['title']) ?></em><br/>
|
||||
<div class="markdown"><?= Helper\markdown($comment['comment']) ?></div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s updated a comment on the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em><br/>
|
||||
<div class="markdown"><?= Helper\markdown($comment) ?></div>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<em><?= Helper\escape($task['title']) ?></em><br/>
|
||||
<div class="markdown"><?= Helper\markdown($comment['comment']) ?></div>
|
||||
</div>
|
||||
@@ -1,12 +1,19 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s created a subtask for the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em><br/>
|
||||
<p><?= Helper\escape($subtask_title) ?> <strong>(<?= Helper\in_list($subtask_status, $subtask_status_list) ?>)</strong></p>
|
||||
<?php if ($subtask_assignee): ?>
|
||||
<p><?= t('Assigned to %s with an estimate of %s/%sh', $subtask_assignee, $subtask_time_spent, $subtask_time_estimated) ?></p>
|
||||
<?php else: ?>
|
||||
<p><?= t('Not assigned, estimate of %sh', $subtask_time_estimated) ?></p>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<p><em><?= Helper\escape($task['title']) ?></em></p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<?= Helper\escape($subtask['title']) ?> (<strong><?= Helper\escape($subtask['status_name']) ?></strong>)
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($subtask['username']): ?>
|
||||
<?= t('Assigned to %s with an estimate of %s/%sh', $subtask['name'] ?: $subtask['username'], $subtask['time_spent'], $subtask['time_estimated']) ?>
|
||||
<?php else: ?>
|
||||
<?= t('Not assigned, estimate of %sh', $subtask['time_estimated']) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,12 +1,19 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s updated a subtask for the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em><br/>
|
||||
<p><?= Helper\escape($subtask_title) ?> <strong>(<?= Helper\in_list($subtask_status, $subtask_status_list) ?>)</strong></p>
|
||||
<?php if ($subtask_assignee): ?>
|
||||
<p><?= t('Assigned to %s with an estimate of %s/%sh', $subtask_assignee, $subtask_time_spent, $subtask_time_estimated) ?></p>
|
||||
<?php else: ?>
|
||||
<p><?= t('Not assigned, estimate of %sh', $subtask_time_estimated) ?></p>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<p><em><?= Helper\escape($task['title']) ?></em></p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<?= Helper\escape($subtask['title']) ?> (<strong><?= Helper\escape($subtask['status_name']) ?></strong>)
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($subtask['username']): ?>
|
||||
<?= t('Assigned to %s with an estimate of %s/%sh', $subtask['name'] ?: $subtask['username'], $subtask['time_spent'], $subtask['time_estimated']) ?>
|
||||
<?php else: ?>
|
||||
<?= t('Not assigned, estimate of %sh', $subtask['time_estimated']) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s change the assignee of the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
<?= e(
|
||||
'%s change the assignee of the task <a href="?controller=task&action=show&task_id=%d">#%d</a> to %s',
|
||||
Helper\escape($author),
|
||||
$task_id,
|
||||
$task_id,
|
||||
Helper\escape($task['assignee_name'] ?: $task['assignee_username'])
|
||||
) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -2,5 +2,5 @@
|
||||
<?= e('%s closed the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -2,5 +2,5 @@
|
||||
<?= e('%s created the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -1,6 +1,6 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s moved the task <a href="?controller=task&action=show&task_id=%d">#%d</a> to the column "%s"', Helper\escape($author), $task_id, $task_id, Helper\escape($task_column_name)) ?>
|
||||
<?= e('%s moved the task <a href="?controller=task&action=show&task_id=%d">#%d</a> to the column "%s"', Helper\escape($author), $task_id, $task_id, Helper\escape($task['column_title'])) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -1,6 +1,6 @@
|
||||
<p class="activity-title">
|
||||
<?= e('%s moved the task <a href="?controller=task&action=show&task_id=%d">#%d</a> to the position #%d in the column "%s"', Helper\escape($author), $task_id, $task_id, $task_position, Helper\escape($task_column_name)) ?>
|
||||
<?= e('%s moved the task <a href="?controller=task&action=show&task_id=%d">#%d</a> to the position #%d in the column "%s"', Helper\escape($author), $task_id, $task_id, $task['position'], Helper\escape($task['column_title'])) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -2,5 +2,5 @@
|
||||
<?= e('%s open the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -2,5 +2,5 @@
|
||||
<?= e('%s updated the task <a href="?controller=task&action=show&task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
<em><?= Helper\escape($task_title) ?></em>
|
||||
<em><?= Helper\escape($task['title']) ?></em>
|
||||
</p>
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('%s\'s activity', $project['name']) ?></h2>
|
||||
<ul>
|
||||
<li><a href="?controller=board&action=show&project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
|
||||
<li><a href="?controller=project&action=search&project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li>
|
||||
<li><a href="?controller=project&action=tasks&project_id=<?= $project['id'] ?>"><?= t('Completed tasks') ?></a></li>
|
||||
<li><a href="?controller=project&action=index"><?= t('List of projects') ?></a></li>
|
||||
<li><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
|
||||
<li><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li>
|
||||
<li><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li>
|
||||
<li><?= Helper\a(t('List of projects'), 'project', 'index') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section>
|
||||
@@ -14,17 +14,17 @@
|
||||
<?php else: ?>
|
||||
|
||||
<?php if ($project['is_public']): ?>
|
||||
<p class="pull-right"><i class="fa fa-rss-square"></i> <a href="?controller=project&action=feed&token=<?= $project['token'] ?>" target="_blank"><?= t('RSS feed') ?></a></p>
|
||||
<p class="pull-right"><i class="fa fa-rss-square"></i> <?= Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token'])) ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php foreach ($events as $event): ?>
|
||||
<div class="activity-event">
|
||||
<p class="activity-datetime">
|
||||
<?php if ($event['event_type'] === 'task'): ?>
|
||||
<?php if (Helper\contains($event['event_name'], 'task')): ?>
|
||||
<i class="fa fa-newspaper-o"></i>
|
||||
<?php elseif ($event['event_type'] === 'subtask'): ?>
|
||||
<?php elseif (Helper\contains($event['event_name'], 'subtask')): ?>
|
||||
<i class="fa fa-tasks"></i>
|
||||
<?php elseif ($event['event_type'] === 'comment'): ?>
|
||||
<?php elseif (Helper\contains($event['event_name'], 'comment')): ?>
|
||||
<i class="fa fa-comments-o"></i>
|
||||
<?php endif ?>
|
||||
<?= dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
|
||||
<title><?= t('%s\'s activity', $project['name']) ?></title>
|
||||
<link rel="alternate" type="text/html" href="<?= Helper\get_current_base_url() ?>"/>
|
||||
<link rel="self" type="application/atom+xml" href="<?= Helper\get_current_base_url() ?>?controller=project&action=feed&token=<?= $project['token'] ?>"/>
|
||||
<link rel="self" type="application/atom+xml" href="<?= Helper\get_current_base_url().Helper\u('project', 'feed', array('token' => $project['token'])) ?>"/>
|
||||
<updated><?= date(DATE_ATOM) ?></updated>
|
||||
<id><?= Helper\get_current_base_url() ?></id>
|
||||
<icon><?= Helper\get_current_base_url() ?>assets/img/favicon.png</icon>
|
||||
@@ -10,7 +10,7 @@
|
||||
<?php foreach ($events as $e): ?>
|
||||
<entry>
|
||||
<title type="text"><?= $e['event_title'] ?></title>
|
||||
<link rel="alternate" href="<?= Helper\get_current_base_url().'?controller=task&action=show&task_id='.$e['task_id'] ?>"/>
|
||||
<link rel="alternate" href="<?= Helper\get_current_base_url().Helper\u('task', 'show', array('task_id' => $e['task_id'])) ?>"/>
|
||||
<id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id>
|
||||
<published><?= date(DATE_ATOM, $e['date_creation']) ?></published>
|
||||
<updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<?= Helper\template('task_details', array('task' => $task, 'project' => $project)) ?>
|
||||
|
||||
<p class="align-right"><?= Helper\a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
|
||||
<p class="pull-right"><?= Helper\a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
|
||||
|
||||
<?= Helper\template('task_show_description', array('task' => $task)) ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user