diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-03-30 21:58:16 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-03-30 21:58:16 -0400 |
commit | 8d9b87bb6ee084d2ee71e8ca17cf2537dba87d7f (patch) | |
tree | de51fb030f43c88f4de08a907a9a3971a2dedd23 /app/Template | |
parent | 6d80f0b466c2be6f2127f6e6124c3d4e21be38d3 (diff) |
Avoid code duplication in pull-request #746
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/app/dashboard.php | 2 | ||||
-rw-r--r-- | app/Template/event/events.php (renamed from app/Template/project/events.php) | 0 | ||||
-rw-r--r-- | app/Template/project/activity.php | 2 | ||||
-rw-r--r-- | app/Template/task/activity.php | 5 | ||||
-rw-r--r-- | app/Template/task/events.php | 25 |
5 files changed, 7 insertions, 27 deletions
diff --git a/app/Template/app/dashboard.php b/app/Template/app/dashboard.php index 5b83540c..a832345b 100644 --- a/app/Template/app/dashboard.php +++ b/app/Template/app/dashboard.php @@ -53,7 +53,7 @@ </div> <div id="dashboard-activities"> <h2><?= t('Activity stream') ?></h2> - <?= $this->render('project/events', array('events' => $events)) ?> + <?= $this->render('event/events', array('events' => $events)) ?> </div> </div> </section> diff --git a/app/Template/project/events.php b/app/Template/event/events.php index 93bc6584..93bc6584 100644 --- a/app/Template/project/events.php +++ b/app/Template/event/events.php diff --git a/app/Template/project/activity.php b/app/Template/project/activity.php index bc4eb19c..7da6be5c 100644 --- a/app/Template/project/activity.php +++ b/app/Template/project/activity.php @@ -23,6 +23,6 @@ </ul> </div> <section> - <?= $this->render('project/events', array('events' => $events)) ?> + <?= $this->render('event/events', array('events' => $events)) ?> </section> </section>
\ No newline at end of file diff --git a/app/Template/task/activity.php b/app/Template/task/activity.php new file mode 100644 index 00000000..cc4aad03 --- /dev/null +++ b/app/Template/task/activity.php @@ -0,0 +1,5 @@ +<div class="page-header"> + <h2><?= t('Activity stream') ?></h2> +</div> + +<?= $this->render('event/events', array('events' => $events)) ?>
\ No newline at end of file diff --git a/app/Template/task/events.php b/app/Template/task/events.php deleted file mode 100644 index 188f46fe..00000000 --- a/app/Template/task/events.php +++ /dev/null @@ -1,25 +0,0 @@ -<div class="page-header"> - <h2><?= t('Activity stream') ?></h2> -</div> - -<?php if (empty($events)): ?> - <p class="alert"><?= t('No activity.') ?></p> -<?php else: ?> - - <?php foreach ($events as $event): ?> - <div class="activity-event"> - <p class="activity-datetime"> - <?php if ($this->contains($event['event_name'], 'subtask')): ?> - <i class="fa fa-tasks"></i> - <?php elseif ($this->contains($event['event_name'], 'task')): ?> - <i class="fa fa-newspaper-o"></i> - <?php elseif ($this->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']) ?> - </p> - <div class="activity-content"><?= $event['event_content'] ?></div> - </div> - <?php endforeach ?> - -<?php endif ?>
\ No newline at end of file |