![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/webtrees/resources/views/modules/media/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\Fact; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; use Illuminate\Support\Collection; /** * @var bool $can_edit * @var Collection<int,Fact> $clipboard_facts * @var Collection<int,Fact> $facts * @var Individual $individual */ ?> <div class="wt-tab-media"> <table class="table wt-facts-table"> <tr> <td colspan="2"> <label> <input id="show-level-2-media" type="checkbox" data-bs-toggle="collapse" data-bs-target=".wt-level-two-media" data-wt-persist="level-two-media" autocomplete="off"> <?= I18N::translate('Show all media') ?> </label> </td> </tr> <?php foreach ($facts as $fact) : ?> <?php if (str_ends_with($fact->tag(), ':OBJE')) : ?> <?= view('fact', ['fact' => $fact, 'record' => $individual]) ?> <?php else : ?> <?php if ($fact->isPendingAddition()) { $styleadd = 'wt-new '; } elseif ($fact->isPendingDeletion()) { $styleadd = 'wt-old '; } else { $styleadd = ''; } ?> <tr class="wt-level-two-media collapse"> <th scope="row" class="rela <?= $styleadd ?>"> <?= $fact->label() ?> <?= view('fact-edit-links', ['fact' => $fact, 'url' => $fact->record()->url() . '#tab-media']) ?> </th> <td class="<?= $styleadd ?>"> <?php if (preg_match_all('/\n([2-4] OBJE .*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?> <?php foreach ($matches as $match) : ?> <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record()->tree()]) ?> <?php endforeach ?> <?php endif ?> </td> </tr> <?php endif ?> <?php endforeach ?> <?php if ($facts->isEmpty()) : ?> <tr> <td colspan="2"> <?= I18N::translate('There are no media objects for this individual.') ?> </td> </tr> <?php endif ?> </table> </div>