summaryrefslogtreecommitdiff
path: root/app/Module/ResearchTaskModule.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2017-09-26 17:02:19 +0100
committerGreg Roach <fisharebest@gmail.com>2017-09-26 17:02:39 +0100
commita078385ab6e1f346ddf795e4d45f53f87ef9de08 (patch)
tree87c443ac24d24b7322508b48d649965732d2cbfd /app/Module/ResearchTaskModule.php
parentc10e7dd976ff27218c2f6ef15cf02c9f5c531d89 (diff)
downloadwebtrees-a078385ab6e1f346ddf795e4d45f53f87ef9de08.tar.gz
webtrees-a078385ab6e1f346ddf795e4d45f53f87ef9de08.tar.bz2
webtrees-a078385ab6e1f346ddf795e4d45f53f87ef9de08.zip
Working on blocks and templates
Diffstat (limited to 'app/Module/ResearchTaskModule.php')
-rw-r--r--app/Module/ResearchTaskModule.php23
1 files changed, 3 insertions, 20 deletions
diff --git a/app/Module/ResearchTaskModule.php b/app/Module/ResearchTaskModule.php
index 5f3fb3d29f..5dcf8ebb23 100644
--- a/app/Module/ResearchTaskModule.php
+++ b/app/Module/ResearchTaskModule.php
@@ -93,27 +93,10 @@ class ResearchTaskModule extends AbstractModule implements ModuleBlockInterface
}
}
- $content = '';
- $content .= '<table ' . Datatables::researchTaskTableAttributes() . '>';
- $content .= '<thead><tr>';
- $content .= '<th>' . I18N::translate('Date') . '</th>';
- $content .= '<th>' . I18N::translate('Record') . '</th>';
- $content .= '<th>' . I18N::translate('Username') . '</th>';
- $content .= '<th>' . I18N::translate('Research task') . '</th>';
- $content .= '</tr></thead><tbody>';
-
- foreach ($tasks as $task) {
- $content .= '<tr>';
- $content .= '<td data-sort="' . $task->getDate()->julianDay() . '">' . $task->getDate()->display() . '</td>';
- $content .= '<td data-sort="' . Html::escape($task->getParent()->getSortName()) . '"><a href="' . $task->getParent()->getHtmlUrl() . '">' . $task->getParent()->getFullName() . '</a></td>';
- $content .= '<td>' . $task->getAttribute('_WT_USER') . '</td>';
- $content .= '<td dir="auto">' . $task->getValue() . '</td>';
- $content .= '</tr>';
- }
-
- $content .= '</tbody></table>';
if (empty($records)) {
- $content .= '<p>' . I18N::translate('There are no research tasks in this family tree.') . '</p>';
+ $content = '<p>' . I18N::translate('There are no research tasks in this family tree.') . '</p>';
+ } else {
+ $content = View::make('blocks/research-tasks', ['tasks' => $tasks]);
}
if ($template) {