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