summaryrefslogtreecommitdiff
path: root/library/WT/Controller
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-08-30 14:50:12 +0100
committerfisharebest <fisharebest@gmail.com>2013-08-30 14:50:12 +0100
commitddb2811bbf06dd8f9870a11534e059d7290d016f (patch)
treea632425ea635056b772754cf58928b2c370bdfb8 /library/WT/Controller
parent2a638691b1be77284f6032804ecc71b1957cec59 (diff)
downloadwebtrees-ddb2811bbf06dd8f9870a11534e059d7290d016f.tar.gz
webtrees-ddb2811bbf06dd8f9870a11534e059d7290d016f.tar.bz2
webtrees-ddb2811bbf06dd8f9870a11534e059d7290d016f.zip
#1218624 - Interactive tree event sequence - dev / do not abbreviate chart labels
Diffstat (limited to 'library/WT/Controller')
-rw-r--r--library/WT/Controller/Ancestry.php6
-rw-r--r--library/WT/Controller/Descendancy.php4
-rw-r--r--library/WT/Controller/Lifespan.php23
3 files changed, 19 insertions, 14 deletions
diff --git a/library/WT/Controller/Ancestry.php b/library/WT/Controller/Ancestry.php
index c1bccc4384..d8da058056 100644
--- a/library/WT/Controller/Ancestry.php
+++ b/library/WT/Controller/Ancestry.php
@@ -143,9 +143,7 @@ class WT_Controller_Ancestry extends WT_Controller_Chart {
echo '&nbsp;<span dir="ltr" class="person_boxF">&nbsp;', ($sosa*2+1), '&nbsp;</span>&nbsp;';
if ($family->canShow()) {
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' <a href="', $family->getHtmlUrl(), '" class="details1">';
- $fact->print_simple_fact();
- echo '</a>';
+ echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
}
}
echo '</span>';
@@ -157,4 +155,4 @@ class WT_Controller_Ancestry extends WT_Controller_Chart {
}
echo '</li>';
}
-} \ No newline at end of file
+}
diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php
index 7f8cc1d510..e6074a50da 100644
--- a/library/WT/Controller/Descendancy.php
+++ b/library/WT/Controller/Descendancy.php
@@ -200,9 +200,7 @@ class WT_Controller_Descendancy extends WT_Controller_Chart {
echo "<a href=\"#\" onclick=\"expand_layer('".$family->getXref().$personcount."'); return false;\" class=\"top\"><i id=\"".$family->getXref().$personcount."_img\" class=\"icon-minus\" title=\"".WT_I18N::translate('View family')."\"></i></a>";
if ($family->canShow()) {
foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
- echo ' <a href="', $family->getHtmlUrl(), '" class="details1">';
- $fact->print_simple_fact();
- echo '</a>';
+ echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
}
}
echo '</span>';
diff --git a/library/WT/Controller/Lifespan.php b/library/WT/Controller/Lifespan.php
index d5d7eaae75..c4264caf7f 100644
--- a/library/WT/Controller/Lifespan.php
+++ b/library/WT/Controller/Lifespan.php
@@ -447,18 +447,18 @@ class WT_Controller_Lifespan extends WT_Controller_Page {
$text = explode("-fact, ", $val);
$fact = $text[0];
$val = $text[1];
- echo '</b><span>', WT_Gedcom_Tag::getAbbreviation($fact), '</span></a></div>';
+ echo '</b><span>', self::getAbbreviation($fact), '</span></a></div>';
}
$indiName = $value->getFullName();
echo '<table><tr><td width="15"><a class="showit" href="#"><b>';
- echo WT_Gedcom_Tag::getAbbreviation('BIRT');
+ echo self::getAbbreviation('BIRT');
echo '</b><span>', $value->getSexImage(), $indiName, '<br>', WT_Gedcom_Tag::getLabel('BIRT'), ' ', strip_tags($bdate->Display(false)), ' ', $value->getBirthPlace(), '</span></a>',
'<td align="left" width="100%"><a href="', $value->getHtmlUrl(), '">', $value->getSexImage(), $indiName, ' ', $lifespan, ' </a></td>' ,
'<td width="15">';
if ($value->isDead()) {
if ($deathReal || $value->isDead()) {
echo '<a class="showit" href="#"><b>';
- echo WT_Gedcom_Tag::getAbbreviation('DEAT');
+ echo self::getAbbreviation('DEAT');
if (!$deathReal) echo '*';
echo '</b><span>'.$value->getSexImage().$indiName.'<br>'.WT_Gedcom_Tag::getLabel('DEAT').' '.strip_tags($ddate->Display(false)).' '.$value->getDeathPlace().'</span></a>';
}
@@ -474,11 +474,11 @@ class WT_Controller_Lifespan extends WT_Controller_Page {
$text = explode("-fact,", $val);
$fact = $text[0];
$val = $text[1];
- echo '</b><span>'.WT_Gedcom_Tag::getAbbreviation($fact).'</span></a></div>';
+ echo '</b><span>'.self::getAbbreviation($fact).'</span></a></div>';
}
$indiName = $value->getFullName();
echo '<table dir="ltr"><tr><td width="15"><a class="showit" href="#"><b>';
- echo WT_Gedcom_Tag::getAbbreviation('BIRT');
+ echo self::getAbbreviation('BIRT');
if (!$birthReal) echo '*';
echo '</b><span>'.$value->getSexImage().$indiName.'<br>'.WT_Gedcom_Tag::getLabel('BIRT').' '.strip_tags($bdate->Display(false)).' '.$value->getBirthPlace().'</span></a></td>'.
'<td align="left" width="100%"><a href="'.$value->getHtmlUrl().'">'.$value->getSexImage().$indiName.'</a></td>'.
@@ -486,7 +486,7 @@ class WT_Controller_Lifespan extends WT_Controller_Page {
if ($value->isDead()) {
if ($deathReal || $value->isDead()) {
echo '<a class="showit" href="#"><b>';
- echo WT_Gedcom_Tag::getAbbreviation('DEAT');
+ echo self::getAbbreviation('DEAT');
if (!$deathReal) echo "*";
echo '</b><span>'.$value->getSexImage().$indiName.'<br>'.WT_Gedcom_Tag::getLabel('DEAT').' '.strip_tags($ddate->Display(false)).' '.$value->getDeathPlace().'</span></a>';
}
@@ -497,7 +497,7 @@ class WT_Controller_Lifespan extends WT_Controller_Page {
echo '<div style="text-align: left; position: absolute;top:', $Y, 'px; left:', $startPos, 'px;width:', $width, 'px; height:', $height, 'px; background-color:', $this->color, '; border: solid blue 1px; z-index:', $Z, '">';
$indiName = $value->getFullName();
echo '<a class="showit" href="'.$value->getHtmlUrl().'"><b>';
- echo WT_Gedcom_Tag::getAbbreviation('BIRT');
+ echo self::getAbbreviation('BIRT');
echo '</b><span>'.$value->getSexImage().$indiName.'<br>'.WT_Gedcom_Tag::getLabel('BIRT').' '.strip_tags($bdate->Display(false)).' '.$value->getBirthPlace().'<br>';
foreach ($eventinformation as $evtwidth=>$val) {
$text = explode('-fact,', $val);
@@ -549,4 +549,13 @@ class WT_Controller_Lifespan extends WT_Controller_Page {
}
return $list;
}
+
+ private static function getAbbreviation($tag) {
+ switch ($tag) {
+ case 'BIRT': return WT_I18N::translate_c('Abbreviation for birth', 'b.');
+ case 'MARR': return WT_I18N::translate_c('Abbreviation for marriage', 'm.');
+ case 'DEAT': return WT_I18N::translate_c('Abbreviation for death', 'd.');
+ default: return utf8_substr(WT_Gedcom_Tag::getLabel($tag), 0, 1); // Just use the first letter of the full fact
+ }
+ }
}