summaryrefslogtreecommitdiff
path: root/modules_v3/gedcom_block/module.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules_v3/gedcom_block/module.php')
-rw-r--r--modules_v3/gedcom_block/module.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules_v3/gedcom_block/module.php b/modules_v3/gedcom_block/module.php
index 309bea0c62..d498877f98 100644
--- a/modules_v3/gedcom_block/module.php
+++ b/modules_v3/gedcom_block/module.php
@@ -1,6 +1,6 @@
<?php
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
+// Copyright (C) 2015 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2010 John Finlay
@@ -20,6 +20,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
use WT\Auth;
+use WT\Theme;
/**
* Class gedcom_block_WT_Module
@@ -36,24 +37,24 @@ class gedcom_block_WT_Module extends WT_Module implements WT_Module_Block {
}
/** {@inheritdoc} */
- public function getBlock($block_id, $template=true, $cfg=null) {
+ public function getBlock($block_id, $template = true, $cfg = null) {
global $controller;
- $indi_xref=$controller->getSignificantIndividual()->getXref();
- $id=$this->getName().$block_id;
- $class=$this->getName().'_block';
- $title='<span dir="auto">'.WT_TREE_TITLE.'</span>';
+ $indi_xref = $controller->getSignificantIndividual()->getXref();
+ $id = $this->getName() . $block_id;
+ $class = $this->getName() . '_block';
+ $title = '<span dir="auto">' . WT_TREE_TITLE . '</span>';
$content = '<table><tr>';
- $content .= '<td><a href="pedigree.php?rootid='.$indi_xref.'&amp;ged='.WT_GEDURL.'"><i class="icon-pedigree"></i><br>'.WT_I18N::translate('Default chart').'</a></td>';
- $content .= '<td><a href="individual.php?pid='.$indi_xref.'&amp;ged='.WT_GEDURL.'"><i class="icon-indis"></i><br>'.WT_I18N::translate('Default individual').'</a></td>';
+ $content .= '<td><a href="pedigree.php?rootid=' . $indi_xref . '&amp;ged=' . WT_GEDURL . '"><i class="icon-pedigree"></i><br>' . WT_I18N::translate('Default chart') . '</a></td>';
+ $content .= '<td><a href="individual.php?pid=' . $indi_xref . '&amp;ged=' . WT_GEDURL . '"><i class="icon-indis"></i><br>' . WT_I18N::translate('Default individual') . '</a></td>';
if (WT_Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
- $content .= '<td><a href="'.WT_LOGIN_URL.'?action=register"><i class="icon-user_add"></i><br>'.WT_I18N::translate('Request new user account').'</a></td>';
+ $content .= '<td><a href="' . WT_LOGIN_URL . '?action=register"><i class="icon-user_add"></i><br>' . WT_I18N::translate('Request new user account') . '</a></td>';
}
$content .= "</tr>";
$content .= "</table>";
if ($template) {
- require WT_THEME_DIR.'templates/block_main_temp.php';
+ return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
}