summaryrefslogtreecommitdiff
path: root/includes/controllers/individual_ctrl.php
diff options
context:
space:
mode:
authorNigel Osborne <kiwi3685@me.com>2010-06-07 07:08:52 +0000
committerNigel Osborne <kiwi3685@me.com>2010-06-07 07:08:52 +0000
commit01298427e99fe335a439a3685666855c9d120c26 (patch)
tree07d23e83a8b6266462cf2d33c640e97895c71359 /includes/controllers/individual_ctrl.php
parent9fc2a3be58ca5bcdb019ab385f549cd5ec724cda (diff)
downloadwebtrees-01298427e99fe335a439a3685666855c9d120c26.tar.gz
webtrees-01298427e99fe335a439a3685666855c9d120c26.tar.bz2
webtrees-01298427e99fe335a439a3685666855c9d120c26.zip
Second version of Individual page header area, as discussed on forum and emails. Includes changes to other styles
Diffstat (limited to 'includes/controllers/individual_ctrl.php')
-rw-r--r--includes/controllers/individual_ctrl.php37
1 files changed, 16 insertions, 21 deletions
diff --git a/includes/controllers/individual_ctrl.php b/includes/controllers/individual_ctrl.php
index 587fbbf478..6aa0927d5a 100644
--- a/includes/controllers/individual_ctrl.php
+++ b/includes/controllers/individual_ctrl.php
@@ -452,7 +452,7 @@ class IndividualControllerRoot extends BaseController {
$linenum = $event->getLineNumber();
$this->name_count++;
- echo '<div id="nameparts"';//, $this->name_count, '"';
+ echo '<div id="nameparts', $this->name_count, '"';
if (strpos($factrec, "WT_OLD")!==false) {
echo " class=\"namered\"";
}
@@ -460,18 +460,21 @@ class IndividualControllerRoot extends BaseController {
echo " class=\"nameblue\"";
}
echo ">";
- if (!preg_match("/^2 (SURN)|(GIVN)/m", $factrec)) {
- $dummy=new Person($factrec);
- $dummy->setPrimaryName(0);
- echo '<span class="label">', i18n::translate('Name'), ': </span>';
- echo PrintReady($dummy->getFullName()), '<br />';
- }
- $ct = preg_match_all('/\n2 (\w+) (.*)/', $factrec, $nmatch, PREG_SET_ORDER);
+ $dummy=new Person($factrec);
+ $dummy->setPrimaryName(0);
echo '<dl>';
+ echo '<dt class="label">', i18n::translate('Name'), '</dt>';
+ echo '<span class="field">', PrintReady($dummy->getFullName()), '</span>';
+ if (!$this->isPrintPreview() && $this->userCanEdit() && !strpos($factrec, 'WT_OLD')) {
+ echo "&nbsp;&nbsp;&nbsp;<a href=\"javascript:;\" class=\"font9\" onclick=\"edit_name('".$this->pid."', ".$linenum."); return false;\">", i18n::translate('Edit'), "</a> | ";
+ echo "<a class=\"font9\" href=\"javascript:;\" onclick=\"delete_record('".$this->pid."', ".$linenum."); return false;\">", i18n::translate('Delete'), "</a>";
+ echo help_link('delete_name');
+ }
+ $ct = preg_match_all('/\n2 (\w+) (.*)/', $factrec, $nmatch, PREG_SET_ORDER);
for($i=0; $i<$ct; $i++) {
$fact = trim($nmatch[$i][1]);
- if (($fact!="SOUR")&&($fact!="NOTE")) {
- echo '<dt class="label">', translate_fact($fact, $this->indi), ':&nbsp;</dt>';
+ if (($fact!="SOUR")&&($fact!="NOTE")&&($fact!="GIVN")&&($fact!="SURN")) {
+ echo '<dt class="label">', translate_fact($fact, $this->indi), '</dt>';
echo '<span class="field">';
if (isset($nmatch[$i][2])) {
$name = trim($nmatch[$i][2]);
@@ -483,25 +486,17 @@ class IndividualControllerRoot extends BaseController {
$name=preg_replace('/(\S*)\*/', '<span class="starredname">\\1</span>', $name);
echo PrintReady($name);
}
- if ($i == 0 && !$this->isPrintPreview() && $this->userCanEdit() && !strpos($factrec, 'WT_OLD')) {
- echo "&nbsp;&nbsp;&nbsp;<a href=\"javascript:;\" class=\"font9\" onclick=\"edit_name('".$this->pid."', ".$linenum."); return false;\">", i18n::translate('Edit'), "</a> | ";
- echo "<a class=\"font9\" href=\"javascript:;\" onclick=\"delete_record('".$this->pid."', ".$linenum."); return false;\">", i18n::translate('Delete'), "</a>";
- if ($this->name_count==2) {
- echo help_link('delete_name');
- }
- }
- echo '</span><br />';
+ echo '</span>';
}
echo '</dl>';
}
if (preg_match("/\d (NOTE)|(SOUR)/", $factrec)>0) {
// -- find sources for this name
- echo "<div class=\"indent\">";
+ echo '<div id="indi_note" class="clearfloat">';
print_fact_sources($factrec, 2);
//-- find the notes for this name
- //echo "&nbsp;&nbsp;&nbsp;";
print_fact_notes($factrec, 2);
- echo "</div><br />";
+ echo '</div>';
}
echo '</div>';
}