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