summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--relationship.php308
-rw-r--r--themes/clouds/style.css10
-rw-r--r--themes/clouds/theme.php2
-rw-r--r--themes/colors/css/colors.css14
-rw-r--r--themes/colors/theme.php2
-rw-r--r--themes/fab/style.css12
-rw-r--r--themes/fab/theme.php2
-rw-r--r--themes/minimal/style.css12
-rw-r--r--themes/minimal/theme.php2
-rw-r--r--themes/webtrees/style.css4
-rw-r--r--themes/webtrees/theme.php2
-rw-r--r--themes/xenea/style.css12
-rw-r--r--themes/xenea/theme.php2
13 files changed, 150 insertions, 234 deletions
diff --git a/relationship.php b/relationship.php
index bd91941df6..6f2062b45e 100644
--- a/relationship.php
+++ b/relationship.php
@@ -54,7 +54,7 @@ $Dbheight = $bheight;
$Dbxspacing = 0;
$Dbyspacing = 0;
$Dbasexoffset = 0;
-$Dbaseyoffset = 110;
+$Dbaseyoffset = 0;
$pid1=safe_GET_xref('pid1');
$pid2=safe_GET_xref('pid2');
@@ -122,184 +122,168 @@ if (WT_USE_LIGHTBOX) {
}
?>
-<div id="relationship_chart_options" style="position: relative; z-index:90; width:98%;">
- <h2><?php echo $controller->getPageTitle(); ?></h2>
- <form name="people" method="get" action="relationship.php">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="path_to_find" value="<?php echo $path_to_find; ?>">
- <table class="list_table">
- <tr>
- <td colspan="2" class="topbottombar center">
- <?php echo WT_I18N::translate('Relationships'); ?>
- </td>
- <td>
- &nbsp;
- </td>
- <td colspan="2" class="topbottombar center">
- <?php echo WT_I18N::translate('Options:'); ?>
- </td>
- </tr>
- <tr>
- <td class="descriptionbox">
- <?php echo WT_I18N::translate('Person 1'); ?>
- </td>
- <td class="optionbox vmiddle">
- <input tabindex="1" class="pedigree_form" type="text" name="pid1" id="pid1" size="3" value="<?php echo $pid1; ?>">
- <?php print_findindi_link('pid1',''); ?>
- </td>
- <td>
- &nbsp;
- </td>
- <td class="descriptionbox">
- <?php echo WT_I18N::translate('Show Details'); ?>
- </td>
- <td class="optionbox vmiddle">
- <input type="hidden" name="show_full" value="<?php echo $show_full; ?>">
- <input tabindex="3" type="checkbox" name="showfull" value="0" <?php if ($show_full) { echo ' checked="checked"'; } ?> onclick="document.people.show_full.value='<?php echo !$show_full; ?>';">
- </td>
- </tr>
- <tr>
- <td class="descriptionbox">
- <?php echo WT_I18N::translate('Person 2'); ?>
- </td>
- <td class="optionbox vmiddle">
- <input tabindex="2" class="pedigree_form" type="text" name="pid2" id="pid2" size="3" value="<?php echo $pid2; ?>">
- <?php print_findindi_link('pid2',''); ?>
- </td>
- <td>
- &nbsp;
- </td>
- <td class="descriptionbox">
- <?php echo WT_I18N::translate('Show oldest top'), help_link('oldest_top'); ?>
- </td>
- <td class="optionbox">
- <input tabindex="4" type="checkbox" name="asc" value="-1" <?php if ($asc==-1) echo ' checked="checked"'; ?>>
- </td>
- </tr>
- <tr>
- <td class="descriptionbox">
- <?php
- $pass = false;
- if (isset($_SESSION['relationships']) && !empty($pid1) && !empty($pid2)) {
- $pass = true;
- $i=0;
- $new_path=true;
- if (isset($_SESSION['relationships'][$path_to_find])) {
- $node = $_SESSION['relationships'][$path_to_find];
- } else {
- $node = get_relationship($pid1, $pid2, $followspouse, 0, true, $path_to_find);
- }
- if (!$node) {
- $path_to_find--;
- $check_node=$node;
- }
- foreach ($_SESSION['relationships'] as $node) {
- if ($i==0) {
- echo WT_I18N::translate('Show path').": </td><td class=\"list_value\" style=\"padding: 3px;\">";
- }
- if ($i>0) {
- echo ' | ';
- }
- if ($i==$path_to_find) {
- echo '<span class="error" style="valign: middle">', $i+1, '</span>';
- $new_path=false;
- } else {
- echo '<a href="relationship.php?pid1=', $pid1, '&amp;pid2=', $pid2, '&amp;path_to_find=', $i, '&amp;followspouse=', $followspouse, '&amp;show_full=', $show_full, '&amp;asc=', $asc, '">', $i+1, '</a>';
- }
- $i++;
- }
- if ($new_path && $path_to_find<$i+1 && $check_node) {
- echo ' | <span class="error">', $i+1, '</span>';
- }
- echo '</td>';
+
+<h2><?php echo $controller->getPageTitle(); ?></h2>
+<form name="people" method="get" action="relationship.php">
+ <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
+ <input type="hidden" name="path_to_find" value="<?php echo $path_to_find; ?>">
+ <table class="list_table">
+ <tr>
+ <td colspan="2" class="topbottombar center">
+ <?php echo WT_I18N::translate('Relationships'); ?>
+ </td>
+ <td colspan="2" class="topbottombar center">
+ <?php echo WT_I18N::translate('Options:'); ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="descriptionbox">
+ <?php echo WT_I18N::translate('Person 1'); ?>
+ </td>
+ <td class="optionbox vmiddle">
+ <input tabindex="1" class="pedigree_form" type="text" name="pid1" id="pid1" size="3" value="<?php echo $pid1; ?>">
+ <?php print_findindi_link('pid1',''); ?>
+ </td>
+ <td class="descriptionbox">
+ <?php echo WT_I18N::translate('Show Details'); ?>
+ </td>
+ <td class="optionbox vmiddle">
+ <input type="hidden" name="show_full" value="<?php echo $show_full; ?>">
+ <input tabindex="3" type="checkbox" name="showfull" value="0" <?php if ($show_full) { echo ' checked="checked"'; } ?> onclick="document.people.show_full.value='<?php echo !$show_full; ?>';">
+ </td>
+ </tr>
+ <tr>
+ <td class="descriptionbox">
+ <?php echo WT_I18N::translate('Person 2'); ?>
+ </td>
+ <td class="optionbox vmiddle">
+ <input tabindex="2" class="pedigree_form" type="text" name="pid2" id="pid2" size="3" value="<?php echo $pid2; ?>">
+ <?php print_findindi_link('pid2',''); ?>
+ </td>
+ <td class="descriptionbox">
+ <?php echo WT_I18N::translate('Show oldest top'), help_link('oldest_top'); ?>
+ </td>
+ <td class="optionbox">
+ <input tabindex="4" type="checkbox" name="asc" value="-1" <?php if ($asc==-1) echo ' checked="checked"'; ?>>
+ </td>
+ </tr>
+ <tr>
+ <td class="descriptionbox">
+ <?php
+ $pass = false;
+ if (isset($_SESSION['relationships']) && !empty($pid1) && !empty($pid2)) {
+ $pass = true;
+ $i=0;
+ $new_path=true;
+ if (isset($_SESSION['relationships'][$path_to_find])) {
+ $node = $_SESSION['relationships'][$path_to_find];
} else {
- if ($person1 && $person2) {
- $disp=$person1->canDisplayName() && $person2->canDisplayName();
- if ($disp) {
- echo WT_I18N::translate('Show path'), ': </td>';
- echo '<td class="optionbox">';
- echo '<span class="error vmmiddle">';
- $check_node = get_relationship($pid1, $pid2, $followspouse, 0, true, $path_to_find);
- echo $check_node ? '1' : '&nbsp;'.WT_I18N::translate('No results found.'), '</span></td>';
- $prt = true;
- }
+ $node = get_relationship($pid1, $pid2, $followspouse, 0, true, $path_to_find);
+ }
+ if (!$node) {
+ $path_to_find--;
+ $check_node=$node;
+ }
+ foreach ($_SESSION['relationships'] as $node) {
+ if ($i==0) {
+ echo WT_I18N::translate('Show path').": </td><td class=\"list_value\" style=\"padding: 3px;\">";
+ }
+ if ($i>0) {
+ echo ' | ';
}
- if (!isset($prt)) {
- echo '&nbsp;</td><td class="optionbox">&nbsp;</td>';
+ if ($i==$path_to_find) {
+ echo '<span class="error" style="valign: middle">', $i+1, '</span>';
+ $new_path=false;
+ } else {
+ echo '<a href="relationship.php?pid1=', $pid1, '&amp;pid2=', $pid2, '&amp;path_to_find=', $i, '&amp;followspouse=', $followspouse, '&amp;show_full=', $show_full, '&amp;asc=', $asc, '">', $i+1, '</a>';
}
+ $i++;
}
- ?>
- <td>
- &nbsp;
- </td>
- <td class="descriptionbox">
- <?php echo WT_I18N::translate('Check relationships by marriage'), help_link('CHECK_MARRIAGE_RELATIONS'); ?>
- </td>
- <td class="optionbox" id="followspousebox">
- <input tabindex="6" type="checkbox" name="followspouse" value="1" <?php if ($followspouse) { echo ' checked="checked"'; } ?> onclick="document.people.path_to_find.value='-1';" >
- </td>
- <?php
- if ($person1 && $person2 && $disp) {
- echo '</tr><tr>';
- if (($disp)&&(!$check_node)) {
- echo '<td class="topbottombar wrap vmiddle center" colspan="2">';
- if (isset($_SESSION['relationships'])) {
- if ($path_to_find==0) {
- echo '<span class="error">', WT_I18N::translate('No link between the two individuals could be found.'), '</span><br>';
- } else {
- echo '<span class="error">', WT_I18N::translate('No other link between the two individuals could be found.'), '</span><br>';
- }
+ if ($new_path && $path_to_find<$i+1 && $check_node) {
+ echo ' | <span class="error">', $i+1, '</span>';
+ }
+ echo '</td>';
+ } else {
+ if ($person1 && $person2) {
+ $disp=$person1->canDisplayName() && $person2->canDisplayName();
+ if ($disp) {
+ echo WT_I18N::translate('Show path'), ': </td>';
+ echo '<td class="optionbox">';
+ echo '<span class="error vmmiddle">';
+ $check_node = get_relationship($pid1, $pid2, $followspouse, 0, true, $path_to_find);
+ echo $check_node ? '1' : '&nbsp;'.WT_I18N::translate('No results found.'), '</span></td>';
+ $prt = true;
}
- if (!$followspouse) {
- $controller->addInlineJavaScript('document.getElementById("followspousebox").className="facts_valuered";');
- echo '<input class="error" type="submit" value="', WT_I18N::translate('Check relationships by marriage'), '" onclick="people.followspouse.checked=\'checked\';">';
+ }
+ if (!isset($prt)) {
+ echo '&nbsp;</td><td class="optionbox">&nbsp;</td>';
+ }
+ }
+ ?>
+ <td class="descriptionbox">
+ <?php echo WT_I18N::translate('Check relationships by marriage'), help_link('CHECK_MARRIAGE_RELATIONS'); ?>
+ </td>
+ <td class="optionbox" id="followspousebox">
+ <input tabindex="6" type="checkbox" name="followspouse" value="1" <?php if ($followspouse) { echo ' checked="checked"'; } ?> onclick="document.people.path_to_find.value='-1';" >
+ </td>
+ <?php
+ if ($person1 && $person2 && $disp) {
+ echo '</tr><tr>';
+ if (($disp)&&(!$check_node)) {
+ echo '<td class="topbottombar wrap vmiddle center" colspan="2">';
+ if (isset($_SESSION['relationships'])) {
+ if ($path_to_find==0) {
+ echo '<span class="error">', WT_I18N::translate('No link between the two individuals could be found.'), '</span><br>';
+ } else {
+ echo '<span class="error">', WT_I18N::translate('No other link between the two individuals could be found.'), '</span><br>';
}
- echo '</td>';
- } else {
- echo '<td class="topbottombar vmiddle center" colspan="2"><input type="submit" value="', WT_I18N::translate('Find next path'), '" onclick="document.people.path_to_find.value=', $path_to_find+1, ';">';
- echo help_link('next_path');
- echo '</td>';
}
- $pass = true;
+ if (!$followspouse) {
+ $controller->addInlineJavaScript('document.getElementById("followspousebox").className="facts_valuered";');
+ echo '<input class="error" type="submit" value="', WT_I18N::translate('Check relationships by marriage'), '" onclick="people.followspouse.checked=\'checked\';">';
+ }
+ echo '</td>';
+ } else {
+ echo '<td class="topbottombar vmiddle center" colspan="2"><input type="submit" value="', WT_I18N::translate('Find next path'), '" onclick="document.people.path_to_find.value=', $path_to_find+1, ';">';
+ echo help_link('next_path');
+ echo '</td>';
}
+ $pass = true;
+ }
- if ($pass == false) {
- echo '</tr><tr><td colspan="2" class="topbottombar wrap">&nbsp;</td>';
- }
- ?>
- <td>
- &nbsp;
- </td>
- <td class="topbottombar vmiddle center" colspan="2">
- <input tabindex="7" type="submit" value="<?php echo WT_I18N::translate('View'); ?>">
- </td>
- </tr>
- </table>
- </form>
-</div>
+ if ($pass == false) {
+ echo '</tr><tr><td colspan="2" class="topbottombar wrap">&nbsp;</td>';
+ }
+ ?>
+ <td class="topbottombar vmiddle center" colspan="2">
+ <input tabindex="7" type="submit" value="<?php echo WT_I18N::translate('View'); ?>">
+ </td>
+ </tr>
+ </table>
+</form>
<?php
+
if ($check_node===false) {
exit;
}
-?>
-<div id="relationship_chart">
-
-<?php
$maxyoffset = $Dbaseyoffset;
-if ((!empty($pid1))&&(!empty($pid2))) {
+if ($pid1 && $pid2) {
if (!$disp) {
- echo '<div style="position:absolute; ', ($TEXT_DIRECTION=='ltr'?'left':'right'), ':1px; top:', abs($Dbaseyoffset-70), 'px; z-index:1;">';
print_privacy_error();
- echo '</div>';
} else {
if (isset($_SESSION['relationships'][$path_to_find])) {
$node = $_SESSION['relationships'][$path_to_find];
} else {
$node = get_relationship($pid1, $pid2, $followspouse, 0, true, $path_to_find);
}
- if ($node!==false) {
+ if ($node) {
+ echo '<h3>', WT_I18N::translate('Relationship: %s', get_relationship_name($node)), '</h3>';
+
+ // Use relative layout to position the person boxes.
+ echo '<div id="relationship_chart" style="position:relative;">';
+
$_SESSION['pid1'] = $pid1;
$_SESSION['pid2'] = $pid2;
if (!isset($_SESSION['relationships'])) {
@@ -523,23 +507,19 @@ if ((!empty($pid1))&&(!empty($pid2))) {
print_pedigree_person(WT_Person::getInstance($pid), 1);
echo '</td></tr></table></div>';
}
-
- echo '<div style="position:absolute; ', $TEXT_DIRECTION=='ltr'?'left':'right', ':1px; top:', abs($Dbaseyoffset-70), 'px; z-index:1;">';
- echo '<h3>', WT_I18N::translate('Relationship: %s', get_relationship_name($node)), '</h3></div>';
}
+ echo '</div>'; // <div id="relationship_chart">
}
}
-$maxyoffset += 100;
-?>
-</div>
-<?php
-
+// The contents of <div id="relationship_chart"> use relative positions.
+// Need to expand the dive to include the children, or we'll overlap the footer.
+// $maxyoffset is the top edge of the lowest box.
$controller
->addInlineJavaScript('
relationship_chart_div = document.getElementById("relationship_chart");
if (relationship_chart_div) {
- relationship_chart_div.style.height = "'.($maxyoffset-50).'px";
+ relationship_chart_div.style.height = "'.($maxyoffset+$Dbheight+20).'px";
relationship_chart_div.style.width = "100%";
}'
);
diff --git a/themes/clouds/style.css b/themes/clouds/style.css
index 9ed9670899..70861838d5 100644
--- a/themes/clouds/style.css
+++ b/themes/clouds/style.css
@@ -479,18 +479,8 @@ left:auto;
}
#relationship_chart {
-position:relative;
-top:-40px;
-left:0;
z-index:1;
-width:98%;
}
-
-html[dir='rtl'] #relationship_chart {
-left:auto;
-right:0;
-}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart table div p {font-size:90%; margin:0;}
diff --git a/themes/clouds/theme.php b/themes/clouds/theme.php
index 84185b9edb..72d430fbe9 100644
--- a/themes/clouds/theme.php
+++ b/themes/clouds/theme.php
@@ -2,7 +2,7 @@
// Clouds theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView Cloudy theme
// Original author w.a. bastein http://genealogy.bastein.biz
diff --git a/themes/colors/css/colors.css b/themes/colors/css/colors.css
index 8e25f694c5..277ab72d10 100644
--- a/themes/colors/css/colors.css
+++ b/themes/colors/css/colors.css
@@ -450,20 +450,6 @@ margin:0 15px 0 0;
left:auto;
}
-#relationship_chart {
-position:relative;
-top:-40px;
-left:0;
-z-index: 1;
-width: 98%;
-margin-left: 5px;
-}
-
-html[dir='rtl'] #relationship_chart {
-left:auto;
-right:0;
-}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart table div p {font-size:90%; margin:0;}
diff --git a/themes/colors/theme.php b/themes/colors/theme.php
index 1d29128293..af0dce469f 100644
--- a/themes/colors/theme.php
+++ b/themes/colors/theme.php
@@ -2,7 +2,7 @@
// Colors theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2010 PGV Development Team. All rights reserved.
diff --git a/themes/fab/style.css b/themes/fab/style.css
index 5c1c3528fb..db1d6d2a78 100644
--- a/themes/fab/style.css
+++ b/themes/fab/style.css
@@ -632,18 +632,6 @@ padding:0 2px 0 0;
left:auto;
}
-/*-- relationship chart specific stylesheets --*/
-#relationship_chart {
- position:relative;
- top:-40px;
- left:0;
-}
-
-html[dir='rtl'] #relationship_chart {
- left:auto;
- right:0;
-}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart ul {
background-image:url(images/vline.png);
diff --git a/themes/fab/theme.php b/themes/fab/theme.php
index ef51eb6abe..a443ddc747 100644
--- a/themes/fab/theme.php
+++ b/themes/fab/theme.php
@@ -2,7 +2,7 @@
// FAB theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Based on standard theme, which is Copyright (C) 2002 to 2010 PGV Development Team.
//
diff --git a/themes/minimal/style.css b/themes/minimal/style.css
index 0919a16e8e..a07009c0eb 100644
--- a/themes/minimal/style.css
+++ b/themes/minimal/style.css
@@ -869,18 +869,6 @@ margin:0 15px 0 0;
left:auto;
}
-/*-- relationship chart specific stylesheets --*/
-#relationship_chart {
- position: relative;
- top: -40px;
- left: 0;
-}
-
-html[dir='rtl'] #relationship_chart {
- left:auto;
- right:10px;
-}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart ul {
background-image: url(images/vline.png);
diff --git a/themes/minimal/theme.php b/themes/minimal/theme.php
index a584a3aa9f..7e70a27267 100644
--- a/themes/minimal/theme.php
+++ b/themes/minimal/theme.php
@@ -2,7 +2,7 @@
// Minimal theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2010 PGV Development Team. All rights reserved.
diff --git a/themes/webtrees/style.css b/themes/webtrees/style.css
index 0f2a695408..3f3ec8c671 100644
--- a/themes/webtrees/style.css
+++ b/themes/webtrees/style.css
@@ -183,10 +183,6 @@ html[dir='rtl'] #pedigree_chart {left:auto; right:10px;}
#descendancy_chart li {list-style:none; margin:0 0 0 -15px; padding-top:0; padding-right:0; padding-bottom:0;}
html[dir='rtl'] #descendancy_chart ul {background-position:right top; margin:0 15px 0 0; left:auto;}
-/*-- relationship chart specific stylesheets --*/
-#relationship_chart {position:relative; top:-40px; left:0;}
-html[dir='rtl'] #relationship_chart {left:auto; right:10px;}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart table div p {font-size:90%; margin:0;}
#ancestry_chart ul {background-image:url(images/vline.png); background-repeat:repeat-y; background-position:left top; list-style:none; display:block; margin:0 0 0 15px; padding-top:0; padding-right:0; padding-bottom:0;}
diff --git a/themes/webtrees/theme.php b/themes/webtrees/theme.php
index 54b66b51bb..b6caacec0a 100644
--- a/themes/webtrees/theme.php
+++ b/themes/webtrees/theme.php
@@ -2,7 +2,7 @@
// Standard theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved.
diff --git a/themes/xenea/style.css b/themes/xenea/style.css
index 0dc8fc8a8c..86de5aec0f 100644
--- a/themes/xenea/style.css
+++ b/themes/xenea/style.css
@@ -1102,18 +1102,6 @@ margin:0 15px 0 0;
left:auto;
}
-/*-- relationship chart specific stylesheets --*/
-#relationship_chart {
- position:relative;
- top:-40px;
- left:0;
-}
-
-html[dir='rtl'] #relationship_chart {
- left:auto;
- right:10px;
-}
-
/*-- ancestry chart specific stylesheets --*/
#ancestry_chart ul {
background-image:url(images/vline.png);
diff --git a/themes/xenea/theme.php b/themes/xenea/theme.php
index 4374aaed88..c3561510d9 100644
--- a/themes/xenea/theme.php
+++ b/themes/xenea/theme.php
@@ -2,7 +2,7 @@
// Xenea theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2011 webtrees development team.
+// Copyright (C) 2012 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2010 PGV Development Team. All rights reserved.