summaryrefslogtreecommitdiff
path: root/modules_v3/gedcom_favorites/module.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules_v3/gedcom_favorites/module.php')
-rw-r--r--modules_v3/gedcom_favorites/module.php29
1 files changed, 17 insertions, 12 deletions
diff --git a/modules_v3/gedcom_favorites/module.php b/modules_v3/gedcom_favorites/module.php
index a984f6a047..04d418ed0b 100644
--- a/modules_v3/gedcom_favorites/module.php
+++ b/modules_v3/gedcom_favorites/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
@@ -21,6 +21,7 @@
use Rhumsaa\Uuid\Uuid;
use WT\Auth;
+use WT\Theme;
/**
* Class gedcom_favorites_WT_Module
@@ -96,7 +97,9 @@ class gedcom_favorites_WT_Module extends WT_Module implements WT_Module_Block {
}
// Override GEDCOM configuration temporarily
- if (isset($show_full)) $saveShowFull = $show_full;
+ if (isset($show_full)) {
+ $saveShowFull = $show_full;
+ }
$savePedigreeFullDetails = $PEDIGREE_FULL_DETAILS;
$show_full = 1;
$PEDIGREE_FULL_DETAILS = 1;
@@ -117,14 +120,17 @@ class gedcom_favorites_WT_Module extends WT_Module implements WT_Module_Block {
}
$content = '';
- $style = 2; // 1 means "regular box", 2 means "wide box"
if ($userfavs) {
foreach ($userfavs as $key=>$favorite) {
- if (isset($favorite['id'])) $key=$favorite['id'];
+ if (isset($favorite['id'])) {
+ $key=$favorite['id'];
+ }
$removeFavourite = '<a class="font9" href="index.php?ctype='.$ctype.'&amp;action=deletefav&amp;favorite_id='.$key.'" onclick="return confirm(\''.WT_I18N::translate('Are you sure you want to remove this item from your list of favorites?').'\');">'.WT_I18N::translate('Remove').'</a> ';
if ($favorite['type']=='URL') {
$content .= '<div id="boxurl'.$key.'.0" class="person_box">';
- if ($ctype=='user' || WT_USER_GEDCOM_ADMIN) $content .= $removeFavourite;
+ if ($ctype=='user' || WT_USER_GEDCOM_ADMIN) {
+ $content .= $removeFavourite;
+ }
$content .= '<a href="'.$favorite['url'].'"><b>'.$favorite['title'].'</b></a>';
$content .= '<br>'.$favorite['note'];
$content .= '</div>';
@@ -144,10 +150,10 @@ class gedcom_favorites_WT_Module extends WT_Module implements WT_Module_Block {
break;
}
$content .= '">';
- if ($ctype=="user" || WT_USER_GEDCOM_ADMIN) $content .= $removeFavourite;
- ob_start();
- print_pedigree_person($record, $style);
- $content .= ob_get_clean();
+ if ($ctype=="user" || WT_USER_GEDCOM_ADMIN) {
+ $content .= $removeFavourite;
+ }
+ $content .= Theme::theme()->individualBoxLarge($record);
$content .= $favorite['note'];
$content .= '</div>';
} else {
@@ -204,10 +210,9 @@ class gedcom_favorites_WT_Module extends WT_Module implements WT_Module_Block {
if ($template) {
if ($block) {
- require WT_THEME_DIR.'templates/block_small_temp.php';
- } else {
- require WT_THEME_DIR.'templates/block_main_temp.php';
+ $class .= ' small_inner_block';
}
+ return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
}