xref: /webtrees/resources/views/modules/todo/research-tasks.phtml (revision 36de22acf6348b1059dac63e3cd19589574906ac)
1<?php
2
3use Fisharebest\Webtrees\Fact;
4use Fisharebest\Webtrees\I18N;
5use Illuminate\Support\Collection;
6
7/**
8 * @var int              $limit_high
9 * @var int              $limit_low
10 * @var Collection<Fact> $tasks
11 */
12
13?>
14
15<table
16    class="table table-bordered table-sm wt-table-tasks datatables d-none"
17    <?= view('lists/datatables-attributes') ?>
18    data-paging="<?= $tasks->count() >= $limit_high ? 'true' : 'false' ?>"
19    data-filter="false"
20    data-info="false"
21    data-length-change="false"
22    data-page-length="<?= e($limit_low) ?>"
23>
24    <thead>
25        <tr>
26            <th class="d-none d-md-table-cell wt-side-block-optional">
27                <?= I18N::translate('Date') ?>
28            </th>
29            <th>
30                <?= I18N::translate('Record') ?>
31            </th>
32            <th class="d-none d-md-table-cell wt-side-block-optional">
33                <?= I18N::translate('Username') ?>
34            </th>
35            <th>
36                <?= I18N::translate('Research task') ?>
37            </th>
38        </tr>
39    </thead>
40
41    <tbody>
42        <?php foreach ($tasks as $task) : ?>
43            <tr>
44                <td data-sort="<?= $task->date()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional">
45                    <?= $task->date()->display() ?>
46                </td>
47                <td data-sort="<?= e($task->record()->sortName()) ?>">
48                    <a href="<?= e($task->record()->url()) ?>">
49                        <?= $task->record()->fullName() ?>
50                    </a>
51                </td>
52                <td class="d-none d-md-table-cell wt-side-block-optional">
53                    <?= e($task->attribute('_WT_USER')) ?>
54                </td>
55                <td dir="auto">
56                    <?= e($task->value()) ?>
57                </td>
58            </tr>
59        <?php endforeach ?>
60    </tbody>
61</table>
62