From 4c79906db68ae413dd50f024921678afb128b3a8 Mon Sep 17 00:00:00 2001 From: Veit Olschinski Date: Sun, 11 Apr 2010 20:09:32 +0000 Subject: Rename pgv_module.php to module.php --- modules/sources_tab/module.php | 157 +++++++++++++++++++++++++++++++++++++ modules/sources_tab/pgv_module.php | 157 ------------------------------------- 2 files changed, 157 insertions(+), 157 deletions(-) create mode 100644 modules/sources_tab/module.php delete mode 100644 modules/sources_tab/pgv_module.php (limited to 'modules/sources_tab') diff --git a/modules/sources_tab/module.php b/modules/sources_tab/module.php new file mode 100644 index 0000000000..d3b17609e4 --- /dev/null +++ b/modules/sources_tab/module.php @@ -0,0 +1,157 @@ + + + controller->indi->canDisplayDetails()) { + print ""; + } else { + ?> + + + + + controller->getOtherFacts(); + foreach ($otheritems as $key => $event) { + if ($event->getTag()=="SOUR") print_main_sources($event->getGedcomRecord(), 1, $this->controller->pid, $event->getLineNumber()); + $FACT_COUNT++; + } + } + // 2nd level sources [ 1712181 ] + $this->controller->indi->add_family_facts(false); + foreach ($this->controller->getIndiFacts() as $key => $factrec) { + print_main_sources($factrec->getGedcomRecord(), 2, $this->controller->pid, $factrec->getLineNumber(), true); + } + if ($this->get_source_count()==0) print "\n"; + //-- New Source Link + if (!$this->controller->isPrintPreview() && $this->controller->canedit) { + ?> + + + + + +
"; + print_privacy_error($CONTACT_EMAIL); + print "
+ onclick="toggleByClassName('TR', 'row_sour2');" /> + + +
".i18n::translate('There are no Source citations for this individual.')."
+ +
+
+
+ + + getName().'_content">'.ob_get_clean().''; + } + + function get_source_count() { + if ($this->sourceCount===null) { + $ct = preg_match_all("/\d SOUR @(.*)@/", $this->controller->indi->gedrec, $match, PREG_SET_ORDER); + foreach ($this->controller->indi->getSpouseFamilies() as $k => $sfam) + $ct += preg_match("/\d SOUR /", $sfam->getGedcomRecord()); + $this->sourceCount = $ct; + } + return $this->sourceCount; + } + + // Implement WT_Module_Tab + public function hasTabContent() { + return $this->get_source_count()>0; + } + // Implement WT_Module_Tab + public function canLoadAjax() { + return true; + } + + // Implement WT_Module_Tab + public function getPreLoadContent() { + return ''; + } + + // Implement WT_Module_Tab + public function getJSCallbackAllTabs() { + return ''; + } + + // Implement WT_Module_Tab + public function getJSCallback() { + return ''; + } + +} diff --git a/modules/sources_tab/pgv_module.php b/modules/sources_tab/pgv_module.php deleted file mode 100644 index d3b17609e4..0000000000 --- a/modules/sources_tab/pgv_module.php +++ /dev/null @@ -1,157 +0,0 @@ - - - controller->indi->canDisplayDetails()) { - print ""; - } else { - ?> - - - - - controller->getOtherFacts(); - foreach ($otheritems as $key => $event) { - if ($event->getTag()=="SOUR") print_main_sources($event->getGedcomRecord(), 1, $this->controller->pid, $event->getLineNumber()); - $FACT_COUNT++; - } - } - // 2nd level sources [ 1712181 ] - $this->controller->indi->add_family_facts(false); - foreach ($this->controller->getIndiFacts() as $key => $factrec) { - print_main_sources($factrec->getGedcomRecord(), 2, $this->controller->pid, $factrec->getLineNumber(), true); - } - if ($this->get_source_count()==0) print "\n"; - //-- New Source Link - if (!$this->controller->isPrintPreview() && $this->controller->canedit) { - ?> - - - - - -
"; - print_privacy_error($CONTACT_EMAIL); - print "
- onclick="toggleByClassName('TR', 'row_sour2');" /> - - -
".i18n::translate('There are no Source citations for this individual.')."
- -
-
-
- - - getName().'_content">'.ob_get_clean().''; - } - - function get_source_count() { - if ($this->sourceCount===null) { - $ct = preg_match_all("/\d SOUR @(.*)@/", $this->controller->indi->gedrec, $match, PREG_SET_ORDER); - foreach ($this->controller->indi->getSpouseFamilies() as $k => $sfam) - $ct += preg_match("/\d SOUR /", $sfam->getGedcomRecord()); - $this->sourceCount = $ct; - } - return $this->sourceCount; - } - - // Implement WT_Module_Tab - public function hasTabContent() { - return $this->get_source_count()>0; - } - // Implement WT_Module_Tab - public function canLoadAjax() { - return true; - } - - // Implement WT_Module_Tab - public function getPreLoadContent() { - return ''; - } - - // Implement WT_Module_Tab - public function getJSCallbackAllTabs() { - return ''; - } - - // Implement WT_Module_Tab - public function getJSCallback() { - return ''; - } - -} -- cgit v1.3