Helpers refactoring
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s commented the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
<em><?= $this->e($task['title']) ?></em><br/>
|
||||
<div class="markdown"><?= $this->markdown($comment['comment']) ?></div>
|
||||
<div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div>
|
||||
</div>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s updated a comment on the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<?php foreach ($events as $event): ?>
|
||||
<div class="activity-event">
|
||||
<p class="activity-datetime">
|
||||
<?php if ($this->contains($event['event_name'], 'subtask')): ?>
|
||||
<?php if ($this->text->contains($event['event_name'], 'subtask')): ?>
|
||||
<i class="fa fa-tasks"></i>
|
||||
<?php elseif ($this->contains($event['event_name'], 'task')): ?>
|
||||
<?php elseif ($this->text->contains($event['event_name'], 'task')): ?>
|
||||
<i class="fa fa-newspaper-o"></i>
|
||||
<?php elseif ($this->contains($event['event_name'], 'comment')): ?>
|
||||
<?php elseif ($this->text->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']) ?>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s created a subtask for the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s updated a subtask for the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<div class="activity-description">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?php $assignee = $task['assignee_name'] ?: $task['assignee_username'] ?>
|
||||
@@ -6,11 +6,11 @@
|
||||
<?php if (! empty($assignee)): ?>
|
||||
<?= e('%s changed the assignee of the task %s to %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->e($assignee)
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= e('%s remove the assignee of the task %s', $this->e($author), $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
|
||||
<?= e('%s remove the assignee of the task %s', $this->e($author), $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s closed the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s created the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s moved the task %s to the column "%s"',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->e($task['column_title'])
|
||||
) ?>
|
||||
</p>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s moved the task %s to the position #%d in the column "%s"',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
|
||||
$task['position'],
|
||||
$this->e($task['column_title'])
|
||||
) ?>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s opened the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?= $this->avatar($email, $author) ?>
|
||||
<?= $this->user->avatar($email, $author) ?>
|
||||
|
||||
<p class="activity-title">
|
||||
<?= e('%s updated the task %s',
|
||||
$this->e($author),
|
||||
$this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
$this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
|
||||
) ?>
|
||||
</p>
|
||||
<p class="activity-description">
|
||||
|
||||
Reference in New Issue
Block a user