/** * {@inheritDoc} * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtenderInterface::hExtendIndiHeaderIcons() */ public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) { if ($ctrlIndi) { $dindi = new Individual($ctrlIndi->getSignificantIndividual()); if ($dindi->canDisplayIsSourced()) { return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large'); } } return ''; }
/** * {@inheritDoc} * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtenderInterface::hExtendIndiHeaderLeft() */ public function hExtendIndiHeaderLeft(IndividualController $ctrlIndi) { $res = ''; $dindi = new Individual($ctrlIndi->getSignificantIndividual()); $titles = $dindi->getTitles(); if (count($titles) > 0) { $res = ' <dl> <dt class="label">' . I18N::translate('Titles') . '</dt>'; foreach ($titles as $title => $props) { $res .= '<dd class="field">' . $title . ' ' . FunctionsPrint::getListFromArray($props) . '</dd>'; } $res .= '</dl>'; } return array('indi-header-titles', $res); }
* along with this program. If not, see <http://www.gnu.org/licenses/>. */ namespace Fisharebest\Webtrees; /** * Defined in session.php * * @global Tree $WT_TREE */ global $WT_TREE; use Fisharebest\Webtrees\Controller\IndividualController; use Fisharebest\Webtrees\Functions\FunctionsDate; use Fisharebest\Webtrees\Functions\FunctionsPrint; define('WT_SCRIPT_NAME', 'individual.php'); require './includes/session.php'; $controller = new IndividualController(); $controller->addExternalJavascript(WT_JQUERY_COOKIE_JS_URL); // We use this to record the sidebar state if ($controller->record && $controller->record->canShow()) { if (Filter::get('action') == 'ajax') { $controller->ajaxRequest(); return; } // Generate the sidebar content *before* we display the page header, // as the clippings cart needs to have write access to the session. $sidebar_html = $controller->getSideBarContent(); $controller->pageHeader(); if ($controller->record->isPendingDeletion()) { if (Auth::isModerator($controller->record->getTree())) { echo '<p class="ui-state-highlight">', I18N::translate('This individual has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>'), ' ', FunctionsPrint::helpLink('pending_changes'), '</p>'; } elseif (Auth::isEditor($controller->record->getTree())) {
/** * {@inhericDoc} * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtenderInterface::hExtendIndiHeaderRight() */ public function hExtendIndiHeaderRight(IndividualController $ctrlIndi) { if ($ctrlIndi) { $dindi = new Individual($ctrlIndi->getSignificantIndividual()); return array('indi-header-sosa', FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 2, 'normal')); } return ''; }
/** * Constructor for the decorator * * @param \Fisharebest\Webtrees\Controller\IndividualController $ctrl_individual_in The Individual Controller to extend */ public function __construct(fw\Controller\IndividualController $ctrl_individual_in) { $this->ctrl_individual = $ctrl_individual_in; $this->dindi = new mw\Individual($this->ctrl_individual->getSignificantIndividual()); }