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


PHP Module::isActiveChart方法代码示例

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


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

示例1: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     global $WT_TREE;
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = '<span dir="auto">' . I18N::translate('Welcome %s', Auth::user()->getRealNameHtml()) . '</span>';
     $content = '<table><tr>';
     $content .= '<td><a href="edituser.php"><i class="icon-mypage"></i><br>' . I18N::translate('My account') . '</a></td>';
     $gedcomid = $WT_TREE->getUserPreference(Auth::user(), 'gedcomid');
     if ($gedcomid) {
         if (Module::isActiveChart($WT_TREE, 'pedigree_chart')) {
             $content .= '<td><a href="pedigree.php?rootid=' . $gedcomid . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-pedigree"></i><br>' . I18N::translate('My pedigree') . '</a></td>';
         }
         $content .= '<td><a href="individual.php?pid=' . $gedcomid . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-indis"></i><br>' . I18N::translate('My individual record') . '</a></td>';
     }
     $content .= '</tr></table>';
     if ($template) {
         return Theme::theme()->formatBlock($id, $title, $class, $content);
     } else {
         return $content;
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:UserWelcomeModule.php

示例2: getBlock

 /**
  * Generate the HTML content of this block.
  *
  * @param int      $block_id
  * @param bool     $template
  * @param string[] $cfg
  *
  * @return string
  */
 public function getBlock($block_id, $template = true, $cfg = array())
 {
     global $controller, $WT_TREE;
     $indi_xref = $controller->getSignificantIndividual()->getXref();
     $id = $this->getName() . $block_id;
     $class = $this->getName() . '_block';
     $title = $WT_TREE->getTitleHtml();
     $content = '<table><tr>';
     if (Module::isActiveChart($WT_TREE, 'pedigree_chart')) {
         $content .= '<td><a href="pedigree.php?rootid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . '</a></td>';
     }
     $content .= '<td><a href="individual.php?pid=' . $indi_xref . '&amp;ged=' . $WT_TREE->getNameUrl() . '"><i class="icon-indis"></i><br>' . I18N::translate('Default individual') . '</a></td>';
     if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
         $content .= '<td><a href="' . WT_LOGIN_URL . '?action=register"><i class="icon-user_add"></i><br>' . I18N::translate('Request a new user account') . '</a></td>';
     }
     $content .= "</tr>";
     $content .= "</table>";
     if ($template) {
         return Theme::theme()->formatBlock($id, $title, $class, $content);
     } else {
         return $content;
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:32,代码来源:WelcomeBlockModule.php

示例3: AncestryController

/**
 * Defined in session.php
 *
 * @global Tree $WT_TREE
 */
global $WT_TREE;
use Fisharebest\Webtrees\Controller\AncestryController;
use Fisharebest\Webtrees\Functions\FunctionsCharts;
use Fisharebest\Webtrees\Functions\FunctionsEdit;
use Fisharebest\Webtrees\Functions\FunctionsPrint;
use Fisharebest\Webtrees\Functions\FunctionsPrintLists;
define('WT_SCRIPT_NAME', 'ancestry.php');
require './includes/session.php';
$MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS');
$controller = new AncestryController();
$controller->restrictAccess(Module::isActiveChart($WT_TREE, 'ancestors_chart'))->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();');
?>
<div id="ancestry-page">
	<h2><?php 
echo $controller->getPageTitle();
?>
</h2>
	<form name="people" id="people" method="get" action="?">
		<input type="hidden" name="ged" value="<?php 
echo $WT_TREE->getNameHtml();
?>
">
		<table class="list_table">
			<tbody>
				<tr>
					<td class="descriptionbox">
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:ancestry.php

示例4: PedigreeController

 */
namespace Fisharebest\Webtrees;

/**
 * Defined in session.php
 *
 * @global Tree $WT_TREE
 */
global $WT_TREE;
use Fisharebest\Webtrees\Controller\PedigreeController;
use Fisharebest\Webtrees\Functions\FunctionsEdit;
use Fisharebest\Webtrees\Functions\FunctionsPrint;
define('WT_SCRIPT_NAME', 'pedigree.php');
require './includes/session.php';
$controller = new PedigreeController();
$controller->restrictAccess(Module::isActiveChart($WT_TREE, 'pedigree_chart'))->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('
	(function() {
		autocomplete();

		jQuery("#childarrow").on("click", ".menuselect", function(e) {
			e.preventDefault();
			jQuery("#childbox").slideToggle("fast");
		});

		jQuery("#pedigree_chart")
			.width(' . $controller->chartsize['x'] . ')
			.height(' . $controller->chartsize['y'] . ');

		// Set variables
		var p0, p1, p2,  // Holds the ids of the boxes used in the join calculations
			canvas       = jQuery("#pedigree_canvas"),
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:pedigree.php

示例5: menuMyPedigree

 /**
  * A link to the user's individual record.
  *
  * @return Menu|null
  */
 protected function menuMyPedigree()
 {
     $gedcomid = $this->tree->getUserPreference(Auth::user(), 'gedcomid');
     if ($gedcomid && Module::isActiveChart($this->tree, 'pedigree_chart')) {
         $showFull = $this->tree->getPreference('PEDIGREE_FULL_DETAILS') ? 1 : 0;
         $showLayout = $this->tree->getPreference('PEDIGREE_LAYOUT') ? 1 : 0;
         return new Menu(I18N::translate('My pedigree'), 'pedigree.php?' . $this->tree_url . '&amp;rootid=' . $gedcomid . '&amp;show_full=' . $showFull . '&amp;talloffset=' . $showLayout, 'menu-mypedigree');
     } else {
         return null;
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:16,代码来源:AbstractTheme.php

示例6: LifespanController

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
namespace Fisharebest\Webtrees;

use Fisharebest\Webtrees\Controller\LifespanController;
use Fisharebest\Webtrees\Functions\FunctionsPrint;
define('WT_SCRIPT_NAME', 'lifespan.php');
require './includes/session.php';
global $WT_TREE;
$controller = new LifespanController();
$controller->restrictAccess(Module::isActiveChart($WT_TREE, 'lifespans_chart'))->pageHeader()->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL);
?>
<div id="lifespan-page">
	<h2><?php 
echo I18N::translate('Lifespans');
?>
</h2>

	<form>
		<table class="list_table">
			<tbody>
				<tr>
					<th class="descriptionbox" colspan="4">
						<?php 
echo I18N::translate('Select individuals by place or date');
?>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:lifespan.php

示例7: RelationshipController

use Fisharebest\Webtrees\Functions\FunctionsEdit;
use Fisharebest\Webtrees\Functions\FunctionsPrint;
use Fisharebest\Webtrees\Module\RelationshipsChartModule;
define('WT_SCRIPT_NAME', 'relationship.php');
require './includes/session.php';
$max_recursion = $WT_TREE->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION);
$ancestors_only = $WT_TREE->getPreference('RELATIONSHIP_ANCESTORS', RelationshipsChartModule::DEFAULT_ANCESTORS);
$controller = new RelationshipController();
$pid1 = Filter::get('pid1', WT_REGEX_XREF);
$pid2 = Filter::get('pid2', WT_REGEX_XREF);
$show_full = Filter::getInteger('show_full', 0, 1, $WT_TREE->getPreference('PEDIGREE_FULL_DETAILS'));
$recursion = Filter::getInteger('recursion', 0, $max_recursion, 0);
$ancestors = Filter::getInteger('ancestors', 0, 1, 0);
$person1 = Individual::getInstance($pid1, $WT_TREE);
$person2 = Individual::getInstance($pid2, $WT_TREE);
$controller->restrictAccess(Module::isActiveChart($WT_TREE, 'relationships_chart'))->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('autocomplete();');
if ($person1 && $person2) {
    $controller->setPageTitle(I18N::translate('Relationships between %1$s and %2$s', $person1->getFullName(), $person2->getFullName()))->pageHeader();
    $paths = $controller->calculateRelationships($person1, $person2, $recursion, (bool) $ancestors);
} else {
    $controller->setPageTitle(I18N::translate('Relationships'))->pageHeader();
    $paths = array();
}
?>
<h2><?php 
echo $controller->getPageTitle();
?>
</h2>
<form name="people" method="get" action="?">
	<input type="hidden" name="ged" value="<?php 
echo $WT_TREE->getNameHtml();
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:relationship.php

示例8: PageController

 * Defined in session.php
 *
 * @global Tree $WT_TREE
 */
global $WT_TREE;
use Fisharebest\Webtrees\Controller\AjaxController;
use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\Functions\FunctionsPrint;
define('WT_SCRIPT_NAME', 'statistics.php');
require './includes/session.php';
// check for on demand content loading
$tab = Filter::getInteger('tab', 0, 3);
$ajax = Filter::getBool('ajax');
if (!$ajax) {
    $controller = new PageController();
    $controller->restrictAccess(Module::isActiveChart($WT_TREE, 'statistics_chart'))->setPageTitle(I18N::translate('Statistics'))->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL)->addInlineJavascript('
			jQuery("#statistics_chart").css("visibility", "visible");
			jQuery("#statistics_chart").tabs({
				load: function() {
					jQuery("#loading-indicator").removeClass("loading-image");
				},
				beforeLoad: function(event, ui) {
					// Only load each tab once
					if (ui.tab.data("loaded")) {
						event.preventDefault();
						return;
					}
					else {
						jQuery("#loading-indicator").addClass("loading-image");
					}
					ui.jqXHR.success(function() {
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:statistics.php


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