summaryrefslogtreecommitdiff
path: root/modules_v3/personal_facts/module.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules_v3/personal_facts/module.php')
-rw-r--r--modules_v3/personal_facts/module.php69
1 files changed, 32 insertions, 37 deletions
diff --git a/modules_v3/personal_facts/module.php b/modules_v3/personal_facts/module.php
index ef26a60260..c6a8dd6115 100644
--- a/modules_v3/personal_facts/module.php
+++ b/modules_v3/personal_facts/module.php
@@ -65,49 +65,44 @@ class personal_facts_WT_Module extends WT_Module implements WT_Module_Tab {
ob_start();
?>
<table class="facts_table" style="margin-top:-2px;" cellpadding="0">
- <?php if (!$controller->record->canDisplayDetails()) {
- echo '<tr><td class="facts_value" colspan="2">';
- print_privacy_error();
- echo '</td></tr>';
- } else {
- $indifacts = $controller->getIndiFacts();
- if (count($indifacts)==0) { ?>
- <tr>
- <td id="no_tab1" colspan="2" class="facts_value"><?php echo WT_I18N::translate('There are no Facts for this individual.'); ?>
- </td>
- </tr>
- <?php }
- if (!isset($controller->skipFamilyFacts)) {
- ?>
- <tr id="row_top">
- <td colspan="2" class="descriptionbox rela">
- <input id="checkbox_rela_facts" type="checkbox" <?php if ($EXPAND_RELATIVES_EVENTS) echo ' checked="checked"'; ?> onclick="jQuery('tr.row_rela').toggle();" />
- <label for="checkbox_rela_facts"><?php echo WT_I18N::translate('Events of close relatives'); ?></label>
- <?php if (file_exists(get_site_setting('INDEX_DIRECTORY').'histo.'.WT_LOCALE.'.php')) { ?>
- <input id="checkbox_histo" type="checkbox" <?php if ($EXPAND_HISTO_EVENTS) echo ' checked="checked"'; ?> onclick="jQuery('tr.row_histo').toggle();" />
- <label for="checkbox_histo"><?php echo WT_I18N::translate('Historical facts'); ?></label>
- <?php } ?>
+ <?php
+ $indifacts = $controller->getIndiFacts();
+ if (count($indifacts)==0) { ?>
+ <tr>
+ <td id="no_tab1" colspan="2" class="facts_value"><?php echo WT_I18N::translate('There are no Facts for this individual.'); ?>
</td>
</tr>
- <?php
+ <?php }
+ if (!isset($controller->skipFamilyFacts)) {
+ ?>
+ <tr id="row_top">
+ <td colspan="2" class="descriptionbox rela">
+ <input id="checkbox_rela_facts" type="checkbox" <?php if ($EXPAND_RELATIVES_EVENTS) echo ' checked="checked"'; ?> onclick="jQuery('tr.row_rela').toggle();" />
+ <label for="checkbox_rela_facts"><?php echo WT_I18N::translate('Events of close relatives'); ?></label>
+ <?php if (file_exists(get_site_setting('INDEX_DIRECTORY').'histo.'.WT_LOCALE.'.php')) { ?>
+ <input id="checkbox_histo" type="checkbox" <?php if ($EXPAND_HISTO_EVENTS) echo ' checked="checked"'; ?> onclick="jQuery('tr.row_histo').toggle();" />
+ <label for="checkbox_histo"><?php echo WT_I18N::translate('Historical facts'); ?></label>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php
+ }
+ $yetdied=false;
+ foreach ($indifacts as $fact) {
+ if (strstr(WT_EVENTS_DEAT, $fact->getTag()) && $fact->getParentObject()->getXref()==$controller->record->getXref()) {
+ $yetdied = true;
}
- $yetdied=false;
- foreach ($indifacts as $fact) {
- if (strstr(WT_EVENTS_DEAT, $fact->getTag()) && $fact->getParentObject()->getXref()==$controller->record->getXref()) {
- $yetdied = true;
+ if (!is_null($fact->getFamilyId())) {
+ if (!$yetdied) {
+ print_fact($fact, $controller->record);
}
- if (!is_null($fact->getFamilyId())) {
- if (!$yetdied) {
- print_fact($fact, $controller->record);
- }
- } else {
- //$reftags = array ('CHAN', 'IDNO', 'RFN', 'AFN', 'REFN', 'RIN', '_UID');// list of tags used in "Extra information" sidebar module
- if (!in_array($fact->getTag(), WT_Gedcom_Tag::getReferenceFacts()) || !array_key_exists('extra_info', WT_Module::getActiveSidebars())) {
- print_fact($fact, $controller->record);
- }
+ } else {
+ //$reftags = array ('CHAN', 'IDNO', 'RFN', 'AFN', 'REFN', 'RIN', '_UID');// list of tags used in "Extra information" sidebar module
+ if (!in_array($fact->getTag(), WT_Gedcom_Tag::getReferenceFacts()) || !array_key_exists('extra_info', WT_Module::getActiveSidebars())) {
+ print_fact($fact, $controller->record);
}
- $FACT_COUNT++;
}
+ $FACT_COUNT++;
}
//-- new fact link
if ($controller->record->canEdit()) {