本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsPrint::printFindNoteLink方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsPrint::printFindNoteLink方法的具体用法?PHP FunctionsPrint::printFindNoteLink怎么用?PHP FunctionsPrint::printFindNoteLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Functions\FunctionsPrint
的用法示例。
在下文中一共展示了FunctionsPrint::printFindNoteLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlock
//.........这里部分代码省略.........
if (!is_array($userfavs)) {
$userfavs = array();
}
$id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
$title = $this->getTitle();
if (Auth::check()) {
$controller->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();');
}
$content = '';
if ($userfavs) {
foreach ($userfavs as $key => $favorite) {
if (isset($favorite['id'])) {
$key = $favorite['id'];
}
$removeFavourite = '<a class="font9" href="index.php?ctype=' . $ctype . '&ged=' . $WT_TREE->getNameHtml() . '&action=deletefav&favorite_id=' . $key . '" onclick="return confirm(\'' . I18N::translate('Are you sure you want to remove this item from your list of favorites?') . '\');">' . I18N::translate('Remove') . '</a> ';
if ($favorite['type'] == 'URL') {
$content .= '<div id="boxurl' . $key . '.0" class="person_box">';
if ($ctype == 'user' || Auth::isManager($WT_TREE)) {
$content .= $removeFavourite;
}
$content .= '<a href="' . $favorite['url'] . '"><b>' . $favorite['title'] . '</b></a>';
$content .= '<br>' . $favorite['note'];
$content .= '</div>';
} else {
$record = GedcomRecord::getInstance($favorite['gid'], $WT_TREE);
if ($record && $record->canShow()) {
if ($record instanceof Individual) {
$content .= '<div id="box' . $favorite["gid"] . '.0" class="person_box action_header';
switch ($record->getsex()) {
case 'M':
break;
case 'F':
$content .= 'F';
break;
default:
$content .= 'NN';
break;
}
$content .= '">';
if ($ctype == "user" || Auth::isManager($WT_TREE)) {
$content .= $removeFavourite;
}
$content .= Theme::theme()->individualBoxLarge($record);
$content .= $favorite['note'];
$content .= '</div>';
} else {
$content .= '<div id="box' . $favorite['gid'] . '.0" class="person_box">';
if ($ctype == 'user' || Auth::isManager($WT_TREE)) {
$content .= $removeFavourite;
}
$content .= $record->formatList('span');
$content .= '<br>' . $favorite['note'];
$content .= '</div>';
}
}
}
}
}
if ($ctype == 'user' || Auth::isManager($WT_TREE)) {
$uniqueID = Uuid::uuid4();
// This block can theoretically appear multiple times, so use a unique ID.
$content .= '<div class="add_fav_head">';
$content .= '<a href="#" onclick="return expand_layer(\'add_fav' . $uniqueID . '\');">' . I18N::translate('Add a new favorite') . '<i id="add_fav' . $uniqueID . '_img" class="icon-plus"></i></a>';
$content .= '</div>';
$content .= '<div id="add_fav' . $uniqueID . '" style="display: none;">';
$content .= '<form name="addfavform" method="get" action="index.php">';
$content .= '<input type="hidden" name="action" value="addfav">';
$content .= '<input type="hidden" name="ctype" value="' . $ctype . '">';
$content .= '<input type="hidden" name="ged" value="' . $WT_TREE->getNameHtml() . '">';
$content .= '<div class="add_fav_ref">';
$content .= '<input type="radio" name="fav_category" value="record" checked onclick="jQuery(\'#gid' . $uniqueID . '\').removeAttr(\'disabled\'); jQuery(\'#url, #favtitle\').attr(\'disabled\',\'disabled\').val(\'\');">';
$content .= '<label for="gid' . $uniqueID . '">' . I18N::translate('Enter an individual, family, or source ID') . '</label>';
$content .= '<input class="pedigree_form" data-autocomplete-type="IFSRO" type="text" name="gid" id="gid' . $uniqueID . '" size="5" value="">';
$content .= ' ' . FunctionsPrint::printFindIndividualLink('gid' . $uniqueID);
$content .= ' ' . FunctionsPrint::printFindFamilyLink('gid' . $uniqueID);
$content .= ' ' . FunctionsPrint::printFindSourceLink('gid' . $uniqueID);
$content .= ' ' . FunctionsPrint::printFindRepositoryLink('gid' . $uniqueID);
$content .= ' ' . FunctionsPrint::printFindNoteLink('gid' . $uniqueID);
$content .= ' ' . FunctionsPrint::printFindMediaLink('gid' . $uniqueID);
$content .= '</div>';
$content .= '<div class="add_fav_url">';
$content .= '<input type="radio" name="fav_category" value="url" onclick="jQuery(\'#url, #favtitle\').removeAttr(\'disabled\'); jQuery(\'#gid' . $uniqueID . '\').attr(\'disabled\',\'disabled\').val(\'\');">';
$content .= '<input type="text" name="url" id="url" size="20" value="" placeholder="' . GedcomTag::getLabel('URL') . '" disabled> ';
$content .= '<input type="text" name="favtitle" id="favtitle" size="20" value="" placeholder="' . I18N::translate('Title') . '" disabled>';
$content .= '<p>' . I18N::translate('Enter an optional note about this favorite') . '</p>';
$content .= '<textarea name="favnote" rows="6" cols="50"></textarea>';
$content .= '</div>';
$content .= '<input type="submit" value="' . I18N::translate('Add') . '">';
$content .= '</form></div>';
}
if ($template) {
if ($block) {
$class .= ' small_inner_block';
}
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
}
}
示例2:
echo FunctionsPrint::printFindIndividualLink('gid2');
?>
<?php
echo FunctionsPrint::printFindFamilyLink('gid2');
?>
<?php
echo FunctionsPrint::printFindSourceLink('gid2');
?>
<?php
echo FunctionsPrint::printFindRepositoryLink('gid2');
?>
<?php
echo FunctionsPrint::printFindMediaLink('gid2');
?>
<?php
echo FunctionsPrint::printFindNoteLink('gid2');
?>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary">
<?php
echo I18N::translate('continue');
?>
</button>
</div>
</div>
</form>
示例3: addSimpleTag
//.........这里部分代码省略.........
foreach ($matches[1] as $match) {
if (!in_array($match, explode('|', WT_EVENTS_DEAT))) {
echo ' <label><input type="checkbox" name="SOUR_', $match, '" ', $level2_checked, ' value="1">', GedcomTag::getLabel($match), '</label>';
}
}
}
}
if (strpos($bdm, 'D') !== false) {
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
foreach ($matches[1] as $match) {
if (in_array($match, explode('|', WT_EVENTS_DEAT))) {
echo ' <label><input type="checkbox" name="SOUR_', $match, '"', $level2_checked, ' value="1">', GedcomTag::getLabel($match), '</label>';
}
}
}
}
if (strpos($bdm, 'M') !== false) {
echo ' <label><input type="checkbox" name="SOUR_FAM" ', $level1_checked, ' value="1">', I18N::translate('Family'), '</label>';
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) {
foreach ($matches[1] as $match) {
echo ' <label><input type="checkbox" name="SOUR_', $match, '"', $level2_checked, ' value="1">', GedcomTag::getLabel($match), '</label>';
}
}
}
}
break;
case 'REPO':
echo FunctionsPrint::printFindRepositoryLink($element_id), ' ', self::printAddNewRepositoryLink($element_id);
break;
case 'NOTE':
// Shared Notes Icons ========================================
if ($islink) {
// Print regular Shared Note icons ---------------------------
echo ' ', FunctionsPrint::printFindNoteLink($element_id, $element_id . '_description'), ' ', self::printAddNewNoteLink($element_id);
if ($value) {
echo ' ', self::printEditNoteLink($value);
}
}
break;
case 'OBJE':
echo FunctionsPrint::printFindMediaLink($element_id, '1media');
if (!$value) {
echo ' ', self::printAddNewMediaLink($element_id);
$value = 'new';
}
break;
}
echo '<div id="' . $element_id . '_description">';
// current value
if ($fact === 'DATE') {
$date = new Date($value);
echo $date->display();
}
if (($fact === 'ASSO' || $fact === '_ASSO') && $value === '') {
if ($level === 1) {
echo '<p class="small text-muted">' . I18N::translate('An associate is another individual who was involved with this individual, such as a friend or an employer.') . '</p>';
} else {
echo '<p class="small text-muted">' . I18N::translate('An associate is another individual who was involved with this fact or event, such as a witness or a priest.') . '</p>';
}
}
if ($value && $value !== 'new' && $islink) {
switch ($fact) {
case 'ALIA':
case 'ASSO':
case '_ASSO':
$tmp = Individual::getInstance($value, $WT_TREE);