summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--individual.php81
-rw-r--r--library/WT/Controller/Individual.php11
-rw-r--r--themes/clouds/style.css2
-rw-r--r--themes/colors/css/colors.css2
-rw-r--r--themes/fab/style.css2
-rw-r--r--themes/minimal/style.css2
-rw-r--r--themes/webtrees/style.css2
-rw-r--r--themes/xenea/style.css2
8 files changed, 44 insertions, 60 deletions
diff --git a/individual.php b/individual.php
index 48a14279fd..bfce3874bc 100644
--- a/individual.php
+++ b/individual.php
@@ -200,59 +200,34 @@ if ($controller->indi->canDisplayDetails()) {
}
echo '</div>'; // close #indi_mainimage
$globalfacts=$controller->getGlobalFacts();
- echo '<div id="header_accordion1">', // contain accordions for names
- '<h3 class="name_one ', $controller->getPersonStyle($controller->indi), '"><span>', $controller->indi->getFullName(), '</span>'; // First name accordion element
- if (WT_USER_IS_ADMIN) {
- $user_id=get_user_from_gedcom_xref(WT_GED_ID, $controller->pid);
- if ($user_id) {
- $user_name=get_user_name($user_id);
- echo '<span> - <a href="admin_users.php?action=edituser&amp;username='.$user_name.'">'.$user_name.'</span></a>';
- }
- }
- $bdate=$controller->indi->getBirthDate();
- $ddate=$controller->indi->getDeathDate();
- echo '<span class="header_age">';
- if ($bdate->isOK() && !$controller->indi->isDead()) {
- // If living display age
- echo strip_tags(WT_Gedcom_Tag::getLabelValue('AGE', get_age_at_event(WT_Date::GetAgeGedcom($bdate), true)), '<span>');
- } elseif ($bdate->isOK() && $ddate->isOK()) {
- // If dead, show age at death
- echo strip_tags(WT_Gedcom_Tag::getLabelValue('AGE', get_age_at_event(WT_Date::GetAgeGedcom($bdate, $ddate), false)), '<span>');
- }
- echo '</span>';
- // Display summary birth/death info.
- echo '<span id="dates">', $controller->indi->getLifeSpan(), '</span>';
- //Display gender icon
- $nameSex = array('NAME', 'SEX');
- foreach ($globalfacts as $key=>$value) {
- $fact = $value->getTag();
- if (in_array($fact, $nameSex)) {
- if ($fact=="SEX") $controller->print_sex_record($value);
- }
- }
- echo '</h3>';
- //Display name details
- $nameSex = array('NAME', 'SEX');
- foreach ($globalfacts as $key=>$value) {
- if ($key == 0) {
- // First name
- $fact = $value->getTag();
- if (in_array($fact, $nameSex)) {
- if ($fact=="NAME") $controller->print_name_record($value);
- }
- }
- }
- //Display name details
- $nameSex = array('NAME', 'SEX');
- foreach ($globalfacts as $key=>$value) {
- if ($key != 0) {
- // 2nd and more names
- $fact = $value->getTag();
- if (in_array($fact, $nameSex)) {
- if ($fact=="NAME") $controller->print_name_record($value);
- }
- }
- }
+ echo '<div id="header_accordion1">'; // contain accordions for names
+ echo '<h3 class="name_one ', $controller->getPersonStyle($controller->indi), '"><span>', $controller->indi->getFullName(), '</span>'; // First name accordion header
+ $bdate=$controller->indi->getBirthDate();
+ $ddate=$controller->indi->getDeathDate();
+ echo '<span class="header_age">';
+ if ($bdate->isOK() && !$controller->indi->isDead()) {
+ // If living display age
+ echo strip_tags(WT_Gedcom_Tag::getLabelValue('AGE', get_age_at_event(WT_Date::GetAgeGedcom($bdate), true)), '<span>');
+ } elseif ($bdate->isOK() && $ddate->isOK()) {
+ // If dead, show age at death
+ echo strip_tags(WT_Gedcom_Tag::getLabelValue('AGE', get_age_at_event(WT_Date::GetAgeGedcom($bdate, $ddate), false)), '<span>');
+ }
+ echo '</span>';
+ // Display summary birth/death info.
+ echo '<span id="dates">', $controller->indi->getLifeSpan(), '</span>';
+ //Display gender icon
+ foreach ($globalfacts as $key=>$value) {
+ $fact = $value->getTag();
+ if ($fact=="SEX") $controller->print_sex_record($value);
+ }
+ echo '</h3>'; // close first name accordion header
+
+ //Display name details
+ foreach ($globalfacts as $key=>$value) {
+ $fact = $value->getTag();
+ if ($fact=="NAME") $controller->print_name_record($value);
+ }
+
echo
'</div>', // close header_accordion1
WT_JS_START,
diff --git a/library/WT/Controller/Individual.php b/library/WT/Controller/Individual.php
index cfcedaae4d..071e9843a3 100644
--- a/library/WT/Controller/Individual.php
+++ b/library/WT/Controller/Individual.php
@@ -293,6 +293,15 @@ class WT_Controller_Individual extends WT_Controller_Base {
echo '<div id="name1">';
echo '<dl><dt class="label">', WT_I18N::translate('Name'), '</dt>';
echo '<dd class="field">', $dummy->getFullName();
+ if ($this->name_count == 1) {
+ if (WT_USER_IS_ADMIN) {
+ $user_id=get_user_from_gedcom_xref(WT_GED_ID, $this->pid);
+ if ($user_id) {
+ $user_name=get_user_name($user_id);
+ echo '<span> - <a class="warning" href="admin_users.php?action=edituser&amp;username='.$user_name.'">'.$user_name.'</span></a>';
+ }
+ }
+ }
if ($this->indi->canEdit() && !strpos($factrec, "\nWT_OLD")) {
echo "<div class=\"deletelink\"><a class=\"font9 deleteicon\" href=\"javascript:;\" onclick=\"delete_record('".$this->pid."', ".$linenum."); return false;\" title=\"".WT_I18N::translate('Delete name')."\"><span class=\"link_text\">".WT_I18N::translate('Delete name')."</span></a></div>";
echo "<div class=\"editlink\"><a href=\"javascript:;\" class=\"font9 editicon\" onclick=\"edit_name('".$this->pid."', ".$linenum."); return false;\" title=\"".WT_I18N::translate('Edit name')."\"><span class=\"link_text\">".WT_I18N::translate('Edit name')."</span></a></div>";
@@ -304,7 +313,7 @@ class WT_Controller_Individual extends WT_Controller_Base {
for ($i=0; $i<$ct; $i++) {
echo '<div>';
$fact = trim($nmatch[$i][1]);
- if (($fact!="SOUR")&&($fact!="NOTE") && ($fact!="SPFX")) {
+ if (($fact!="SOUR") && ($fact!="NOTE") && ($fact!="SPFX")) {
echo '<dl><dt class="label">', WT_Gedcom_Tag::getLabel($fact, $this->indi), '</dt>';
echo '<dd class="field">';
if (isset($nmatch[$i][2])) {
diff --git a/themes/clouds/style.css b/themes/clouds/style.css
index 81be1121f2..9b26e9b14a 100644
--- a/themes/clouds/style.css
+++ b/themes/clouds/style.css
@@ -1760,7 +1760,7 @@ html[dir='rtl'] .editlink, html[dir='rtl'] .copylink, html[dir='rtl'] .deletelin
#indi_mainimage a img {float:left; padding:0;}
#indi_name_details { margin:0; padding: 5px;}
-#indi_name_details a {color:#333377;}
+#indi_name_details a {color:red; font-size:1em;}
#indi_name_details dt:after {content:":";}
#indi_note .fact_SOUR a {font-size:100%; margin: 3px 0}
diff --git a/themes/colors/css/colors.css b/themes/colors/css/colors.css
index ed07cfbd53..5f3a44bbf9 100644
--- a/themes/colors/css/colors.css
+++ b/themes/colors/css/colors.css
@@ -1736,7 +1736,7 @@ html[dir='rtl'].field .editlink, html[dir='rtl'].field .deletelink {float:lef
#indi_mainimage a img {float:left; padding:0;}
#indi_name_details { margin:0; padding: 5px;}
-#indi_name_details a {color:#333377;}
+#indi_name_details a {color:red; font-size:1em;}
#indi_name_details dt:after {content:":";}
#indi_note .fact_SOUR a {font-size:100%; margin: 3px 0}
diff --git a/themes/fab/style.css b/themes/fab/style.css
index 660c8ecbac..903f9dd609 100644
--- a/themes/fab/style.css
+++ b/themes/fab/style.css
@@ -1086,7 +1086,7 @@ html[dir='rtl'].field .editlink, html[dir='rtl'].field .deletelink {float:lef
#indi_mainimage a img {float:right; padding:0;}
#indi_name_details { margin:0; padding: 5px;}
-#indi_name_details a {color:#333377;}
+#indi_name_details a {color:red; font-size:1em;}
#indi_name_details dt:after { content:":"; }
#name1 {}
diff --git a/themes/minimal/style.css b/themes/minimal/style.css
index 9174814928..cde5b19118 100644
--- a/themes/minimal/style.css
+++ b/themes/minimal/style.css
@@ -1447,7 +1447,7 @@ html[dir='rtl'].field .editlink, html[dir='rtl'].field .deletelink {float:lef
#indi_mainimage a img {float:right; padding:0;}
#indi_name_details {background: none #FFF; border: none; font-size:10px; margin:0; padding: 5px;}
-#indi_name_details a {}
+#indi_name_details a {font-size:1em;}
#indi_name_details dt:after { content:":";}
#indi_name_details dt.label, #indi_name_details dd.field {font-size:12px;}
#name1 {}
diff --git a/themes/webtrees/style.css b/themes/webtrees/style.css
index 4dfad83b58..f0c1193012 100644
--- a/themes/webtrees/style.css
+++ b/themes/webtrees/style.css
@@ -1628,7 +1628,7 @@ html[dir='rtl'].field .editlink, html[dir='rtl'].field .deletelink {float:lef
#indi_mainimage a img {float:left; padding:0;}
#indi_name_details { margin:0; padding: 5px;}
-#indi_name_details a {color:#333377;}
+#indi_name_details a {color:red; font-size:1em;}
#indi_name_details dt:after {content:":";}
#name1 {}
diff --git a/themes/xenea/style.css b/themes/xenea/style.css
index 46f6bacb60..344e2f091d 100644
--- a/themes/xenea/style.css
+++ b/themes/xenea/style.css
@@ -1739,7 +1739,7 @@ html[dir='rtl'].field .editlink, html[dir='rtl'].field .deletelink {float:lef
#indi_mainimage a img {float:left; padding:0;}
#indi_name_details { margin:0; padding: 5px;}
-#indi_name_details a {color:#333377;}
+#indi_name_details a {color:red; font-size:1em;}
#indi_name_details dt:after { content:":"; }
#name1 {}