当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionsPrint::printFindIndividualLink方法代码示例

本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsPrint::printFindIndividualLink方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsPrint::printFindIndividualLink方法的具体用法?PHP FunctionsPrint::printFindIndividualLink怎么用?PHP FunctionsPrint::printFindIndividualLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fisharebest\Webtrees\Functions\FunctionsPrint的用法示例。


在下文中一共展示了FunctionsPrint::printFindIndividualLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

							size="12"
							name="gedcomid<?php 
            echo $tree->getTreeId();
            ?>
"
							id="gedcomid<?php 
            echo $tree->getTreeId();
            ?>
"
							value="<?php 
            echo Filter::escapeHtml($tree->getUserPreference($user, 'gedcomid'));
            ?>
"
						>
						<?php 
            echo FunctionsPrint::printFindIndividualLink('gedcomid' . $tree->getTreeId(), '', $tree);
            ?>
					</td>
					<td>
						<select name="RELATIONSHIP_PATH_LENGTH<?php 
            echo $tree->getTreeId();
            ?>
" id="RELATIONSHIP_PATH_LENGTH<?php 
            echo $tree->getTreeId();
            ?>
" class="relpath">
							<?php 
            for ($n = 0; $n <= 10; ++$n) {
                ?>
							<option value="<?php 
                echo $n;
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:admin_users.php

示例2:

		<table class="list_table">
			<tbody>
				<tr>
					<td class="descriptionbox">
						<label for="rootid"><?php 
echo I18N::translate('Individual');
?>
</label>
					</td>
					<td class="optionbox">
						<input class="pedigree_form" data-autocomplete-type="INDI" type="text" name="rootid" id="rootid" size="3" value="<?php 
echo $controller->root->getXref();
?>
">
						<?php 
echo FunctionsPrint::printFindIndividualLink('rootid');
?>
					</td>
					<td rowspan="3" class="descriptionbox">
						<label><?php 
echo I18N::translate('Layout');
?>
</label>
					</td>
					<td rowspan="3" class="optionbox">
						<div>
							<label>
								<input type="radio" name="chart_style" value="0" onclick="statusDisable('cousins');" <?php 
echo $controller->chart_style == 0 ? 'checked' : '';
?>
>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:ancestry.php

示例3: pedigreeMap

    /**
     * Display a map showing the originas of ones ancestors.
     */
    private function pedigreeMap()
    {
        global $controller, $WT_TREE;
        $MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
        $controller = new ChartController();
        $this->generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'), $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
        $this->treesize = pow(2, $this->generations) - 1;
        $this->ancestors = array_values($controller->sosaAncestors($this->generations));
        // Start of internal configuration variables
        // Limit this to match available number of icons.
        // 8 generations equals 255 individuals
        $MAX_PEDIGREE_GENERATIONS = min($MAX_PEDIGREE_GENERATIONS, 8);
        // End of internal configuration variables
        $controller->setPageTitle(I18N::translate('Pedigree map of %s', $controller->root->getFullName()))->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();');
        echo '<link type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'googlemap/css/wt_v3_googlemap.css" rel="stylesheet">';
        echo '<div id="pedigreemap-page">
				<h2>', $controller->getPageTitle(), '</h2>';
        // -- print the form to change the number of displayed generations
        ?>
		<form name="people" method="get" action="?">
			<input type="hidden" name="ged" value="<?php 
        echo $WT_TREE->getNameHtml();
        ?>
">
			<input type="hidden" name="mod" value="googlemap">
			<input type="hidden" name="mod_action" value="pedigree_map">
			<table class="list_table" width="555">
				<tr>
					<td class="descriptionbox wrap">
						<?php 
        echo I18N::translate('Individual');
        ?>
					</td>
					<td class="optionbox">
						<input class="pedigree_form" data-autocomplete-type="INDI" type="text" id="rootid" name="rootid" size="3" value="<?php 
        echo $controller->root->getXref();
        ?>
">
						<?php 
        echo FunctionsPrint::printFindIndividualLink('rootid');
        ?>
					</td>
					<td class="topbottombar" rowspan="2">
						<input type="submit" value="<?php 
        echo I18N::translate('View');
        ?>
">
					</td>
				</tr>
				<tr>
					<td class="descriptionbox wrap">
						<?php 
        echo I18N::translate('Generations');
        ?>
					</td>
					<td class="optionbox">
						<select name="PEDIGREE_GENERATIONS">
						<?php 
        for ($p = 3; $p <= $MAX_PEDIGREE_GENERATIONS; $p++) {
            echo '<option value="', $p, '" ';
            if ($p == $this->generations) {
                echo 'selected';
            }
            echo '>', $p, '</option>';
        }
        ?>
						</select>
					</td>
				</tr>
			</table>
		</form>
		<!-- end of form -->

		<!-- count records by type -->
		<?php 
        $curgen = 1;
        $priv = 0;
        $count = 0;
        $miscount = 0;
        $missing = '';
        $latlongval = array();
        $lat = array();
        $lon = array();
        for ($i = 0; $i < $this->treesize; $i++) {
            // -- check to see if we have moved to the next generation
            if ($i + 1 >= pow(2, $curgen)) {
                $curgen++;
            }
            $person = $this->ancestors[$i];
            if (!empty($person)) {
                $name = $person->getFullName();
                if ($name == I18N::translate('Private')) {
                    $priv++;
                }
                $place = $person->getBirthPlace();
                if (empty($place)) {
                    $latlongval[$i] = null;
//.........这里部分代码省略.........
开发者ID:bxbroze,项目名称:webtrees,代码行数:101,代码来源:GoogleMapsModule.php

示例4:

        ?>
">
			<?php 
        echo Filter::getCsrf();
        ?>
			<table class="facts_table">
				<tr>
					<td class="facts_label">
						<?php 
        echo $label;
        ?>
					</td>
					<td class="facts_value">
						<input data-autocomplete-type="INDI" id="spouseid" type="text" name="spid" size="8">
						<?php 
        echo FunctionsPrint::printFindIndividualLink('spouseid');
        ?>
					</td>
				</tr>
				<?php 
        FunctionsEdit::addSimpleTag('0 MARR Y');
        ?>
				<?php 
        FunctionsEdit::addSimpleTag('0 DATE', 'MARR');
        ?>
				<?php 
        FunctionsEdit::addSimpleTag('0 PLAC', 'MARR');
        ?>
				<?php 
        echo keep_chan($person);
        ?>
开发者ID:jflash,项目名称:webtrees,代码行数:31,代码来源:edit_interface.php

示例5: modAction


//.........这里部分代码省略.........
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				<?php 
                    }
                }
                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;
开发者ID:josefpavlik,项目名称:webtrees,代码行数:67,代码来源:ClippingsCartModule.php

示例6: elseif

echo '<form method="post" name="newmedia" action="addmedia.php" enctype="multipart/form-data">';
echo '<input type="hidden" name="action" value="', $action, '">';
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 {
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:addmedia.php

示例7:

?>
						</label>
					</td>
					<td class="optionbox" colspan="3">
						<input id="place" data-autocomplete-type="PLAC" type="text" size="30" name="place">
					</td>
					<td class="optionbox">
						<label for="newpid">
							<?php 
echo I18N::translate('Individual');
?>
						</label>
					</td>
					<td class="optionbox">
						<input id="newpid" class="pedigree_form" data-autocomplete-type="INDI" type="text" size="5" name="newpid"><?php 
echo FunctionsPrint::printFindIndividualLink('newpid');
?>

					</td>
				</tr>
				<tr>
					<td class="optionbox">
						<label for="beginYear">
							<?php 
echo I18N::translate('Start year');
?>
						</label>
					</td>
					<td class="optionbox">
						<input id="beginYear" type="text" name="beginYear" size="5">
					</td>
开发者ID:bxbroze,项目名称:webtrees,代码行数:31,代码来源:lifespan.php

示例8: jQuery

">
				</td>
			</tr>
			<tr>
				<td class="descriptionbox">
					<?php 
echo I18N::translate('Individual 2');
?>
				</td>
				<td class="optionbox">
					<input class="pedigree_form" data-autocomplete-type="INDI" type="text" name="pid2" id="pid2" size="3" value="<?php 
echo $pid2;
?>
">
					<?php 
echo FunctionsPrint::printFindIndividualLink('pid2');
?>
					<br>
					<a href="#" onclick="var x = jQuery('#pid1').val(); jQuery('#pid1').val(jQuery('#pid2').val()); jQuery('#pid2').val(x); return false;"><?php 
echo I18N::translate('Swap individuals');
?>
</a>
				</td>
				<td class="optionbox">
					<label>
						<input type="radio" name="find_all" value="0" <?php 
echo $find_all ? '' : 'checked';
?>
>
						<?php 
echo I18N::translate('Find the closest relationships');
开发者ID:josefpavlik,项目名称:webtrees,代码行数:31,代码来源:relationship.php

示例9:

     }
 } else {
     echo '<input data-autocomplete-type="OBJE" type="text" name="mediaid" id="mediaid" size="5">';
     echo ' ', FunctionsPrint::printFindMediaLink('mediaid', '1media');
     echo '</td></tr>';
 }
 if (!isset($linktoid)) {
     $linktoid = '';
 }
 echo '<tr><td class="descriptionbox">';
 if ($linkto == "person") {
     echo I18N::translate('Individual'), "</td>";
     echo '<td class="optionbox wrap">';
     if ($linktoid == "") {
         echo '<input class="pedigree_form" type="text" name="linktoid" id="linktopid" size="3" value="', $linktoid, '"> ';
         echo FunctionsPrint::printFindIndividualLink('linktopid');
     } else {
         $record = Individual::getInstance($linktoid, $WT_TREE);
         echo $record->formatList('span', false, $record->getFullName());
     }
 }
 if ($linkto == "family") {
     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());
     }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:inverselink.php

示例10: configureBlock

    /**
     * An HTML form to edit block settings
     *
     * @param int $block_id
     */
    public function configureBlock($block_id)
    {
        global $WT_TREE, $controller;
        $PEDIGREE_ROOT_ID = $WT_TREE->getPreference('PEDIGREE_ROOT_ID');
        $gedcomid = $WT_TREE->getUserPreference(Auth::user(), 'gedcomid');
        if (Filter::postBool('save') && Filter::checkCsrf()) {
            $this->setBlockSetting($block_id, 'details', Filter::postBool('details'));
            $this->setBlockSetting($block_id, 'type', Filter::post('type', 'pedigree|descendants|hourglass|treenav', 'pedigree'));
            $this->setBlockSetting($block_id, 'pid', Filter::post('pid', WT_REGEX_XREF));
        }
        $details = $this->getBlockSetting($block_id, 'details', '0');
        $type = $this->getBlockSetting($block_id, 'type', 'pedigree');
        $pid = $this->getBlockSetting($block_id, 'pid', Auth::check() ? $gedcomid ? $gedcomid : $PEDIGREE_ROOT_ID : $PEDIGREE_ROOT_ID);
        $controller->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();');
        ?>
		<tr>
			<td class="descriptionbox wrap width33"><?php 
        echo I18N::translate('Chart type');
        ?>
</td>
			<td class="optionbox">
				<?php 
        echo FunctionsEdit::selectEditControl('type', array('pedigree' => I18N::translate('Pedigree'), 'descendants' => I18N::translate('Descendants'), 'hourglass' => I18N::translate('Hourglass chart'), 'treenav' => I18N::translate('Interactive tree')), null, $type);
        ?>
			</td>
		</tr>
		<tr>
			<td class="descriptionbox wrap width33"><?php 
        echo I18N::translate('Show details');
        ?>
</td>
		<td class="optionbox">
			<?php 
        echo FunctionsEdit::editFieldYesNo('details', $details);
        ?>
			</td>
		</tr>
		<tr>
			<td class="descriptionbox wrap width33"><?php 
        echo I18N::translate('Individual');
        ?>
</td>
			<td class="optionbox">
				<input data-autocomplete-type="INDI" type="text" name="pid" id="pid" value="<?php 
        echo $pid;
        ?>
" size="5">
				<?php 
        echo FunctionsPrint::printFindIndividualLink('pid');
        $root = Individual::getInstance($pid, $WT_TREE);
        if ($root) {
            echo ' <span class="list_item">', $root->getFullName(), $root->formatFirstMajorFact(WT_EVENTS_BIRT, 1), '</span>';
        }
        ?>
			</td>
		</tr>
		<?php 
    }
开发者ID:josefpavlik,项目名称:webtrees,代码行数:63,代码来源:ChartsBlockModule.php

示例11: edit


//.........这里部分代码省略.........
                ?>
&amp;mod_action=admin_edit">
					<?php 
                echo Filter::getCsrf();
                ?>
					<input type="hidden" name="save" value="1">
					<input type="hidden" name="block_id" value="<?php 
                echo $block_id;
                ?>
">
					<input type="hidden" name="gedcom_id" value="<?php 
                echo $WT_TREE->getTreeId();
                ?>
">

					<div class="form-group">
						<label for="title" class="col-sm-3 control-label">
							<?php 
                echo I18N::translate('Story title');
                ?>
						</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" name="title" id="title" value="<?php 
                echo Filter::escapeHtml($title);
                ?>
">
						</div>
					</div>

					<div class="form-group">
						<label for="story_body" class="col-sm-3 control-label">
							<?php 
                echo I18N::translate('Story');
                ?>
						</label>
						<div class="col-sm-9">
							<textarea name="story_body" id="story_body" class="html-edit form-control" rows="10"><?php 
                echo Filter::escapeHtml($story_body);
                ?>
</textarea>
						</div>
					</div>

					<div class="form-group">
						<label for="xref" class="col-sm-3 control-label">
							<?php 
                echo I18N::translate('Individual');
                ?>
						</label>
						<div class="col-sm-9">
							<input data-autocomplete-type="INDI" type="text" name="xref" id="xref" size="4" value="<?php 
                echo $xref;
                ?>
">
							<?php 
                echo FunctionsPrint::printFindIndividualLink('xref');
                ?>
							<?php 
                if ($individual) {
                    ?>
								<?php 
                    echo $individual->formatList('span');
                    ?>
							<?php 
                }
                ?>
						</div>
					</div>

					<div class="form-group">
						<label for="xref" class="col-sm-3 control-label">
							<?php 
                echo I18N::translate('Show this block for which languages?');
                ?>
						</label>
						<div class="col-sm-9">
							<?php 
                echo FunctionsEdit::editLanguageCheckboxes('lang', explode(',', $this->getBlockSetting($block_id, 'languages')));
                ?>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-9">
							<button type="submit" class="btn btn-primary">
								<i class="fa fa-check"></i>
								<?php 
                echo I18N::translate('save');
                ?>
							</button>
						</div>
					</div>

				</form>
				<?php 
            }
        } else {
            header('Location: ' . WT_BASE_URL);
        }
    }
开发者ID:tunandras,项目名称:webtrees,代码行数:101,代码来源:StoriesModule.php

示例12: pedigreeMap

    /**
     * Display a map showing the origins of ones ancestors.
     */
    private function pedigreeMap()
    {
        global $controller, $WT_TREE;
        $MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
        // Limit this to match available number of icons.
        // 8 generations equals 255 individuals
        $MAX_PEDIGREE_GENERATIONS = min($MAX_PEDIGREE_GENERATIONS, 8);
        $controller = new ChartController();
        $generations = Filter::getInteger('PEDIGREE_GENERATIONS', 2, $MAX_PEDIGREE_GENERATIONS, $WT_TREE->getPreference('DEFAULT_PEDIGREE_GENERATIONS'));
        $this->treesize = pow(2, $generations) - 1;
        $this->ancestors = array_values($controller->sosaAncestors($generations));
        $controller->setPageTitle(I18N::translate('Pedigree map of %s', $controller->root->getFullName()))->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript("\n\t\t\t\tjQuery('head').prepend('<link type=\"text/css\" href =\"" . WT_STATIC_URL . WT_MODULES_DIR . "googlemap/css/wt_v3_googlemap.css\" rel=\"stylesheet\">');\n\t\t\t\tautocomplete();" . $this->pedigreeMapJavascript());
        echo '<div id="pedigreemap-page"><h2>', $controller->getPageTitle(), '</h2>';
        // -- print the form to change the number of displayed generations
        ?>
		<form name="people" method="get" action="?">
			<input type="hidden" name="ged" value="<?php 
        echo $WT_TREE->getNameHtml();
        ?>
">
			<input type="hidden" name="mod" value="googlemap">
			<input type="hidden" name="mod_action" value="pedigree_map">
			<table class="list_table">
				<tr>
					<td class="descriptionbox wrap">
						<label for="rootid">
							<?php 
        echo I18N::translate('Individual');
        ?>
						</label>
					</td>
					<td class="optionbox">
						<input class="pedigree_form" data-autocomplete-type="INDI" type="text" id="rootid" name="rootid" size="3" value="<?php 
        echo $controller->root->getXref();
        ?>
">
						<?php 
        echo FunctionsPrint::printFindIndividualLink('rootid');
        ?>
					</td>
					<td class="topbottombar" rowspan="2">
						<input type="submit" value="<?php 
        echo I18N::translate('view');
        ?>
">
					</td>
				</tr>
				<tr>
					<td class="descriptionbox wrap">
						<label for="PEDIGREE_GENERATIONS">
							<?php 
        echo I18N::translate('Generations');
        ?>
						</label>
					</td>
					<td class="optionbox">
						<select name="PEDIGREE_GENERATIONS" id="PEDIGREE_GENERATIONS">
						<?php 
        for ($p = 3; $p <= $MAX_PEDIGREE_GENERATIONS; $p++) {
            echo '<option value="', $p, '" ';
            if ($p == $generations) {
                echo 'selected';
            }
            echo '>', $p, '</option>';
        }
        ?>
						</select>
					</td>
				</tr>
			</table>
		</form>
		<!-- end of form -->

		<!-- count records by type -->
		<?php 
        $curgen = 1;
        $priv = 0;
        $count = 0;
        $miscount = 0;
        $missing = array();
        $latlongval = array();
        $lat = array();
        $lon = array();
        for ($i = 0; $i < $this->treesize; $i++) {
            // -- check to see if we have moved to the next generation
            if ($i + 1 >= pow(2, $curgen)) {
                $curgen++;
            }
            $person = $this->ancestors[$i];
            if (!empty($person)) {
                $name = $person->getFullName();
                if ($name == I18N::translate('Private')) {
                    $priv++;
                }
                $place = $person->getBirthPlace();
                if (empty($place)) {
                    $latlongval[$i] = null;
//.........这里部分代码省略.........
开发者ID:tronsmit,项目名称:webtrees,代码行数:101,代码来源:GoogleMapsModule.php

示例13: 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 . '&amp;ged=' . $WT_TREE->getNameHtml() . '&amp;action=deletefav&amp;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;
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:101,代码来源:FamilyTreeFavoritesModule.php

示例14: addSimpleTag


//.........这里部分代码省略.........
         echo '<select id="', $element_id, '_sel" onchange="document.getElementById(\'', $element_id, '\').value=this.value;" >';
         foreach (array('Unknown', 'Civil', 'Religious', 'Partners') as $key) {
             if ($key === 'Unknown') {
                 echo '<option value="" ';
             } else {
                 echo '<option value="', $key, '" ';
             }
             $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) {
开发者ID:josefpavlik,项目名称:webtrees,代码行数:67,代码来源:FunctionsEdit.php

示例15: renderContent

    /**
     * {@inhericDoc}
     * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent()
     */
    protected function renderContent()
    {
        ?>
        
        
        <div id="maj-sosa-config-page">
			<h2><?php 
        echo $this->data->get('title');
        ?>
</h2>
			
			<form name="maj-sosa-config-form" method="post" action="<?php 
        echo $this->data->get('form_url');
        ?>
">
				<input type="hidden" name="action" value="update">
				<?php 
        echo Filter::getCsrf();
        ?>
				<div id="maj-sosa-config-page-table">
					<div class="label">
        				<?php 
        echo I18N::translate('Tree');
        ?>
        			</div>
        			<div class="value">
    					<label><?php 
        echo $this->data->get('tree')->getTitleHtml();
        ?>
</label>
        			</div>
        			<div class="label">
        				<?php 
        echo I18N::translate('For user');
        ?>
        			</div>
        			<div class="value">
        				<?php 
        $users = $this->data->get('users_settings');
        if (count($users) == 1) {
            $root_indi = $users[0]['rootid'];
            ?>
        					<label>
        						<input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php 
            echo $users[0]['user']->getUserId();
            ?>
" />
        						<?php 
            echo $users[0]['user']->getRealNameHtml();
            ?>
        					</label>
        				<?php 
        } else {
            if (count($users) > 1) {
                ?>
        					<select id='maj-sosa-config-select' name="userid">
        					<?php 
                $root_indi = $users[0]['rootid'];
                foreach ($this->data->get('users_settings') as $user) {
                    ?>
        						<option value="<?php 
                    echo $user['user']->getUserId();
                    ?>
"><?php 
                    echo $user['user']->getRealNameHtml();
                    ?>
</option>
        					<?php 
                }
                ?>
        					</select>
        				<?php 
            }
        }
        ?>
        			</div>
        			<div class="label">
        				<?php 
        echo I18N::translate('Root individual');
        ?>
        			</div>
        			<div class="value">
        				<input data-autocomplete-type="INDI" type="text" name="rootid" id="rootid" size="3" value="<?php 
        echo $root_indi;
        ?>
">
						<?php 
        echo FunctionsPrint::printFindIndividualLink('rootid');
        ?>
        			</div>
        			<div class="label"></div>
        			<div class="value">
        				<input type="submit" value="<?php 
        echo I18N::translate('Save');
        ?>
">
//.........这里部分代码省略.........
开发者ID:jon48,项目名称:webtrees-lib,代码行数:101,代码来源:SosaConfigView.php


注:本文中的Fisharebest\Webtrees\Functions\FunctionsPrint::printFindIndividualLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。