execute(['tree_id' => $tree->id()])->fetchAssoc(); $count_families = Database::prepare( "SELECT l_to, COUNT(*) FROM `##families` JOIN `##link` ON l_from = f_id AND l_file = f_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->id()])->fetchAssoc(); $count_media = Database::prepare( "SELECT l_to, COUNT(*) FROM `##media` JOIN `##link` ON l_from = m_id AND l_file = m_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->id()])->fetchAssoc(); $count_sources = Database::prepare( "SELECT l_to, COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' AND l_file = :tree_id GROUP BY l_to" )->execute(['tree_id' => $tree->id()])->fetchAssoc(); ?>
= I18N::translate('Title') ?> | = I18N::translate('Individuals') ?> | = I18N::translate('Families') ?> | = I18N::translate('Media objects') ?> | = I18N::translate('Sources') ?> | = I18N::translate('Last change') ?> |
---|---|---|---|---|---|
= $note->getFullName() ?> | = I18N::number($count_individuals[$note->getXref()] ?? 0) ?> | = I18N::number($count_families[$note->getXref()] ?? 0) ?> | = I18N::number($count_media[$note->getXref()] ?? 0) ?> | = I18N::number($count_sources[$note->getXref()] ?? 0) ?> | = $note->lastChangeTimestamp() ?> |