本文整理汇总了PHP中Fisharebest\Webtrees\Controller\PageController::getPageTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP PageController::getPageTitle方法的具体用法?PHP PageController::getPageTitle怎么用?PHP PageController::getPageTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Controller\PageController
的用法示例。
在下文中一共展示了PageController::getPageTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pageBody
private function pageBody(PageController $controller)
{
?>
<!-- ADMIN PAGE CONTENT -->
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<h2><?php
echo $controller->getPageTitle();
?>
</h2>
<form class="form-inline" method="post">
<?php
echo Filter::getCsrf();
?>
<input type="hidden" name="save" value="1">
<!-- SHOW PDF -->
<div class="form-group">
<label class="control-label">
<?php
echo I18N::translate('Access level');
?>
</label>
<?php
echo FunctionsEdit::editFieldAccessLevel('NEW_FTV_PDF_ACCESS_LEVEL', $this->getSetting('FTV_PDF_ACCESS_LEVEL'), 'class="form-control"');
?>
</div>
<!-- BUTTONS -->
<button class="btn btn-primary" type="submit">
<i class="fa fa-check"></i>
<?php
echo I18N::translate('save');
?>
</button>
</form>
<?php
}
示例2: index
/**
* SosaStats@index
*/
public function index()
{
global $WT_TREE;
$controller = new PageController();
$controller->setPageTitle(I18N::translate('Sosa Statistics'))->addInlineJavascript('$(".help_tooltip").tooltip();');
$view_bag = new ViewBag();
$view_bag->set('title', $controller->getPageTitle());
$view_bag->set('is_setup', false);
if ($this->sosa_provider->isSetup()) {
$view_bag->set('is_setup', true);
$view_bag->set('root_indi', $this->sosa_provider->getRootIndi());
$sosaCount = $this->sosa_provider->getSosaCount();
$diffSosaCount = $this->sosa_provider->getDifferentSosaCount();
$general_stats = array('sosa_count' => $sosaCount, 'distinct_count' => $diffSosaCount, 'sosa_rate' => Functions::safeDivision($diffSosaCount, $this->sosa_provider->getTotalIndividuals()), 'pedi_collapse' => 1 - Functions::safeDivision($diffSosaCount, $sosaCount), 'mean_gen_time' => $this->sosa_provider->getMeanGenerationTime());
$view_bag->set('general_stats', $general_stats);
$stats_gen = $this->sosa_provider->getStatisticsByGeneration();
$view_bag->set('missinganc_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=SosaList@missing&ged=' . $WT_TREE->getNameUrl() . '&gen=');
$view_bag->set('sosaanc_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=SosaList&ged=' . $WT_TREE->getNameUrl() . '&gen=');
$gen_theoretical = 1;
$total_theoretical = 0;
$prev_diff = 0;
$prev_known = 0.5;
$gen_equiv = 0;
$generation_stats = array();
foreach ($stats_gen as $gen => $tab) {
$genY1 = I18N::translate('-');
$genY2 = I18N::translate('-');
if ($tab['firstBirth'] > 0) {
$genY1 = $tab['firstBirth'];
}
if ($tab['lastBirth'] > 0) {
$genY2 = $tab['lastBirth'];
}
$total_theoretical += $gen_theoretical;
$perc_sosa_count_theor = Functions::safeDivision($tab['sosaCount'], $gen_theoretical);
$gen_equiv += $perc_sosa_count_theor;
$missing = 2 * $prev_known - $tab['sosaCount'];
$gen_diff = $tab['diffSosaTotalCount'] - $prev_diff;
$generation_stats[$gen] = array('gen_min_birth' => $genY1, 'gen_max_birth' => $genY2, 'theoretical' => $gen_theoretical, 'known' => $tab['sosaCount'], 'perc_known' => $perc_sosa_count_theor, 'missing' => $missing, 'perc_missing' => 1 - Functions::safeDivision($tab['sosaCount'], 2 * $prev_known), 'total_known' => $tab['sosaTotalCount'], 'perc_total_known' => Functions::safeDivision($tab['sosaTotalCount'], $total_theoretical), 'different' => $gen_diff, 'perc_different' => Functions::safeDivision($gen_diff, $tab['sosaCount']), 'total_different' => $tab['diffSosaTotalCount'], 'pedi_collapse' => 1 - Functions::safeDivision($tab['diffSosaTotalCount'], $tab['sosaTotalCount']));
$gen_theoretical = $gen_theoretical * 2;
$prev_known = $tab['sosaCount'];
$prev_diff = $tab['diffSosaTotalCount'];
}
$view_bag->set('generation_stats', $generation_stats);
$view_bag->set('equivalent_gen', $gen_equiv);
$view_bag->set('chart_img_g2', $this->htmlAncestorDispersionG2());
$view_bag->set('chart_img_g3', $this->htmlAncestorDispersionG3());
}
ViewFactory::make('SosaStats', $this, $controller, $view_bag)->render();
}
示例3: index
/**
* AdminConfig@index
*/
public function index()
{
global $WT_TREE;
$action = Filter::post('action');
if ($action == 'update' && Filter::checkCsrf()) {
$this->update();
}
Theme::theme(new AdministrationTheme())->init($WT_TREE);
$ctrl = new PageController();
$ctrl->restrictAccess(Auth::isAdmin())->setPageTitle($this->module->getTitle());
$view_bag = new ViewBag();
$view_bag->set('title', $ctrl->getPageTitle());
$view_bag->set('module', $this->module);
ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
}
示例4: status
/**
* Translation@status
*/
public function status()
{
global $WT_TREE;
$table_id = \Rhumsaa\Uuid\Uuid::uuid4();
Theme::theme(new AdministrationTheme())->init($WT_TREE);
$ctrl = new PageController();
$ctrl->restrictAccess(Auth::isAdmin())->setPageTitle(I18N::translate('Translations status'))->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)->addInlineJavascript('
//Datatable initialisation
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["num-html-asc" ]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a<b) ? -1 : (a>b ? 1 : 0);};
jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);};
jQuery("#table_missing_' . $table_id . '").DataTable({
' . I18N::datatablesI18N() . ',
sorting: [[0, "asc"]],
pageLength: 15,
columns: [
/* 0 Message */ null,
/* 1 Reference */ null
],
});
jQuery("#table_nonused_' . $table_id . '").DataTable({
' . I18N::datatablesI18N() . ',
sorting: [[0, "asc"]],
pageLength: 15,
columns: [
/* 0 Message */ null,
/* 1 Reference */ null
],
});
');
$source_code_paths = array(WT_ROOT . 'vendor/jon48/webtrees-lib/src', WT_ROOT . 'vendor/jon48/webtrees-tools/src/app');
$analyzer = new TranslationsAnalyzer($source_code_paths);
$analyzer->load();
$locale = $analyzer->getLocale();
$view_bag = new ViewBag();
$view_bag->set('table_id', $table_id);
$view_bag->set('module', $this->module);
$view_bag->set('source_code_paths', $source_code_paths);
$view_bag->set('title', $ctrl->getPageTitle() . ' - ' . I18N::languageName($locale->languageTag()));
$view_bag->set('missing_translations', $analyzer->getMissingTranslations());
$view_bag->set('non_used_translations', $analyzer->getMajNonUsedTranslations());
$view_bag->set('loading_stats', $analyzer->getLoadingStatistics());
ViewFactory::make('TranslationStatus', $this, $ctrl, $view_bag)->render();
}
示例5: pageBody
private function pageBody(PageController $controller)
{
?>
<!-- FANCY TREEVIEW PAGE -->
<div id="fancy_treeview-page">
<div id="page-header">
<h2><?php
echo $controller->getPageTitle();
?>
</h2>
<?php
if ($this->options('show_pdf_icon') >= Auth::accessLevel($this->tree)) {
?>
<div id="dialog-confirm" title="<?php
echo I18N::translate('Generate PDF');
?>
" style="display:none">
<p><?php
echo I18N::translate('The pdf contains only visible generation blocks.');
?>
</p>
</div>
<a id="pdf" href="#"><i class="icon-mime-application-pdf"></i></a>
<?php
}
?>
</div>
<div id="page-body">
<?php
if ($this->options('show_userform') >= Auth::accessLevel($this->tree)) {
?>
<form id="change_root">
<label class="label"><?php
echo I18N::translate('Change root person');
?>
</label>
<input
data-autocomplete-type="INDI"
id="new_rootid"
name="new_rootid"
placeholder="<?php
echo I18N::translate('Search ID by name');
?>
"
type="text"
>
<input
id="btn_go"
class="btn btn-primary btn-sm"
name="btn_go"
type="submit"
value="<?php
echo I18N::translate('Go');
?>
"
>
</form>
<div id="error"></div>
<?php
}
?>
<ol id="fancy_treeview"><?php
echo $this->printPage();
?>
</ol>
<div id="btn_next">
<input
class="btn btn-primary"
type="button"
name="next"
value="<?php
echo I18N::translate('next');
?>
"
>
</div>
</div>
</div>
<?php
}
示例6: editConfig
/**
* Display a form to edit configuration settings.
*/
private function editConfig()
{
$controller = new PageController();
$controller->restrictAccess(Auth::isAdmin())->setPageTitle(I18N::translate('Chart preferences') . ' — ' . $this->getTitle())->pageHeader();
?>
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<h1><?php
echo $controller->getPageTitle();
?>
</h1>
<p>
<?php
echo I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.');
?>
</p>
<form method="post">
<?php
foreach (Tree::getAll() as $tree) {
?>
<h2><?php
echo $tree->getTitleHtml();
?>
</h2>
<div class="form-group">
<label class="control-label col-sm-3" for="relationship-ancestors-<?php
echo $tree->getTreeId();
?>
">
<?php
echo I18N::translate('Relationships');
?>
</label>
<div class="col-sm-9">
<?php
echo FunctionsEdit::selectEditControl('relationship-ancestors-' . $tree->getTreeId(), $this->ancestorsOptions(), null, $tree->getPreference('RELATIONSHIP_ANCESTORS', self::DEFAULT_ANCESTORS), 'class="form-control"');
?>
</div>
</div>
<fieldset class="form-group">
<legend class="control-label col-sm-3">
<?php
echo I18N::translate('How much recursion to use when searching for relationships');
?>
</legend>
<div class="col-sm-9">
<?php
echo FunctionsEdit::radioButtons('relationship-recursion-' . $tree->getTreeId(), $this->recursionOptions(), $tree->getPreference('RELATIONSHIP_RECURSION', self::DEFAULT_RECURSION), 'class="radio-inline"');
?>
</div>
</fieldset>
<?php
}
?>
<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
}
示例7: config
//.........这里部分代码省略.........
.text-justify-md {
text-align: justify;
}
}
@media (min-width: 1200px) {
.text-left-not-lg, .text-center-not-lg, .text-right-not-lg, .text-justify-not-lg {
text-align: inherit;
}
.text-left-lg {
text-align: left;
}
.text-center-lg {
text-align: center;
}
.text-right-lg {
text-align: right;
}
.text-justify-lg {
text-align: justify;
}
}
</style>
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo webtrees\I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo webtrees\I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<div class="row">
<div class="col-sm-4 col-xs-12">
<form class="form">
<label for="ged" class="sr-only">
<?php
echo webtrees\I18N::translate('Family tree');
?>
</label>
<input type="hidden" name="mod" value="<?php
echo $this->getName();
?>
">
<input type="hidden" name="mod_action" value="admin_config">
<div class="col-sm-9 col-xs-9" style="padding:0;">
<?php
echo webtrees\Functions\FunctionsEdit::selectEditControl('ged', webtrees\Tree::getNameList(), null, $WT_TREE->getName(), 'class="form-control"');
?>
</div>
<div class="col-sm-3" style="padding:0;">
<input type="submit" class="btn btn-primary" value="<?php
echo webtrees\I18N::translate('show');
?>
">
</div>
</form>
</div>
<span class="visible-xs hidden-sm hidden-md hidden-lg" style="display:block;"></br></br></span>
<div class="col-sm-4 text-center text-left-xs col-xs-12">
示例8: PageController
namespace Fisharebest\Webtrees;
/**
* Defined in session.php
*
* @global Tree $WT_TREE
*/
global $WT_TREE;
use Fisharebest\Webtrees\Controller\PageController;
define('WT_SCRIPT_NAME', 'admin_trees_renumber.php');
require './includes/session.php';
$controller = new PageController();
$controller->restrictAccess(Auth::isManager($WT_TREE))->setPageTitle(I18N::translate('Renumber family tree') . ' — ' . $WT_TREE->getTitleHtml())->pageHeader();
// Every XREF used by this tree and also used by some other tree
$xrefs = Database::prepare("SELECT xref, type FROM (" . " SELECT i_id AS xref, 'INDI' AS type FROM `##individuals` WHERE i_file = ?" . " UNION " . " SELECT f_id AS xref, 'FAM' AS type FROM `##families` WHERE f_file = ?" . " UNION " . " SELECT s_id AS xref, 'SOUR' AS type FROM `##sources` WHERE s_file = ?" . " UNION " . " SELECT m_id AS xref, 'OBJE' AS type FROM `##media` WHERE m_file = ?" . " UNION " . " SELECT o_id AS xref, o_type AS type FROM `##other` WHERE o_file = ? AND o_type NOT IN ('HEAD', 'TRLR')" . ") AS this_tree JOIN (" . " SELECT xref FROM `##change` WHERE gedcom_id <> ?" . " UNION " . " SELECT i_id AS xref FROM `##individuals` WHERE i_file <> ?" . " UNION " . " SELECT f_id AS xref FROM `##families` WHERE f_file <> ?" . " UNION " . " SELECT s_id AS xref FROM `##sources` WHERE s_file <> ?" . " UNION " . " SELECT m_id AS xref FROM `##media` WHERE m_file <> ?" . " UNION " . " SELECT o_id AS xref FROM `##other` WHERE o_file <> ? AND o_type NOT IN ('HEAD', 'TRLR')" . ") AS other_trees USING (xref)")->execute(array($WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId(), $WT_TREE->getTreeId()))->fetchAssoc();
echo '<h1>', $controller->getPageTitle(), '</h1>';
if (Filter::get('action') === 'renumber') {
foreach ($xrefs as $old_xref => $type) {
Database::beginTransaction();
Database::exec("LOCK TABLE `##individuals` WRITE," . " `##families` WRITE," . " `##sources` WRITE," . " `##media` WRITE," . " `##other` WRITE," . " `##name` WRITE," . " `##placelinks` WRITE," . " `##change` WRITE," . " `##next_id` WRITE," . " `##dates` WRITE," . " `##default_resn` WRITE," . " `##hit_counter` WRITE," . " `##link` WRITE," . " `##user_gedcom_setting` WRITE");
$new_xref = $WT_TREE->getNewXref($type);
switch ($type) {
case 'INDI':
Database::prepare("UPDATE `##individuals` SET i_id = ?, i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_id = ? AND i_file = ?")->execute(array($new_xref, "0 @{$old_xref}@ INDI\n", "0 @{$new_xref}@ INDI\n", $old_xref, $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'HUSB') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?")->execute(array($old_xref, " HUSB @{$old_xref}@", " HUSB @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'WIFE') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?")->execute(array($old_xref, " WIFE @{$old_xref}@", " WIFE @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'CHIL') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?")->execute(array($old_xref, " CHIL @{$old_xref}@", " CHIL @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = 'ASSO') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?")->execute(array($old_xref, " ASSO @{$old_xref}@", " ASSO @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##families` JOIN `##link` ON (l_file = f_file AND l_to = ? AND l_type = '_ASSO') SET f_gedcom = REPLACE(f_gedcom, ?, ?) WHERE f_file = ?")->execute(array($old_xref, " _ASSO @{$old_xref}@", " _ASSO @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = 'ASSO') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?")->execute(array($old_xref, " ASSO @{$old_xref}@", " ASSO @{$new_xref}@", $WT_TREE->getTreeId()));
Database::prepare("UPDATE `##individuals` JOIN `##link` ON (l_file = i_file AND l_to = ? AND l_type = '_ASSO') SET i_gedcom = REPLACE(i_gedcom, ?, ?) WHERE i_file = ?")->execute(array($old_xref, " _ASSO @{$old_xref}@", " _ASSO @{$new_xref}@", $WT_TREE->getTreeId()));
示例9: headContents
/**
* Create the contents of the <head> tag.
*
* @param PageController $controller The current controller
*
* @return string
*/
protected function headContents(PageController $controller)
{
// The title often includes the names of records, which may include HTML markup.
$title = Filter::unescapeHtml($controller->getPageTitle());
// If an extra (site) title is specified, append it.
if ($this->tree && $this->tree->getPreference('META_TITLE')) {
$title .= ' – ' . $this->tree->getPreference('META_TITLE');
}
$html = '<!--[if IE 8]><script src="' . WT_MODERNIZR_JS_URL . '"></script><![endif]-->' . '<!--[if IE 8]><script src="' . WT_RESPOND_JS_URL . '"></script><![endif]-->' . $this->metaCharset() . $this->title($title) . $this->favicon() . $this->metaViewport() . $this->metaRobots($controller->getMetaRobots()) . $this->metaUaCompatible() . $this->metaGenerator(WT_WEBTREES . ' ' . WT_VERSION . ' - ' . WT_WEBTREES_URL);
if ($this->tree) {
$html .= $this->metaDescription($this->tree->getPreference('META_DESCRIPTION'));
}
// CSS files
foreach ($this->stylesheets() as $css) {
$html .= '<link rel="stylesheet" type="text/css" href="' . $css . '">';
}
return $html;
}
示例10: pageBody
private function pageBody(PageController $controller)
{
$FTV_SETTINGS = unserialize($this->getSetting('FTV_SETTINGS'));
?>
<!-- ADMIN PAGE CONTENT -->
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<h2><?php
echo $controller->getPageTitle();
?>
</h2>
<!-- *** FORM 1 *** -->
<form class="form-horizontal" method="post" name="form1">
<?php
echo Filter::getCsrf();
?>
<!-- SELECT TREE -->
<div class="form-group">
<label class="control-label col-sm-2" for="tree">
<?php
echo I18N::translate('Family tree');
?>
</label>
<div class="col-sm-4">
<select id="tree" name="NEW_FIB_TREE" class="form-control">
<?php
foreach (Tree::getAll() as $tree) {
?>
<?php
if ($tree->getTreeId() == $this->tree_id) {
?>
<option value="<?php
echo $tree->getTreeId();
?>
" data-ged="<?php
echo $tree->getNameHtml();
?>
" selected="selected">
<?php
echo $tree->getTitleHtml();
?>
</option>
<?php
} else {
?>
<option value="<?php
echo $tree->getTreeId();
?>
" data-ged="<?php
echo $tree->getNameHtml();
?>
">
<?php
echo $tree->getTitleHtml();
?>
</option>
<?php
}
?>
<?php
}
?>
</select>
</div>
</div>
</form>
<!-- PANEL GROUP ACCORDION -->
<div class="panel-group" id="accordion">
<!-- PANEL 1 -->
<div class="panel panel-default" id="panel1">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-target="#collapseOne" href="#">
<?php
echo I18N::translate('Pages');
?>
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<?php
if (empty($FTV_SETTINGS) || !empty($FTV_SETTINGS) && !$this->searchArray($FTV_SETTINGS, 'TREE', $this->tree_id)) {
?>
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="' . I18N::translate('close') . '">
//.........这里部分代码省略.........
示例11: listAll
/**
* Certificate@listAll
*/
public function listAll()
{
global $WT_TREE;
$controller = new PageController();
$controller->setPageTitle(I18N::translate('Certificates'))->restrictAccess($this->module->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE) >= Auth::accessLevel($WT_TREE));
$city = Filter::get('city');
if (!empty($city) && strlen($city) > 22) {
$city = Functions::decryptFromSafeBase64($city);
$controller->setPageTitle(I18N::translate('Certificates for %s', $city));
}
$data = new ViewBag();
$data->set('title', $controller->getPageTitle());
$data->set('url_module', $this->module->getName());
$data->set('url_action', 'Certificate@listAll');
$data->set('url_ged', $WT_TREE->getNameUrl());
$data->set('cities', $this->provider->getCitiesList());
$data->set('selected_city', $city);
$data->set('has_list', false);
if (!empty($city)) {
$table_id = 'table-certiflist-' . Uuid::uuid4();
$certif_list = $this->provider->getCertificatesList($city);
if (!empty($certif_list)) {
$data->set('has_list', true);
$data->set('table_id', $table_id);
$data->set('certificate_list', $certif_list);
$controller->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)->addInlineJavascript('
/* Initialise datatables */
jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))};
jQuery.fn.dataTableExt.oSort["num-html-asc" ]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a<b) ? -1 : (a>b ? 1 : 0);};
jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);};
jQuery("#' . $table_id . '").dataTable( {
dom: \'<"H"<"filtersH_' . $table_id . '">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_' . $table_id . '">>\',
' . I18N::datatablesI18N() . ',
jQueryUI: true,
autoWidth: false,
processing: true,
columns: [
/* 0-Date */ { dataSort: 1, width: "15%", class: "center" },
/* 1-DateSort */ { type: "unicode", visible : false },
/* 2-Type */ { width: "5%", searchable: false, class: "center"},
/* 3-CertificateSort */ { type: "unicode", visible : false },
/* 4-Certificate */ { dataSort: 3, class: "left" }
],
sorting: [[0,"asc"], [2,"asc"]],
displayLength: 20,
pagingType: "full_numbers"
});
jQuery(".certificate-list").css("visibility", "visible");
jQuery(".loading-image").css("display", "none");
');
}
}
ViewFactory::make('CertificatesList', $this, $controller, $data)->render();
}
示例12: renderEdit
/**
* Renders the edit form, whether it is an edition of an existing GeoAnalysis, or the addition of a new one.
*
* @param (GeoAnalysis!null) $ga GeoAnalysis to edit
*/
protected function renderEdit(GeoAnalysis $ga = null)
{
global $WT_TREE;
Theme::theme(new AdministrationTheme())->init($WT_TREE);
$controller = new PageController();
$controller->restrictAccess(Auth::isManager($WT_TREE))->addInlineJavascript('
function toggleMapOptions() {
if($("input:radio[name=\'use_map\']:checked").val() == 1) {
$("#map_options").show();
}
else {
$("#map_options").hide();
}
}
$("[name=\'use_map\']").on("change", toggleMapOptions);
toggleMapOptions();
');
$data = new ViewBag();
if ($ga) {
$controller->setPageTitle(I18N::translate('Edit the geographical dispersion analysis'));
$data->set('geo_analysis', $ga);
} else {
$controller->setPageTitle(I18N::translate('Add a geographical dispersion analysis'));
}
$data->set('title', $controller->getPageTitle());
$data->set('admin_config_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig&ged=' . $WT_TREE->getNameUrl());
$data->set('module_title', $this->module->getTitle());
$data->set('save_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig@save&ged=' . $WT_TREE->getNameUrl());
$data->set('places_hierarchy', $this->provider->getPlacesHierarchy());
$map_list = array_map(function (OutlineMap $map) {
return $map->getDescription();
}, $this->provider->getOutlineMapsList());
asort($map_list);
$data->set('map_list', $map_list);
$gen_details = array(0 => I18N::translate('All'));
for ($i = 1; $i <= 10; $i++) {
$gen_details[$i] = $i;
}
$data->set('generation_details', $gen_details);
ViewFactory::make('GeoAnalysisEdit', $this, $controller, $data)->render();
}
示例13: pageBody
private function pageBody(PageController $controller)
{
$FRL_PLUGINS = unserialize($this->getSetting('FRL_PLUGINS'));
?>
<ol class="breadcrumb small">
<li><a href="admin.php"><?php
echo I18N::translate('Control panel');
?>
</a></li>
<li><a href="admin_modules.php"><?php
echo I18N::translate('Module administration');
?>
</a></li>
<li class="active"><?php
echo $controller->getPageTitle();
?>
</li>
</ol>
<h2><?php
echo $controller->getPageTitle();
?>
</h2>
<p class="small text-muted"><?php
echo I18N::translate('Check the plugins you want to use in the sidebar.');
?>
</p>
<form class="form-horizontal" method="post" name="configform" action="<?php
echo $this->getConfigLink();
?>
">
<input type="hidden" name="save" value="1">
<!-- SELECT ALL -->
<div class="form-group checkbox col-sm-12">
<label>
<?php
echo FunctionsEdit::checkbox('select-all') . I18N::translate('select all');
?>
</label>
</div>
<!-- RESEARCH LINKS -->
<?php
foreach ($this->getPluginList() as $area => $plugins) {
?>
<div class="form-group col-sm-12">
<h4><?php
echo $area;
?>
</h4>
<?php
foreach ($plugins as $label => $plugin) {
?>
<?php
if (is_array($FRL_PLUGINS) && array_key_exists($label, $FRL_PLUGINS)) {
$enabled = $FRL_PLUGINS[$label];
} else {
$enabled = '1';
}
?>
<div class="checkbox col-sm-4" dir="ltr">
<label class="checkbox-inline">
<?php
echo FunctionsEdit::twoStateCheckbox('NEW_FRL_PLUGINS[' . $label . ']', $enabled) . ' ' . $plugin->getPluginName();
?>
</label>
</div>
<?php
}
?>
</div>
<?php
}
?>
<div class="form-group col-sm-12">
<button type="submit" class="btn btn-primary">
<i class="fa fa-check"></i>
<?php
echo I18N::translate('save');
?>
</button>
<button type="reset" class="btn btn-primary" onclick="if (confirm('<?php
echo I18N::translate('The settings will be reset to default. Are you sure you want to do this?');
?>
'))
window.location.href = 'module.php?mod=<?php
echo $this->getName();
?>
&mod_action=admin_reset';">
<i class="fa fa-recycle"></i>
<?php
echo I18N::translate('reset');
?>
</button>
</div>
</form>
<?php
}
示例14: listAll
/**
* GeoAnalysis@listAll
*/
public function listAll()
{
$controller = new PageController();
$controller->setPageTitle(I18N::translate('Sosa Geographical dispersion'));
$data = new ViewBag();
$data->set('title', $controller->getPageTitle());
$data->set('has_list', false);
$ga_list = $this->provider->getGeoAnalysisList();
if (count($ga_list) > 0) {
$data->set('has_list', true);
$data->set('geoanalysislist', $ga_list);
}
ViewFactory::make('GeoAnalysisList', $this, $controller, $data)->render();
}
示例15: index
/**
* Lineage@index
*/
public function index()
{
global $WT_TREE;
$controller = new PageController();
$controller->setPageTitle(I18N::translate('Patronymic Lineages') . ' : ' . $this->legend);
$view_bag = new ViewBag();
$view_bag->set('title', $controller->getPageTitle());
$view_bag->set('tree', $WT_TREE);
$view_bag->set('alpha', $this->alpha);
$view_bag->set('surname', $this->surname);
$view_bag->set('legend', $this->legend);
$view_bag->set('show_all', $this->show_all);
if ($this->isShowingSurnames()) {
$view_bag->set('issurnames', true);
$view_bag->set('surnameslist', $this->getSurnamesList());
}
if ($this->isShowingLineages()) {
$view_bag->set('islineages', true);
$view_bag->set('lineages', $this->getLineages());
if ($this->show_all === 'no') {
$view_bag->set('table_title', I18N::translate('Individuals in %s lineages', $this->legend));
} else {
$view_bag->set('table_title', I18N::translate('All lineages'));
}
}
ViewFactory::make('Lineage', $this, $controller, $view_bag)->render();
}