diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/Module/IndividualFactsTabModule.php | 58 | ||||
| -rw-r--r-- | app/Module/NotesTabModule.php | 8 | ||||
| -rw-r--r-- | app/Module/RelativesTabModule.php | 10 | ||||
| -rw-r--r-- | app/Module/SourcesTabModule.php | 8 |
4 files changed, 45 insertions, 39 deletions
diff --git a/app/Module/IndividualFactsTabModule.php b/app/Module/IndividualFactsTabModule.php index 6fc9d59d4b..d53b21fca6 100644 --- a/app/Module/IndividualFactsTabModule.php +++ b/app/Module/IndividualFactsTabModule.php @@ -119,24 +119,30 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf Functions::sortFacts($indifacts); ob_start(); - - echo '<table class="facts_table">'; - echo '<colgroup>'; - echo '<col class="width20">'; - echo '<col class="width80">'; - echo '</colgroup>'; - echo '<tbody>'; - echo '<tr><td colspan="2" class="descriptionbox rela">'; - echo '<form action="?"><input id="checkbox_rela_facts" type="checkbox" '; - echo $controller->record->getTree()->getPreference('EXPAND_RELATIVES_EVENTS') ? 'checked' : ''; - echo ' onclick="jQuery(\'tr.rela\').toggle();"><label for="checkbox_rela_facts">', I18N::translate('Events of close relatives'), '</label>'; - if (file_exists(Site::getPreference('INDEX_DIRECTORY') . 'histo.' . WT_LOCALE . '.php')) { - echo ' <input id="checkbox_histo" type="checkbox" '; - echo $EXPAND_HISTO_EVENTS ? 'checked' : ''; - echo ' onclick="jQuery(\'tr.histo\').toggle();"><label for="checkbox_histo">', I18N::translate('Historical facts'), '</label>'; - } - echo '</form>'; - echo '</td></tr>'; + ?> + <table class="facts_table"> + <colgroup> + <col class="width20"> + <col class="width80"> + </colgroup> + <tbody> + <tr> + <td colspan="2" class="descriptionbox noprint"> + <?php if ($controller->record->getTree()->getPreference('SHOW_RELATIVES_EVENTS')) : ?> + <label> + <input id="checkbox_rela_facts" type="checkbox" checked> + <?php echo I18N::translate('Events of close relatives'); ?> + </label> + <?php endif; ?> + <?php if (file_exists(Site::getPreference('INDEX_DIRECTORY') . 'histo.' . WT_LOCALE . '.php')) : ?> + <label> + <input id="checkbox_rela_facts" type="checkbox" checked> + <?php echo I18N::translate('Historical facts'); ?> + </label> + <?php endif; ?> + </td> + </tr> + <?php if (!$indifacts) { echo '<tr><td colspan="2" class="facts_value">', I18N::translate('There are no facts for this individual.'), '</td></tr>'; @@ -150,15 +156,15 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf if ($controller->record->canEdit()) { FunctionsPrint::printAddNewFact($controller->record->getXref(), $indifacts, 'INDI'); } - echo '</tbody>'; - echo '</table>'; - if (!$controller->record->getTree()->getPreference('EXPAND_RELATIVES_EVENTS')) { - echo '<script>jQuery("tr.rela").toggle();</script>'; - } - if (!$EXPAND_HISTO_EVENTS) { - echo '<script>jQuery("tr.histo").toggle();</script>'; - } + ?> + </tbody> + </table> + <script> + persistant_toggle("checkbox_rela_facts", "tr.rela"); + persistant_toggle("checkbox_histo", "tr.histo"); + </script> + <?php return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>'; } diff --git a/app/Module/NotesTabModule.php b/app/Module/NotesTabModule.php index ef1e83813a..1a406850cc 100644 --- a/app/Module/NotesTabModule.php +++ b/app/Module/NotesTabModule.php @@ -58,13 +58,10 @@ class NotesTabModule extends AbstractModule implements ModuleTabInterface { /** {@inheritdoc} */ public function getTabContent() { - global $WT_TREE, $controller; + global $controller; ob_start(); ?> - <script> - persistant_toggle("checkbox_note2", "row_note2"); - </script> <table class="facts_table"> <colgroup> <col class="width20"> @@ -120,6 +117,9 @@ class NotesTabModule extends AbstractModule implements ModuleTabInterface { } ?> </table> + <script> + persistant_toggle("checkbox_note2", ".row_note2"); + </script> <?php return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>'; diff --git a/app/Module/RelativesTabModule.php b/app/Module/RelativesTabModule.php index 661d6bf7a0..1fa62e752b 100644 --- a/app/Module/RelativesTabModule.php +++ b/app/Module/RelativesTabModule.php @@ -297,7 +297,7 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface { /** {@inheritdoc} */ public function getTabContent() { - global $WT_TREE, $show_full, $controller; + global $show_full, $controller; if (isset($show_full)) { $saved_show_full = $show_full; @@ -307,13 +307,10 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface { ob_start(); ?> - <script> - persistant_toggle("checkbox_elder", "elderdate"); - </script> <table class="facts_table"> <tr class="noprint"> <td class="descriptionbox rela"> - <label for="checkbox_elder"> + <label> <input id="checkbox_elder" type="checkbox" checked> <?php echo I18N::translate('Date differences'); ?> </label> @@ -402,6 +399,9 @@ class RelativesTabModule extends AbstractModule implements ModuleTabInterface { </td> </tr> </table> + <script> + persistant_toggle("checkbox_elder", ".elderdate"); + </script> <?php } ?> <br> <?php diff --git a/app/Module/SourcesTabModule.php b/app/Module/SourcesTabModule.php index 02baf06a9c..97a2ed697f 100644 --- a/app/Module/SourcesTabModule.php +++ b/app/Module/SourcesTabModule.php @@ -58,13 +58,10 @@ class SourcesTabModule extends AbstractModule implements ModuleTabInterface { /** {@inheritdoc} */ public function getTabContent() { - global $controller, $WT_TREE; + global $controller; ob_start(); ?> - <script> - persistant_toggle("checkbox_sour2", "row_sour2"); - </script> <table class="facts_table"> <tr class="noprint"> <td colspan="2" class="descriptionbox rela"> @@ -103,6 +100,9 @@ class SourcesTabModule extends AbstractModule implements ModuleTabInterface { } ?> </table> + <script> + persistant_toggle("checkbox_sour2", ".row_sour2"); + </script> <?php return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>'; |
