xref: /webtrees/resources/views/modules/clippings/show.phtml (revision 915db8c48659f56625569bc7989799a928114d5a)
1<?php
2
3use Fisharebest\Webtrees\I18N; ?>
4
5<h2 class="wt-page-title"><?= $title ?></h2>
6
7<p>
8    <?= I18N::translate('The clippings cart allows you to take extracts from this family tree and download them as a GEDCOM file.') ?>
9</p>
10
11<?php if (empty($records)) : ?>
12<p>
13    <?= I18N::translate('Your clippings cart is empty.') ?>
14</p>
15<?php else : ?>
16    <table class="table wt-facts-table">
17        <thead>
18            <tr>
19                <th><?= I18N::translate('Record') ?></th>
20                <th><?= I18N::translate('Remove') ?></th>
21            </tr>
22        </thead>
23        <tbody>
24            <?php foreach ($records as $record) : ?>
25                <tr>
26                    <td>
27                        <?= view('icons/record', ['record' => $record]) ?>
28
29                        <a href="<?= e($record->url()) ?>">
30                            <?= $record->fullName() ?>
31                        </a>
32                    </td>
33                    <td>
34                        <form method="post" action="<?= e(route('module', ['module' => 'clippings', 'action' => 'Remove', 'tree' => $tree->name(), 'xref' => $record->xref()])) ?>">
35                            <?= csrf_field() ?>
36                            <button type="submit" class="btn btn-link" title="<?= I18N::translate('Remove') ?>">
37                                <?= view('icons/delete') ?>
38                            </button>
39                        </form>
40                    </td>
41                </tr>
42            <?php endforeach ?>
43        </tbody>
44    </table>
45<?php endif ?>
46