getName().$block_id; $class=$this->getName().'_block'; if ($ctype=='gedcom' && WT_USER_GEDCOM_ADMIN || $ctype=='user' && WT_USER_ID) { $title=''; } else { $title=''; } $title.=$this->getTitle().help_link('todo', $this->getName()); $table_id = 'ID'.floor(microtime()*1000000); // create a unique ID $controller ->addExternalJavaScript(WT_STATIC_URL.'js/jquery/jquery.dataTables.min.js') ->addInlineJavaScript(' jQuery("#'.$table_id.'").dataTable( { "sDom": \'t\', '.WT_I18N::datatablesI18N().', "bAutoWidth":false, "bPaginate": false, "bLengthChange": false, "bFilter": false, "bInfo": true, "bJQueryUI": true, "aoColumns": [ /* 0-DATE */ { "bVisible": false }, /* 1-Date */ { "iDataSort": 0 }, /* 1-Record */ {}, /* 2-Username */ {}, /* 3-Text */ {} ] }); jQuery("#'.$table_id.'").css("visibility", "visible"); jQuery(".loading-image").css("display", "none"); '); $content=''; $content .= '
| DATE | '; //hidden by datables code $content .= ''.WT_Gedcom_Tag::getLabel('DATE').' | '; $content .= ''.WT_I18N::translate('Record').' | '; if ($show_unassigned || $show_other) { $content .= ''.WT_I18N::translate('Username').' | '; } $content .= ''.WT_Gedcom_Tag::getLabel('TEXT').' | '; $content .= '
|---|---|---|---|---|
| '; //hidden by datables code $content .= $todo['date']->JD(); $content .= ' | '; $content.=''. $todo['date']->Display(empty($SEARCH_SPIDER)).' | '; $content.=''.$record->getFullName().' | '; if ($show_unassigned || $show_other) { $content.=''.$user_name.' | '; } $text=get_gedcom_value('_TODO', 1, $todo['factrec']); $content.=''.$text.' | '; $content.='
'.WT_I18N::translate('There are no research tasks in this family tree.').'
'; } if ($template) { if ($block) { require WT_THEME_DIR.'templates/block_small_temp.php'; } else { require WT_THEME_DIR.'templates/block_main_temp.php'; } } else { return $content; } } // Implement class WT_Module_Block public function loadAjax() { return false; } // Implement class WT_Module_Block public function isUserBlock() { return true; } // Implement class WT_Module_Block public function isGedcomBlock() { return true; } // Implement class WT_Module_Block public function configureBlock($block_id) { if (safe_POST_bool('save')) { set_block_setting($block_id, 'show_other', safe_POST_bool('show_other')); set_block_setting($block_id, 'show_unassigned', safe_POST_bool('show_unassigned')); set_block_setting($block_id, 'show_future', safe_POST_bool('show_future')); set_block_setting($block_id, 'block', safe_POST_bool('block')); echo WT_JS_START, 'window.opener.location.href=window.opener.location.href;window.close();', WT_JS_END; exit; } require_once WT_ROOT.'includes/functions/functions_edit.php'; $show_other=get_block_setting($block_id, 'show_other', true); echo '