1*a69f5655SGreg Roach<?php 2*a69f5655SGreg Roachuse Fisharebest\Webtrees\Auth; 3*a69f5655SGreg Roachuse Fisharebest\Webtrees\Date; 4*a69f5655SGreg Roachuse Fisharebest\Webtrees\I18N; 5*a69f5655SGreg Roach?> 6dd6b2bfcSGreg Roach 7dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 8dd6b2bfcSGreg Roach <?= $title ?> 9dd6b2bfcSGreg Roach</h2> 10dd6b2bfcSGreg Roach 11dd6b2bfcSGreg Roach<form name="dateform"> 12dd6b2bfcSGreg Roach <input type="hidden" name="route" value="calendar"> 13dd6b2bfcSGreg Roach <input type="hidden" name="cal" value="<?= e($cal) ?>"> 14dd6b2bfcSGreg Roach <input type="hidden" name="day" value="<?= e($cal_date->day()) ?>"> 15dd6b2bfcSGreg Roach <input type="hidden" name="month" value="<?= e($cal_month) ?>"> 16dd6b2bfcSGreg Roach <input type="hidden" name="year" value="<?= e($cal_date->year()) ?>"> 17dd6b2bfcSGreg Roach <input type="hidden" name="view" value="<?= e($view) ?>"> 18dd6b2bfcSGreg Roach <input type="hidden" name="filtersx" value="<?= e($filtersx) ?>"> 19dd6b2bfcSGreg Roach 20dd6b2bfcSGreg Roach <table class="table-sm wt-page-options w-100" role="presentation"> 21dd6b2bfcSGreg Roach <tr> 22dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 23dd6b2bfcSGreg Roach <?= I18N::translate('Day') ?> 24dd6b2bfcSGreg Roach </th> 25dd6b2bfcSGreg Roach <td class="wt-page-options-value" colspan="3"> 26dd6b2bfcSGreg Roach <?php for ($d = 1; $d <= $days_in_month; $d++) : ?> 27aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 28dd6b2bfcSGreg Roach <?= (new Date($cal_date->format("%@ {$d} %O %E")))->minimumDate()->format('%j') ?> 29dd6b2bfcSGreg Roach </a> 30dd6b2bfcSGreg Roach | 31dd6b2bfcSGreg Roach <?php endfor ?> 32aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 33dd6b2bfcSGreg Roach <b><?php $tmp = new Date($today->format('%@ %A %O %E')); echo $tmp->display() ?></b> 34dd6b2bfcSGreg Roach </a> 35dd6b2bfcSGreg Roach </td> 36dd6b2bfcSGreg Roach </tr> 37dd6b2bfcSGreg Roach <tr> 38dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 39dd6b2bfcSGreg Roach <?= I18N::translate('Month') ?> 40dd6b2bfcSGreg Roach </th> 41dd6b2bfcSGreg Roach <td class="wt-page-options-value" colspan="3"> 42dd6b2bfcSGreg Roach <?php foreach ($months as $m => $month_name) : ?> 43aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 44dd6b2bfcSGreg Roach <?php if ($m === $cal_month) : ?> 45dd6b2bfcSGreg Roach <span class="error"><?= e($month_name) ?></span> 46dd6b2bfcSGreg Roach <?php else : ?> 47dd6b2bfcSGreg Roach <?= e($month_name) ?> 48dd6b2bfcSGreg Roach <?php endif ?> 49dd6b2bfcSGreg Roach </a> | 50dd6b2bfcSGreg Roach <?php endforeach ?> 51aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 52dd6b2bfcSGreg Roach <b><?= $today->format('%F %Y') ?></b> 53dd6b2bfcSGreg Roach </a> 54dd6b2bfcSGreg Roach </td> 55dd6b2bfcSGreg Roach </tr> 56dd6b2bfcSGreg Roach <tr> 57dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 58dd6b2bfcSGreg Roach <label for="year"><?= I18N::translate('Year') ?></label> 59dd6b2bfcSGreg Roach </th> 60dd6b2bfcSGreg Roach <td class="wt-page-options-value"> 61aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 62dd6b2bfcSGreg Roach -1 63dd6b2bfcSGreg Roach </a> 64dd6b2bfcSGreg Roach <input type="text" id="year" name="year" value="<?= $year ?>" size="4"> 65aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 66dd6b2bfcSGreg Roach +1 67dd6b2bfcSGreg Roach </a> 68dd6b2bfcSGreg Roach | 69aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 70dd6b2bfcSGreg Roach <?= $today->format('%Y') ?> 71dd6b2bfcSGreg Roach </a> 72dd6b2bfcSGreg Roach </td> 73dd6b2bfcSGreg Roach 74dd6b2bfcSGreg Roach <th class="wt-page-options-label"> 75dd6b2bfcSGreg Roach <?= I18N::translate('Show') ?> 76dd6b2bfcSGreg Roach </th> 77dd6b2bfcSGreg Roach 78dd6b2bfcSGreg Roach <td class="wt-page-options-value"> 79dd6b2bfcSGreg Roach <?php if (!$tree->getPreference('HIDE_LIVE_PEOPLE') || Auth::check()) : ?> 80dd6b2bfcSGreg Roach <select class="list_value" name="filterof" onchange="document.dateform.submit();"> 81dd6b2bfcSGreg Roach <option value="all" <?= $filterof === 'all' ? 'selected' : '' ?>> 82dd6b2bfcSGreg Roach <?= I18N::translate('All individuals') ?> 83dd6b2bfcSGreg Roach </option> 84dd6b2bfcSGreg Roach <option value="living" <?= $filterof === 'living' ? 'selected' : '' ?>> 85dd6b2bfcSGreg Roach <?= I18N::translate('Living individuals') ?> 86dd6b2bfcSGreg Roach </option> 87dd6b2bfcSGreg Roach <option value="recent" <?= $filterof === 'recent' ? 'selected' : '' ?>> 88dd6b2bfcSGreg Roach <?= I18N::translate('Recent years (< 100 yrs)') ?> 89dd6b2bfcSGreg Roach </option> 90dd6b2bfcSGreg Roach </select> 91dd6b2bfcSGreg Roach <?php endif ?> 92dd6b2bfcSGreg Roach 93aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 9497c22350SGreg Roach <?php if ($filtersx === '') : ?> 9597c22350SGreg Roach <?= view('icons/sex-M') ?> 9697c22350SGreg Roach <?= view('icons/sex-F') ?> 9797c22350SGreg Roach <?php else: ?> 9897c22350SGreg Roach <small> 9997c22350SGreg Roach <?= view('icons/sex-M') ?> 10097c22350SGreg Roach <?= view('icons/sex-F') ?> 10197c22350SGreg Roach </small> 10297c22350SGreg Roach <?php endif ?> 103dd6b2bfcSGreg Roach </a> 104dd6b2bfcSGreg Roach | 105aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 10697c22350SGreg Roach <?php if ($filtersx === 'M') : ?> 10797c22350SGreg Roach <?= view('icons/sex-M') ?> 10897c22350SGreg Roach <?php else: ?> 10997c22350SGreg Roach <small> 11097c22350SGreg Roach <?= view('icons/sex-M') ?> 11197c22350SGreg Roach </small> 11297c22350SGreg Roach <?php endif ?> 113dd6b2bfcSGreg Roach </a> 114dd6b2bfcSGreg Roach | 115aa6f03bbSGreg 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, 'ged' => $tree->name()])) ?>" rel="nofollow"> 11697c22350SGreg Roach <?php if ($filtersx === 'F') : ?> 11797c22350SGreg Roach <?= view('icons/sex-F') ?> 11897c22350SGreg Roach <?php else: ?> 11997c22350SGreg Roach <small> 12097c22350SGreg Roach <?= view('icons/sex-F') ?> 12197c22350SGreg Roach </small> 12297c22350SGreg Roach <?php endif ?> 123dd6b2bfcSGreg Roach </a> 124dd6b2bfcSGreg Roach 125dd6b2bfcSGreg Roach <select class="list_value" name="filterev" onchange="document.dateform.submit();"> 126dd6b2bfcSGreg Roach <option value="BIRT-MARR-DEAT" <?= $filterev === 'BIRT-MARR-DEAT' ? 'selected' : '' ?>> 127dd6b2bfcSGreg Roach <?= I18N::translate('Vital records') ?> 128dd6b2bfcSGreg Roach </option> 129dd6b2bfcSGreg Roach <option value="" <?= $filterev === '' ? 'selected' : '' ?>> 130dd6b2bfcSGreg Roach <?= I18N::translate('All') ?> 131dd6b2bfcSGreg Roach </option> 132dd6b2bfcSGreg Roach <option value="BIRT" <?= $filterev === 'BIRT' ? 'selected' : '' ?>> 133dd6b2bfcSGreg Roach <?= I18N::translate('Birth') ?> 134dd6b2bfcSGreg Roach </option> 135dd6b2bfcSGreg Roach <option value="BAPM-CHR-CHRA" <?= $filterev === 'BAPM-CHR-CHRA' ? 'selected' : '' ?>> 136dd6b2bfcSGreg Roach <?= I18N::translate('Baptism') ?> 137dd6b2bfcSGreg Roach </option> 138dd6b2bfcSGreg Roach <option value="MARR-_COML-_NMR" <?= $filterev === 'MARR-_COML-_NMR' ? 'selected' : '' ?>> 139dd6b2bfcSGreg Roach <?= I18N::translate('Marriage') ?> 140dd6b2bfcSGreg Roach </option> 141dd6b2bfcSGreg Roach <option value="DIV-_SEPR" <?= $filterev === 'DIV-_SEPR' ? 'selected' : '' ?>> 142dd6b2bfcSGreg Roach <?= I18N::translate('Divorce') ?> 143dd6b2bfcSGreg Roach </option> 144dd6b2bfcSGreg Roach <option value="DEAT" <?= $filterev === 'DEAT' ? 'selected' : '' ?>> 145dd6b2bfcSGreg Roach <?= I18N::translate('Death') ?> 146dd6b2bfcSGreg Roach </option> 147dd6b2bfcSGreg Roach <option value="BURI" <?= $filterev === 'BURI' ? 'selected' : '' ?>> 148dd6b2bfcSGreg Roach <?= I18N::translate('Burial') ?> 149dd6b2bfcSGreg Roach </option> 150dd6b2bfcSGreg Roach <option value="IMMI,EMIG" <?= $filterev === 'IMMI,EMIG' ? 'selected' : '' ?>> 151dd6b2bfcSGreg Roach <?= I18N::translate('Emigration') ?> 152dd6b2bfcSGreg Roach </option> 153dd6b2bfcSGreg Roach <option value="EVEN" <?= $filterev === 'EVEN' ? 'selected' : '' ?>> 154dd6b2bfcSGreg Roach <?= I18N::translate('Custom event') ?> 155dd6b2bfcSGreg Roach </option> 156dd6b2bfcSGreg Roach </select> 157dd6b2bfcSGreg Roach </td> 158dd6b2bfcSGreg Roach </tr> 159dd6b2bfcSGreg Roach </table> 160dd6b2bfcSGreg Roach 161e7f5c669SGreg Roach <table class="w-100"> 162dd6b2bfcSGreg Roach <tr> 16397c22350SGreg Roach <td class="topbottombar text-center"> 164aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 165dd6b2bfcSGreg Roach <?= I18N::translate('View this day') ?> 166dd6b2bfcSGreg Roach </a> 167dd6b2bfcSGreg Roach | 168aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 169dd6b2bfcSGreg Roach <?= I18N::translate('View this month') ?> 170dd6b2bfcSGreg Roach </a> 171dd6b2bfcSGreg Roach | 172aa6f03bbSGreg 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', 'ged' => $tree->name()])) ?>" rel="nofollow"> 173dd6b2bfcSGreg Roach <?= I18N::translate('View this year') ?> 174dd6b2bfcSGreg Roach </a> 175dd6b2bfcSGreg Roach </td> 17697c22350SGreg Roach <td class="topbottombar text-center"> 177dd6b2bfcSGreg Roach <?php 178dd6b2bfcSGreg Roach $n = 0; 179dd6b2bfcSGreg Roach foreach (Date::calendarNames() as $newcal => $cal_name) { 180dd6b2bfcSGreg Roach $tmp = $cal_date->convertToCalendar($newcal); 181dd6b2bfcSGreg Roach if ($tmp->inValidRange()) { 182dd6b2bfcSGreg Roach if ($n++) { 183dd6b2bfcSGreg Roach echo ' | '; 184dd6b2bfcSGreg Roach } 185aa6f03bbSGreg 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, 'ged' => $tree->name()])) . '" rel="nofollow">', $cal_name, '</a>'; 186dd6b2bfcSGreg Roach } 187dd6b2bfcSGreg Roach } ?> 188dd6b2bfcSGreg Roach </td> 189dd6b2bfcSGreg Roach </tr> 190dd6b2bfcSGreg Roach </table> 191dd6b2bfcSGreg Roach</form> 192dd6b2bfcSGreg Roach 193aa6f03bbSGreg Roach<div class="wt-ajax-load wt-page-content" data-ajax-url="<?= e(route('calendar-events', ['ged' => $tree->name(), 'cal' => $cal, 'day' => $day, 'month' => $month, 'year' => $year, 'view' => $view, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx])) ?>"></div> 194dd6b2bfcSGreg Roach 195dd6b2bfcSGreg Roach<?= view('modals/ajax') ?> 196