1a69f5655SGreg Roach<?php 2a69f5655SGreg Roachuse Fisharebest\Webtrees\Auth; 3a69f5655SGreg Roachuse Fisharebest\Webtrees\Date; 4a69f5655SGreg Roachuse Fisharebest\Webtrees\I18N; 5a69f5655SGreg Roach?> 6dd6b2bfcSGreg Roach 7dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 8dd6b2bfcSGreg Roach <?= $title ?> 9dd6b2bfcSGreg Roach</h2> 10dd6b2bfcSGreg Roach 11dd6b2bfcSGreg Roach<table class="table-sm wt-page-options w-100" role="presentation"> 12dd6b2bfcSGreg Roach <tr> 13dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 14dd6b2bfcSGreg Roach <?= I18N::translate('Day') ?> 15dd6b2bfcSGreg Roach </th> 16dd6b2bfcSGreg Roach <td class="wt-page-options-value" colspan="3"> 17dd6b2bfcSGreg Roach <?php for ($d = 1; $d <= $days_in_month; $d++) : ?> 18d72b284aSGreg Roach <a <?= $d === $cal_date->day() ? 'class="error"' : '' ?> href="<?= e(route('calendar', ['cal' => $cal, 'day' => $d, 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'tree' => $tree->name()])) ?>" rel="nofollow"> 19dd6b2bfcSGreg Roach <?= (new Date($cal_date->format("%@ {$d} %O %E")))->minimumDate()->format('%j') ?> 20dd6b2bfcSGreg Roach </a> 21dd6b2bfcSGreg Roach | 22dd6b2bfcSGreg Roach <?php endfor ?> 23d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $today->day(), 'month' => $today_month, 'year' => $today->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'tree' => $tree->name()])) ?>" rel="nofollow"> 24dd6b2bfcSGreg Roach <b><?php $tmp = new Date($today->format('%@ %A %O %E')); echo $tmp->display() ?></b> 25dd6b2bfcSGreg Roach </a> 26dd6b2bfcSGreg Roach </td> 27dd6b2bfcSGreg Roach </tr> 28dd6b2bfcSGreg Roach <tr> 29dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 30dd6b2bfcSGreg Roach <?= I18N::translate('Month') ?> 31dd6b2bfcSGreg Roach </th> 32dd6b2bfcSGreg Roach <td class="wt-page-options-value" colspan="3"> 33dd6b2bfcSGreg Roach <?php foreach ($months as $m => $month_name) : ?> 34d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $m, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'tree' => $tree->name()])) ?>" rel="nofollow"> 35dd6b2bfcSGreg Roach <?php if ($m === $cal_month) : ?> 36dd6b2bfcSGreg Roach <span class="error"><?= e($month_name) ?></span> 37dd6b2bfcSGreg Roach <?php else : ?> 38dd6b2bfcSGreg Roach <?= e($month_name) ?> 39dd6b2bfcSGreg Roach <?php endif ?> 40dd6b2bfcSGreg Roach </a> | 41dd6b2bfcSGreg Roach <?php endforeach ?> 42d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => min($cal_date->day(), $today->daysInMonth()), 'month' => $today_month, 'year' => $today->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'tree' => $tree->name()])) ?>" rel="nofollow"> 43dd6b2bfcSGreg Roach <b><?= $today->format('%F %Y') ?></b> 44dd6b2bfcSGreg Roach </a> 45dd6b2bfcSGreg Roach </td> 46dd6b2bfcSGreg Roach </tr> 47dd6b2bfcSGreg Roach <tr> 48dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 49dd6b2bfcSGreg Roach <label for="year"><?= I18N::translate('Year') ?></label> 50dd6b2bfcSGreg Roach </th> 51*40296c5fSGreg Roach 52dd6b2bfcSGreg Roach <td class="wt-page-options-value"> 53*40296c5fSGreg Roach <form method="post" action="<?= e(route('calendar', ['tree' => $tree->name(), 'view' => $view])) ?>" class="d-inline"> 54*40296c5fSGreg Roach <?= csrf_field() ?> 55*40296c5fSGreg Roach <input type="hidden" name="cal" value="<?= e($cal) ?>"> 56*40296c5fSGreg Roach <input type="hidden" name="day" value="<?= e($cal_date->day()) ?>"> 57*40296c5fSGreg Roach <input type="hidden" name="month" value="<?= e($cal_month) ?>"> 58*40296c5fSGreg Roach <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> 59*40296c5fSGreg Roach <input type="hidden" name="filterof" value="<?= e($filtersx) ?>"> 60*40296c5fSGreg Roach <input type="hidden" name="filterev" value="<?= e($filtersx) ?>"> 61*40296c5fSGreg Roach 62d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year() === 1 ? -1 : $cal_date->year() - 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 63dd6b2bfcSGreg Roach -1 64dd6b2bfcSGreg Roach </a> 65*40296c5fSGreg Roach 66dd6b2bfcSGreg Roach <input type="text" id="year" name="year" value="<?= $year ?>" size="4"> 67*40296c5fSGreg Roach 68d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year() === -1 ? 1 : $cal_date->year() + 1, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 69dd6b2bfcSGreg Roach +1 70dd6b2bfcSGreg Roach </a> 71dd6b2bfcSGreg Roach | 72d72b284aSGreg Roach <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $today->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 73dd6b2bfcSGreg Roach <?= $today->format('%Y') ?> 74dd6b2bfcSGreg Roach </a> 75*40296c5fSGreg Roach </form> 76dd6b2bfcSGreg Roach </td> 77dd6b2bfcSGreg Roach 78dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 79dd6b2bfcSGreg Roach <?= I18N::translate('Show') ?> 80dd6b2bfcSGreg Roach </th> 81dd6b2bfcSGreg Roach 82dd6b2bfcSGreg Roach <td class="wt-page-options-value"> 83dd6b2bfcSGreg Roach <?php if (!$tree->getPreference('HIDE_LIVE_PEOPLE') || Auth::check()) : ?> 84*40296c5fSGreg Roach <form method="post" action="<?= e(route('calendar', ['tree' => $tree->name(), 'view' => $view])) ?>" class="d-inline"> 85*40296c5fSGreg Roach <?= csrf_field() ?> 86*40296c5fSGreg Roach <input type="hidden" name="cal" value="<?= e($cal) ?>"> 87*40296c5fSGreg Roach <input type="hidden" name="day" value="<?= e($cal_date->day()) ?>"> 88*40296c5fSGreg Roach <input type="hidden" name="month" value="<?= e($cal_month) ?>"> 89*40296c5fSGreg Roach <input type="hidden" name="year" value="<?= e($cal_date->year()) ?>"> 90*40296c5fSGreg Roach <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> 91*40296c5fSGreg Roach <input type="hidden" name="filterev" value="<?= e($filtersx) ?>"> 92*40296c5fSGreg Roach 93*40296c5fSGreg Roach <select class="list_value" name="filterof" onchange="this.form.submit();"> 94dd6b2bfcSGreg Roach <option value="all" <?= $filterof === 'all' ? 'selected' : '' ?>> 95dd6b2bfcSGreg Roach <?= I18N::translate('All individuals') ?> 96dd6b2bfcSGreg Roach </option> 97dd6b2bfcSGreg Roach <option value="living" <?= $filterof === 'living' ? 'selected' : '' ?>> 98dd6b2bfcSGreg Roach <?= I18N::translate('Living individuals') ?> 99dd6b2bfcSGreg Roach </option> 100dd6b2bfcSGreg Roach <option value="recent" <?= $filterof === 'recent' ? 'selected' : '' ?>> 101dd6b2bfcSGreg Roach <?= I18N::translate('Recent years (< 100 yrs)') ?> 102dd6b2bfcSGreg Roach </option> 103dd6b2bfcSGreg Roach </select> 104*40296c5fSGreg Roach </form> 105dd6b2bfcSGreg Roach <?php endif ?> 106dd6b2bfcSGreg Roach 107d72b284aSGreg Roach <a title="<?= I18N::translate('All individuals') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => '', 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 10897c22350SGreg Roach <?php if ($filtersx === '') : ?> 10997c22350SGreg Roach <?= view('icons/sex-M') ?> 11097c22350SGreg Roach <?= view('icons/sex-F') ?> 11197c22350SGreg Roach <?php else: ?> 11297c22350SGreg Roach <small> 11397c22350SGreg Roach <?= view('icons/sex-M') ?> 11497c22350SGreg Roach <?= view('icons/sex-F') ?> 11597c22350SGreg Roach </small> 11697c22350SGreg Roach <?php endif ?> 117dd6b2bfcSGreg Roach </a> 118dd6b2bfcSGreg Roach | 119d72b284aSGreg Roach <a title="<?= I18N::translate('Males') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'M', 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 12097c22350SGreg Roach <?php if ($filtersx === 'M') : ?> 12197c22350SGreg Roach <?= view('icons/sex-M') ?> 12297c22350SGreg Roach <?php else: ?> 12397c22350SGreg Roach <small> 12497c22350SGreg Roach <?= view('icons/sex-M') ?> 12597c22350SGreg Roach </small> 12697c22350SGreg Roach <?php endif ?> 127dd6b2bfcSGreg Roach </a> 128dd6b2bfcSGreg Roach | 129d72b284aSGreg Roach <a title="<?= I18N::translate('Females') ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => 'F', 'view' => $view, 'tree' => $tree->name()])) ?>" rel="nofollow"> 13097c22350SGreg Roach <?php if ($filtersx === 'F') : ?> 13197c22350SGreg Roach <?= view('icons/sex-F') ?> 13297c22350SGreg Roach <?php else: ?> 13397c22350SGreg Roach <small> 13497c22350SGreg Roach <?= view('icons/sex-F') ?> 13597c22350SGreg Roach </small> 13697c22350SGreg Roach <?php endif ?> 137dd6b2bfcSGreg Roach </a> 138dd6b2bfcSGreg Roach 139*40296c5fSGreg Roach <form method="post" action="<?= e(route('calendar', ['tree' => $tree->name(), 'view' => $view])) ?>" class="d-inline"> 140*40296c5fSGreg Roach <?= csrf_field() ?> 141*40296c5fSGreg Roach <input type="hidden" name="cal" value="<?= e($cal) ?>"> 142*40296c5fSGreg Roach <input type="hidden" name="day" value="<?= e($cal_date->day()) ?>"> 143*40296c5fSGreg Roach <input type="hidden" name="month" value="<?= e($cal_month) ?>"> 144*40296c5fSGreg Roach <input type="hidden" name="year" value="<?= e($cal_date->year()) ?>"> 145*40296c5fSGreg Roach <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> 146*40296c5fSGreg Roach <input type="hidden" name="filterof" value="<?= e($filtersx) ?>"> 147*40296c5fSGreg Roach 148*40296c5fSGreg Roach <select class="list_value" name="filterev" onchange="this.form.submit();"> 149dd6b2bfcSGreg Roach <option value="BIRT-MARR-DEAT" <?= $filterev === 'BIRT-MARR-DEAT' ? 'selected' : '' ?>> 150dd6b2bfcSGreg Roach <?= I18N::translate('Vital records') ?> 151dd6b2bfcSGreg Roach </option> 152dd6b2bfcSGreg Roach <option value="" <?= $filterev === '' ? 'selected' : '' ?>> 153dd6b2bfcSGreg Roach <?= I18N::translate('All') ?> 154dd6b2bfcSGreg Roach </option> 155dd6b2bfcSGreg Roach <option value="BIRT" <?= $filterev === 'BIRT' ? 'selected' : '' ?>> 156dd6b2bfcSGreg Roach <?= I18N::translate('Birth') ?> 157dd6b2bfcSGreg Roach </option> 158dd6b2bfcSGreg Roach <option value="BAPM-CHR-CHRA" <?= $filterev === 'BAPM-CHR-CHRA' ? 'selected' : '' ?>> 159dd6b2bfcSGreg Roach <?= I18N::translate('Baptism') ?> 160dd6b2bfcSGreg Roach </option> 161dd6b2bfcSGreg Roach <option value="MARR-_COML-_NMR" <?= $filterev === 'MARR-_COML-_NMR' ? 'selected' : '' ?>> 162dd6b2bfcSGreg Roach <?= I18N::translate('Marriage') ?> 163dd6b2bfcSGreg Roach </option> 164dd6b2bfcSGreg Roach <option value="DIV-_SEPR" <?= $filterev === 'DIV-_SEPR' ? 'selected' : '' ?>> 165dd6b2bfcSGreg Roach <?= I18N::translate('Divorce') ?> 166dd6b2bfcSGreg Roach </option> 167dd6b2bfcSGreg Roach <option value="DEAT" <?= $filterev === 'DEAT' ? 'selected' : '' ?>> 168dd6b2bfcSGreg Roach <?= I18N::translate('Death') ?> 169dd6b2bfcSGreg Roach </option> 170dd6b2bfcSGreg Roach <option value="BURI" <?= $filterev === 'BURI' ? 'selected' : '' ?>> 171dd6b2bfcSGreg Roach <?= I18N::translate('Burial') ?> 172dd6b2bfcSGreg Roach </option> 173dd6b2bfcSGreg Roach <option value="IMMI,EMIG" <?= $filterev === 'IMMI,EMIG' ? 'selected' : '' ?>> 174dd6b2bfcSGreg Roach <?= I18N::translate('Emigration') ?> 175dd6b2bfcSGreg Roach </option> 176dd6b2bfcSGreg Roach <option value="EVEN" <?= $filterev === 'EVEN' ? 'selected' : '' ?>> 177dd6b2bfcSGreg Roach <?= I18N::translate('Custom event') ?> 178dd6b2bfcSGreg Roach </option> 179dd6b2bfcSGreg Roach </select> 180*40296c5fSGreg Roach </form> 181dd6b2bfcSGreg Roach </td> 182dd6b2bfcSGreg Roach </tr> 183dd6b2bfcSGreg Roach</table> 184dd6b2bfcSGreg Roach 185e7f5c669SGreg Roach <table class="w-100"> 186dd6b2bfcSGreg Roach <tr> 18797c22350SGreg Roach <td class="topbottombar text-center"> 188d72b284aSGreg Roach <a class="<?= $view === 'day' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'day', 'tree' => $tree->name()])) ?>" rel="nofollow"> 189dd6b2bfcSGreg Roach <?= I18N::translate('View this day') ?> 190dd6b2bfcSGreg Roach </a> 191dd6b2bfcSGreg Roach | 192d72b284aSGreg Roach <a class="<?= $view === 'month' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'tree' => $tree->name()])) ?>" rel="nofollow"> 193dd6b2bfcSGreg Roach <?= I18N::translate('View this month') ?> 194dd6b2bfcSGreg Roach </a> 195dd6b2bfcSGreg Roach | 196d72b284aSGreg Roach <a class="<?= $view === 'year' ? 'error' : '' ?>" href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->day(), 'month' => $cal_month, 'year' => $cal_date->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'year', 'tree' => $tree->name()])) ?>" rel="nofollow"> 197dd6b2bfcSGreg Roach <?= I18N::translate('View this year') ?> 198dd6b2bfcSGreg Roach </a> 199dd6b2bfcSGreg Roach </td> 20097c22350SGreg Roach <td class="topbottombar text-center"> 201dd6b2bfcSGreg Roach <?php 202dd6b2bfcSGreg Roach $n = 0; 203dd6b2bfcSGreg Roach foreach (Date::calendarNames() as $newcal => $cal_name) { 204dd6b2bfcSGreg Roach $tmp = $cal_date->convertToCalendar($newcal); 205dd6b2bfcSGreg Roach if ($tmp->inValidRange()) { 206dd6b2bfcSGreg Roach if ($n++) { 207dd6b2bfcSGreg Roach echo ' | '; 208dd6b2bfcSGreg Roach } 209d72b284aSGreg Roach echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->day(), 'month' => $tmp->format('%O'), 'year' => $tmp->year(), 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'tree' => $tree->name()])) . '" rel="nofollow">', $cal_name, '</a>'; 210dd6b2bfcSGreg Roach } 211dd6b2bfcSGreg Roach } ?> 212dd6b2bfcSGreg Roach </td> 213dd6b2bfcSGreg Roach </tr> 214dd6b2bfcSGreg Roach </table> 215dd6b2bfcSGreg Roach 216d72b284aSGreg Roach<div class="wt-ajax-load wt-page-content" data-ajax-url="<?= e(route('calendar-events', ['tree' => $tree->name(), 'cal' => $cal, 'day' => $day, 'month' => $month, 'year' => $year, 'view' => $view, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx])) ?>"></div> 217dd6b2bfcSGreg Roach 218dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 219