summaryrefslogtreecommitdiff
path: root/modules_v3
diff options
context:
space:
mode:
Diffstat (limited to 'modules_v3')
-rw-r--r--modules_v3/GEDFact_assistant/CENS_ctrl.php50
-rw-r--r--modules_v3/GEDFact_assistant/MEDIA_ctrl.php2
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php7
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php10
4 files changed, 51 insertions, 18 deletions
diff --git a/modules_v3/GEDFact_assistant/CENS_ctrl.php b/modules_v3/GEDFact_assistant/CENS_ctrl.php
index 42ebf7e539..a0ddd829dc 100644
--- a/modules_v3/GEDFact_assistant/CENS_ctrl.php
+++ b/modules_v3/GEDFact_assistant/CENS_ctrl.php
@@ -25,22 +25,60 @@
//
// $Id$
-$controller=new WT_Controller_Individual();
+$xref = safe_GET('xref', WT_REGEX_XREF);
+
+$person = WT_Individual::getInstance($xref);
+check_record_access($person);
+
+$controller
+ ->setPageTitle(WT_I18N::translate('Create a new Shared Note using Assistant'))
+ ->pageHeader();
+
+echo '<div id="edit_interface-page">';
+echo '<h3>', $controller->getPageTitle(), '&nbsp;&nbsp;';
+ // When more languages are added to the wiki, we can expand or redesign this
+ switch (WT_LOCALE) {
+ case 'fr':
+ echo wiki_help_link('/fr/Module_Assistant_Recensement');
+ break;
+ case 'en':
+ default:
+ echo wiki_help_link('/en/Census_Assistant_module');
+ break;
+ }
+echo '</h3>';
+
+?>
+<div class="center" style="width:100%;">
+ <?php
+ ?>
+ <form method="post" action="edit_interface.php" onsubmit="return check_form(this);">
+ <input type="hidden" name="action" value="addnoteaction_assisted">
+ <input type="hidden" name="noteid" value="newnote">
+ <input id="pid_array" type="hidden" name="pid_array" value="none">
+ <input id="xref" type="hidden" name="xref" value=<?php echo $xref; ?>>
+ <?php
global $tabno, $linkToID, $SEARCH_SPIDER;
global $SHOW_AGE_DIFF, $GEDCOM, $ABBREVIATE_CHART_LABELS;
global $show_full, $famid;
echo '<link type="text/css" href="', WT_STATIC_URL, WT_MODULES_DIR, 'GEDFact_assistant/css/cens_style.css" rel="stylesheet">';
-$summary=$controller->record->format_first_major_fact(WT_EVENTS_BIRT, 2);
-if (!($controller->record->isDead())) {
+$summary=$person->format_first_major_fact(WT_EVENTS_BIRT, 2);
+if (!($person->isDead())) {
// If alive display age
- $bdate=$controller->record->getBirthDate();
+ $bdate=$person->getBirthDate();
$age = WT_Date::GetAgeGedcom($bdate);
if ($age!="") {
$summary.= "<span class=\"label\">".WT_I18N::translate('Age').":</span><span class=\"field\"> ".get_age_at_event($age, true)."</span>";
}
}
-$summary.=$controller->record->format_first_major_fact(WT_EVENTS_DEAT, 2);
+$summary.=$person->format_first_major_fact(WT_EVENTS_DEAT, 2);
+
+require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_CENS/census_1_ctrl.php';
-$controller->census_assistant();
+?>
+ </form>
+ </div>
+ <div style="clear:both;"></div>
+</div><!-- id="edit_interface-page" -->
diff --git a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
index 765a432f2f..e264019641 100644
--- a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
+++ b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php
@@ -39,4 +39,4 @@ $summary=
$controller->record->format_first_major_fact(WT_EVENTS_BIRT, 2).
$controller->record->format_first_major_fact(WT_EVENTS_DEAT, 2);
-$controller->medialink_assistant();
+require WT_ROOT.WT_MODULES_DIR.'GEDFact_assistant/_MEDIA/media_1_ctrl.php';
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php b/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
index 0fa8dfe06f..89b056ffef 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_1_ctrl.php
@@ -32,8 +32,6 @@
global $summary, $censyear, $censdate;
-$pid = safe_get('pid');
-
$censdate = new WT_Date('31 MAR 1901');
$censyear = $censdate->date1->y;
@@ -43,7 +41,6 @@ $ctry = 'UK';
// === Set $married to "Not married as we only want the Birth name here" ===
$married=-1;
-$person=WT_Individual::getInstance($pid);
// var_dump($person->getAllNames());
$nam = $person->getAllNames();
if ($person->getDeathYear() == 0) { $DeathYr = ""; } else { $DeathYr = $person->getDeathYear(); }
@@ -53,8 +50,6 @@ $fulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $fulln);
$fulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $fulln);
$wholename = $fulln;
-$currpid=$pid;
-
echo '<script src="', WT_STATIC_URL, WT_MODULES_DIR, 'GEDFact_assistant/_CENS/js/dynamicoptionlist.js"></script>';
echo '<script src="', WT_STATIC_URL, WT_MODULES_DIR, 'GEDFact_assistant/_CENS/js/date.js"></script>';
@@ -67,7 +62,7 @@ echo '</script>';
echo '<div class="cens_header">';
echo '<div class="cens_header_left">';
echo WT_I18N::translate('Head of Household:');
-echo ' &nbsp;', $wholename, '&nbsp; (', $pid, ')';
+echo ' ', $wholename;
echo '</div>';
if ($summary) {
echo '<div class="cens_header_right">', $summary, '</div>';
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
index b4b171a09a..d260d611c5 100644
--- a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
+++ b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php
@@ -102,9 +102,9 @@ if (!defined('WT_WEBTREES')) {
//-- Build Parents Family --------------------------------------
$personcount=0;
- $families = $this->record->getChildFamilies();
+ $families = $person->getChildFamilies();
foreach ($families as $family) {
- $label = $this->record->getChildFamilyLabel($family);
+ $label = $person->getChildFamilyLabel($family);
$people = $this->buildFamilyList($family, "parents", false);
$marrdate = $family->getMarriageDate();
@@ -529,8 +529,8 @@ if (!defined('WT_WEBTREES')) {
//-- Step families ---------------------------------------------------------
//-- Build step families ---------------------------------------------------
- foreach ($this->record->getChildStepFamilies() as $family) {
- $label = $this->record->getStepFamilyLabel($family);
+ foreach ($person->getChildStepFamilies() as $family) {
+ $label = $person->getStepFamilyLabel($family);
$people = $this->buildFamilyList($family, "step-parents", false);
if ($people) {
echo "<tr><td><br></td><td></td></tr>";
@@ -958,7 +958,7 @@ if (!defined('WT_WEBTREES')) {
echo "<tr><td><font size=1><br></font></td></tr>";
//-- Build Spouse Family ---------------------------------------------------
- $families = $this->record->getSpouseFamilies();
+ $families = $person->getSpouseFamilies();
//$personcount = 0;
foreach ($families as $family) {
$people = $this->buildFamilyList($family, "spouse", false);