VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/webtrees/resources/views/search-trees.phtml
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;
use Illuminate\Support\Collection;

/**
 * @var Collection<int,Tree> $all_trees
 * @var Collection<int,Tree> $search_trees
 */

?>

<?php if ($all_trees->count() > 1) : ?>
    <fieldset class="row">
        <div class="col-sm-3 col-form-label wt-page-options-label">
            <?= I18N::translate('Family trees') ?>
        </div>
        <div class="col-sm-9 wt-page-options-value pt-2">
            <div id="search-trees">
                <?php if ($all_trees->count() > 3) : ?>
                    <div class="d-flex">
                        <?php if ($all_trees->count() > $search_trees->count()) : ?>
                            <div class="me-2">
                                <button type="button" data-bs-toggle="collapse" class="btn btn-secondary btn-sm" data-bs-target="#more-trees,#select-all" aria-expanded="false" aria-controls="more-trees">
                                    <?= view('icons/expand') ?>
                                    <?= view('icons/collapse') ?>
                                </button>
                            </div>
                        <?php endif ?>
                        <div>
                            <?php foreach ($search_trees as $n => $tree) : ?>
                                <?= view('components/checkbox', ['name' => 'search_trees[]', 'id' => 'chkbx-' . $n, 'checked' => $search_trees->containsStrict($tree), 'value' => e($tree->name()), 'label' => e($tree->title())]) ?>
                            <?php endforeach ?>
                            <div id="more-trees" class="<?= $all_trees->count() > $search_trees->count() ? 'collapse' : '' ?>">
                                <?php foreach ($all_trees as $n => $tree) : ?>
                                    <?php if (!$search_trees->containsStrict($tree)) : ?>
                                        <?= view('components/checkbox', ['name' => 'search_trees[]', 'id' => 'chkbx-' . $n, 'checked' => $search_trees->containsStrict($tree), 'value' => e($tree->name()), 'label' => e($tree->title())]) ?>
                                    <?php endif ?>
                                <?php endforeach ?>
                            </div>
                        </div>
                        <div class="ms-auto <?= $all_trees->count() > $search_trees->count() ? 'collapse' : '' ?>" id="select-all">
                            <button type="button" class="btn btn-sm btn-secondary mx-1" onclick="document.querySelectorAll('#search-trees [type=checkbox]').forEach((element) => {element.checked=true;});">
                                <?= /* I18N: select all (of a list of options) */ I18N::translate('select all') ?>
                            </button>
                            <button type="button" class="btn btn-sm btn-secondary mx-1" onclick="document.querySelectorAll('#search-trees [type=checkbox]').forEach((element) => {element.checked=false;});">
                                <?= /* I18N: select none (of a list of options) */  I18N::translate('select none') ?>
                            </button>
                            <?php if ($all_trees->count() > 10) : ?>
                                <button type="button"  class="btn btn-sm btn-secondary mx-1" onclick="document.querySelectorAll('#search-trees [type=checkbox]').forEach((element) => {element.checked=!element.checked;});">
                                    <?= /* I18N: reverse the selection (of a list of options) */ I18N::translate('invert selection') ?>
                                </button>
                            <?php endif ?>
                        </div>
                </div>
                <?php else : ?>
                    <?php foreach ($all_trees as $n => $tree) : ?>
                        <?= view('components/checkbox-inline', ['name' => 'search_trees[]', 'id' => 'chkbx-' . $n, 'checked' => $search_trees->containsStrict($tree), 'value' => e($tree->name()), 'label' => e($tree->title())]) ?>
                    <?php endforeach ?>
                <?php endif ?>
            </div>
        </div>
    </fieldset>
<?php endif ?>

VaKeR 2022