本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsPrint::printFindSourceLink方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsPrint::printFindSourceLink方法的具体用法?PHP FunctionsPrint::printFindSourceLink怎么用?PHP FunctionsPrint::printFindSourceLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Functions\FunctionsPrint
的用法示例。
在下文中一共展示了FunctionsPrint::printFindSourceLink方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modAction
//.........这里部分代码省略.........
}
}
if (!$cart[$WT_TREE->getTreeId()]) {
if ($clip_ctrl->action != 'add') {
echo I18N::translate('The clippings cart allows you to take extracts (“clippings”) from this family tree and bundle them up into a single file for downloading and subsequent importing into your own genealogy program. The downloadable file is recorded in GEDCOM format.<br><ul><li>How to take clippings?<br>This is really simple. Whenever you see a clickable name (individual, family, or source) you can go to the Details page of that name. There you will see the <b>Add to clippings cart</b> option. When you click that link you will be offered several options to download.</li><li>How to download?<br>Once you have items in your cart, you can download them just by clicking the “Download” link. Follow the instructions and links.</li></ul>');
?>
<form method="get" name="addin" action="module.php">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
<table>
<thead>
<tr>
<td colspan="2" class="topbottombar">
<?php
echo I18N::translate('Add to the clippings cart');
?>
</td>
</tr>
</thead>
<tbody>
<tr>
<td class="optionbox">
<input type="hidden" name="action" value="add">
<input type="text" data-autocomplete-type="IFSRO" name="id" id="cart_item_id" size="5">
</td>
<td class="optionbox">
<?php
echo FunctionsPrint::printFindIndividualLink('cart_item_id');
?>
<?php
echo FunctionsPrint::printFindFamilyLink('cart_item_id');
?>
<?php
echo FunctionsPrint::printFindSourceLink('cart_item_id', '');
?>
<input type="submit" value="<?php
echo I18N::translate('Add');
?>
">
</td>
</tr>
</tbody>
</table>
</form>
<?php
}
// -- end new lines
echo I18N::translate('Your clippings cart is empty.');
} else {
// Keep track of the INDI from the parent page, otherwise it will
// get lost after ajax updates
$pid = Filter::get('pid', WT_REGEX_XREF);
if ($clip_ctrl->action !== 'download' && $clip_ctrl->action !== 'add') {
?>
<form method="get" action="module.php">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
<input type="hidden" name="action" value="download">
<input type="hidden" name="pid" value="<?php
echo $pid;
?>
">
<table>
<tr>
<td colspan="2" class="topbottombar">
<h2><?php
示例2: elseif
echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
echo '<input type="hidden" name="pid" value="', $pid, '">';
if ($linktoid) {
echo '<input type="hidden" name="linktoid" value="', $linktoid, '">';
}
echo '<table class="facts_table">';
echo '<tr><td class="topbottombar" colspan="2">';
echo $controller->getPageTitle(), FunctionsPrint::helpLink('OBJE');
echo '</td></tr>';
if (!$linktoid && $action == 'create') {
echo '<tr><td class="descriptionbox wrap width25">';
echo I18N::translate('Enter an individual, family, or source ID');
echo '</td><td class="optionbox wrap"><input type="text" data-autocomplete-type="IFS" name="linktoid" id="linktoid" size="6" value="">';
echo ' ', FunctionsPrint::printFindIndividualLink('linktoid');
echo ' ', FunctionsPrint::printFindFamilyLink('linktoid');
echo ' ', FunctionsPrint::printFindSourceLink('linktoid');
echo '<p class="small text-muted">', I18N::translate('Enter or search for the ID of the individual, family, or source to which this media object should be linked.'), '</p></td></tr>';
}
if ($media) {
$gedrec = $media->getGedcom();
} else {
$gedrec = '';
}
// 1 FILE
if (preg_match('/\\n\\d (FILE.*)/', $gedrec, $match)) {
$gedfile = $match[1];
} elseif ($filename) {
$gedfile = 'FILE ' . $filename;
} else {
$gedfile = 'FILE';
}
示例3:
?>
</label>
</div>
<div class="col-sm-9">
<input data-autocomplete-type="IFSRO" type="text" name="gid2" id="gid2" maxlength="20" value="<?php
echo $gid2;
?>
" >
<?php
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">
示例4: elseif
echo 'selected';
}
echo '>', Filter::escapeHtml($display), '</option>';
}
echo '</select>';
}
if (isset($input['lookup'])) {
echo '<input type="hidden" name="type[', Filter::escapeHtml($input['name']), ']" value="', Filter::escapeHtml($input['lookup']), '">';
if ($input['lookup'] == 'INDI') {
echo FunctionsPrint::printFindIndividualLink('pid');
} elseif ($input['lookup'] == 'PLAC') {
echo FunctionsPrint::printFindPlaceLink($input['name']);
} elseif ($input['lookup'] == 'FAM') {
echo FunctionsPrint::printFindFamilyLink('famid');
} elseif ($input['lookup'] == 'SOUR') {
echo FunctionsPrint::printFindSourceLink($input['name']);
} elseif ($input['lookup'] == 'DATE') {
echo ' <a href="#" onclick="cal_toggleDate(\'div_', Filter::EscapeJs($input['name']), '\', \'', Filter::EscapeJs($input['name']), '\'); return false;" class="icon-button_calendar" title="', I18N::translate('Select a date'), '"></a>';
echo '<div id="div_', Filter::EscapeHtml($input['name']), '" style="position:absolute;visibility:hidden;background-color:white;"></div>';
}
}
echo '</td></tr>';
}
echo '<tr>
<td colspan="2" class="optionbox">
<div class="report-type">
<div>
<label for="PDF"><i class="icon-mime-application-pdf"></i></label>
<p><input type="radio" name="output" value="PDF" id="PDF" checked></p>
</div>
<div>
示例5:
echo I18N::translate('Family'), '</td>';
echo '<td class="optionbox wrap">';
if ($linktoid == "") {
echo '<input class="pedigree_form" type="text" name="linktoid" id="linktofamid" size="3" value="', $linktoid, '"> ';
echo FunctionsPrint::printFindFamilyLink('linktofamid');
} else {
$record = Family::getInstance($linktoid, $WT_TREE);
echo $record->formatList('span', false, $record->getFullName());
}
}
if ($linkto == "source") {
echo I18N::translate('Source'), "</td>";
echo '<td class="optionbox wrap">';
if ($linktoid == "") {
echo '<input class="pedigree_form" type="text" name="linktoid" id="linktosid" size="3" value="', $linktoid, '"> ';
echo FunctionsPrint::printFindSourceLink('linktosid');
} else {
$record = Source::getInstance($linktoid, $WT_TREE);
echo $record->formatList('span', false, $record->getFullName());
}
}
if ($linkto == "repository") {
echo I18N::translate('Repository'), "</td>";
echo '<td class="optionbox wrap">';
if ($linktoid == "") {
echo '<input class="pedigree_form" type="text" name="linktoid" id="linktorid" size="3" value="', $linktoid, '">';
} else {
$record = Repository::getInstance($linktoid, $WT_TREE);
echo $record->formatList('span', false, $record->getFullName());
}
}
示例6: 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;
}
}
示例7: addSimpleTag
//.........这里部分代码省略.........
}
$a = strtolower($key);
$b = strtolower($value);
if ($b !== '' && strpos($a, $b) !== false || strpos($b, $a) !== false) {
echo 'selected';
}
echo '>', GedcomTag::getLabel('MARR_' . strtoupper($key)), '</option>';
}
echo '</select>';
} elseif ($fact === 'TYPE' && $level === 0) {
// NAME TYPE : hide text field and show a selection list
$onchange = 'onchange="document.getElementById(\'' . $element_id . '\').value=this.value;"';
echo self::editFieldNameType($element_name, $value, $onchange, $person);
echo '<script>document.getElementById("', $element_id, '").style.display="none";</script>';
}
// popup links
switch ($fact) {
case 'DATE':
echo self::printCalendarPopup($element_id);
break;
case 'FAMC':
case 'FAMS':
echo FunctionsPrint::printFindFamilyLink($element_id);
break;
case 'ALIA':
case 'ASSO':
case '_ASSO':
echo FunctionsPrint::printFindIndividualLink($element_id, $element_id . '_description');
break;
case 'FILE':
FunctionsPrint::printFindMediaLink($element_id, '0file');
break;
case 'SOUR':
echo FunctionsPrint::printFindSourceLink($element_id, $element_id . '_description'), ' ', self::printAddNewSourceLink($element_id);
//-- checkboxes to apply '1 SOUR' to BIRT/MARR/DEAT as '2 SOUR'
if ($level === 1) {
echo '<br>';
switch ($WT_TREE->getPreference('PREFER_LEVEL2_SOURCES')) {
case '2':
// records
$level1_checked = 'checked';
$level2_checked = '';
break;
case '1':
// facts
$level1_checked = '';
$level2_checked = 'checked';
break;
case '0':
// none
// none
default:
$level1_checked = '';
$level2_checked = '';
break;
}
if (strpos($bdm, 'B') !== false) {
echo ' <label><input type="checkbox" name="SOUR_INDI" ', $level1_checked, ' value="1">', I18N::translate('Individual'), '</label>';
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>';
}
}
}
}