diff options
| -rw-r--r-- | app/Functions/FunctionsPrint.php | 2 | ||||
| -rw-r--r-- | app/GedcomRecord.php | 9 | ||||
| -rw-r--r-- | app/Module/FamilyTreeStatisticsModule.php | 23 |
3 files changed, 23 insertions, 11 deletions
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php index 523d001204..eceffdc10e 100644 --- a/app/Functions/FunctionsPrint.php +++ b/app/Functions/FunctionsPrint.php @@ -444,7 +444,7 @@ class FunctionsPrint { $html = '<a href="' . $event->getPlace()->getURL() . '">' . $event->getPlace()->getFullName() . '</a>'; } else { // Abbreviate the place name, for chart boxes - return ' - ' . $event->getPlace()->getShortName(); + return $event->getPlace()->getShortName(); } if ($sub_records) { diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index 3cf7ce6c3d..2917a8d635 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -810,12 +810,17 @@ class GedcomRecord { public function formatFirstMajorFact($facts, $style) { foreach ($this->getFacts($facts, true) as $event) { // Only display if it has a date or place (or both) + if ($event->getDate()->isOK() && !$event->getPlace()->isEmpty()) { + $joiner = ' — '; + } else { + $joiner = ''; + } if ($event->getDate()->isOK() || !$event->getPlace()->isEmpty()) { switch ($style) { case 1: - return '<br><em>' . $event->getLabel() . ' ' . FunctionsPrint::formatFactDate($event, $this, false, false) . ' ' . FunctionsPrint::formatFactPlace($event) . '</em>'; + return '<br><em>' . $event->getLabel() . ' ' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event) . '</em>'; case 2: - return '<dl><dt class="label">' . $event->getLabel() . '</dt><dd class="field">' . FunctionsPrint::formatFactDate($event, $this, false, false) . ' ' . FunctionsPrint::formatFactPlace($event) . '</dd></dl>'; + return '<dl><dt class="label">' . $event->getLabel() . '</dt><dd class="field">' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event) . '</dd></dl>'; } } } diff --git a/app/Module/FamilyTreeStatisticsModule.php b/app/Module/FamilyTreeStatisticsModule.php index e799f22755..e01b731476 100644 --- a/app/Module/FamilyTreeStatisticsModule.php +++ b/app/Module/FamilyTreeStatisticsModule.php @@ -86,18 +86,18 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn } else { $title = ''; } - $title .= $this->getTitle(); + $title .= $this->getTitle() . ' — ' . $WT_TREE->getTitleHtml(); $stats = new Stats($WT_TREE); - $content = '<b>' . $WT_TREE->getTitleHtml() . '</b><br>'; + $content = ''; if ($show_last_update) { - $content .= '<div>' . /* I18N: %s is a date */ - I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) . '</div>'; + $content .= '<p>' . /* I18N: %s is a date */ + I18N::translate('This family tree was last updated on %s.', strip_tags($stats->gedcomUpdated())) . '</p>'; } - /** Responsive Design */ + /** Responsive Design */ $content .= '<div class="stat-table1">'; if ($stat_indi) { $content .= '<div class="stat-row"><div class="facts_label stat-cell">' . I18N::translate('Individuals') . '</div><div class="facts_value stats_value stat-cell"><a href="' . "indilist.php?surname_sublist=no&ged=" . $WT_TREE->getNameUrl() . '">' . $stats->totalIndividuals() . '</a></div></div>'; @@ -194,7 +194,11 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn } $content .= '</div>'; if ($stat_link && Module::isActiveChart($WT_TREE, 'statistics_chart')) { - $content .= '<div class="clearfloat"><a href="statistics.php?ged=' . $WT_TREE->getNameUrl() . '" rel="nofollow"><b>' . I18N::translate('View the statistics as graphs') . '</b></a></div>'; + $content .= '<div class="clearfloat">'; + $content .= '<p>'; + $content .= '<a href="statistics.php?ged=' . $WT_TREE->getNameUrl() . '" rel="nofollow"><b>' . I18N::translate('View the statistics as graphs') . '</b></a>'; + $content .= '</p>'; + $content .= '</div>'; } if ($show_common_surnames) { @@ -206,8 +210,11 @@ class FamilyTreeStatisticsModule extends AbstractModule implements ModuleBlockIn if ($surnames) { $content .= '<div class="clearfloat">'; - $content .= '<p><strong>' . I18N::translate('Most common surnames') . '</strong></p>'; - $content .= '<div class="common_surnames">' . $surnames . '</div>'; + $content .= '<p>'; + $content .= '<strong>' . I18N::translate('Most common surnames') . '</strong>'; + $content .= '<br>'; + $content .= '<span class="common_surnames">' . $surnames . '</span>'; + $content .= '</p>'; $content .= '</div>'; } } |
