diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-04-21 21:16:03 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-04-21 21:16:03 +0000 |
| commit | f728932b91fdb979e77e1593d9463c9a3b71b1f5 (patch) | |
| tree | 84e607ad2abd14ce4e9e63246568d104fa8358a0 | |
| parent | 64e66d5316aa3efc028d10152b6f083e8972b160 (diff) | |
| download | webtrees-f728932b91fdb979e77e1593d9463c9a3b71b1f5.tar.gz webtrees-f728932b91fdb979e77e1593d9463c9a3b71b1f5.tar.bz2 webtrees-f728932b91fdb979e77e1593d9463c9a3b71b1f5.zip | |
Fix: pending children not shown on family tab
| -rw-r--r-- | includes/functions/functions_charts.php | 2 | ||||
| -rw-r--r-- | modules/relatives/module.php | 43 |
2 files changed, 37 insertions, 8 deletions
diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php index 1fce47d9cb..e7a9dc8c75 100644 --- a/includes/functions/functions_charts.php +++ b/includes/functions/functions_charts.php @@ -315,7 +315,7 @@ function print_family_children($famid, $childid = "", $sosa = 0, $label="", $per $newchildren = array(); $oldchildren = array(); if (WT_USER_CAN_EDIT) { - if ((isset($_REQUEST['show_changes'])&&$_REQUEST['show_changes']=='yes') && find_gedcom_record($famid, $ged_id) != find_gedcom_record($famid, $ged_id, WT_USER_CAN_EDIT)) { + if (!isset($_REQUEST['show_changes']) || $_REQUEST['show_changes']=='yes') { $newrec = find_gedcom_record($famid, $ged_id, true); $ct = preg_match_all("/1 CHIL @(.*)@/", $newrec, $match, PREG_SET_ORDER); if ($ct > 0) { diff --git a/modules/relatives/module.php b/modules/relatives/module.php index e29ca040a5..7ae2a1525c 100644 --- a/modules/relatives/module.php +++ b/modules/relatives/module.php @@ -250,14 +250,42 @@ class relatives_WT_Module extends WT_Module implements WT_Module_Tab { global $personcount; global $WT_IMAGE_DIR, $WT_IMAGES; $elderdate = $family->getMarriageDate(); - foreach($people["children"] as $key=>$child) { + $key=0; + foreach($people["children"] as $child) { $label = $child->getLabel(); - if ($label[0]=='+') - $styleadd = "blue"; - else if ($label[0]=='-') - $styleadd = "red"; - else - $styleadd = ""; + $styleadd = ""; + ?> + <tr> + <td class="facts_label<?php print $styleadd; ?>"><?php if ($styleadd=="red") print $child->getLabel(); else print $child->getLabel($elderdate, $key+1); ?></td> + <td class="<?php print $this->controller->getPersonStyle($child); ?>"> + <?php + print_pedigree_person($child->getXref(), 2, !$this->controller->isPrintPreview(), 0, $personcount++); + ?> + </td> + </tr> + <?php + $elderdate = $child->getBirthDate(); + ++$key; + } + foreach($people["newchildren"] as $child) { + $label = $child->getLabel(); + $styleadd = "blue"; + ?> + <tr> + <td class="facts_label<?php print $styleadd; ?>"><?php if ($styleadd=="red") print $child->getLabel(); else print $child->getLabel($elderdate, $key+1); ?></td> + <td class="<?php print $this->controller->getPersonStyle($child); ?>"> + <?php + print_pedigree_person($child->getXref(), 2, !$this->controller->isPrintPreview(), 0, $personcount++); + ?> + </td> + </tr> + <?php + $elderdate = $child->getBirthDate(); + ++$key; + } + foreach($people["delchildren"] as $child) { + $label = $child->getLabel(); + $styleadd = "red"; ?> <tr> <td class="facts_label<?php print $styleadd; ?>"><?php if ($styleadd=="red") print $child->getLabel(); else print $child->getLabel($elderdate, $key+1); ?></td> @@ -269,6 +297,7 @@ class relatives_WT_Module extends WT_Module implements WT_Module_Tab { </tr> <?php $elderdate = $child->getBirthDate(); + ++$key; } if (isset($family) && !$this->controller->isPrintPreview() && $this->controller->canedit) { if ($type == "spouse") { |
