.
*/
namespace Fisharebest\Webtrees;
use Fisharebest\Webtrees\Controller\TimelineController;
use Fisharebest\Webtrees\Functions\Functions;
use Fisharebest\Webtrees\Functions\FunctionsEdit;
require 'includes/session.php';
$controller = new TimelineController;
$controller->restrictAccess(Module::isActiveChart($controller->tree(), 'timeline_chart'));
// Only generate the content for interactive users (not search robots).
if (Filter::getBool('ajax') && Session::has('initiated')) {
?>
people) > 0) {
?>
= $controller->baseyear . '—' ?>
scale;
if ($mod < 1) {
$mod = 1;
}
for ($i = $controller->baseyear + 1; $i < $controller->topyear; $i++) {
if ($i % $mod === 0) {
echo '
';
echo $i . '—';
echo '
';
}
}
echo '
';
echo $controller->topyear . '—';
echo '
';
Functions::sortFacts($controller->indifacts);
$factcount = 0;
foreach ($controller->indifacts as $fact) {
$controller->printTimeFact($fact);
$factcount++;
}
// print the age boxes
foreach ($controller->people as $p => $indi) {
$pid = $indi->getXref();
$ageyoffset = 0 + ($controller->bheight * $p);
$col = $p % 6;
?>
|
bheight / 2)) / $controller->scale) + $controller->baseyear;
if (!empty($controller->birthyears[$pid])) {
$tage = $tyear - $controller->birthyears[$pid];
?>
| = I18N::translate('Year:') ?>
= $tyear ?>
|
(= I18N::translate('Age') ?>
= $tage ?>)
|
|
addInlineJavascript('$(".wt-page-content").load(location.search + "&ajax=1");')
->pageHeader();
?>