i18n::translate('"To Do" tasks'),
'type'=>'both',
'descr'=>i18n::translate('The To Do block lists all outstanding _TODO facts in the database.'),
'canconfig'=>true,
'config'=>array(
'cache' =>0,
'show_unassigned'=>true, // show unassigned items
'show_other' =>false, // show items assigned to other users
'show_future' =>false // show items with a future date
)
);
// this block prints a list of _TODO events in your gedcom
function print_todo($block=true, $config='', $side, $index) {
global $ctype, $WT_IMAGE_DIR, $WT_IMAGES, $WT_BLOCKS;
$block=true; // Always restrict this block's height
if (empty($config)) {
$config=$WT_BLOCKS['print_todo']['config'];
}
$id='todo';
$title='';
if ($WT_BLOCKS['print_todo']['canconfig']) {
if ($ctype=='gedcom' && WT_USER_GEDCOM_ADMIN || $ctype=='user' && WT_USER_ID) {
if ($ctype=='gedcom') {
$name = WT_GEDCOM;
} else {
$name = WT_USER_NAME;
}
$title .= "";
$title .= "";
}
}
$title.=i18n::translate('"To Do" tasks').help_link('todo');
$content='';
require_once WT_ROOT.'js/sorttable.js.htm';
require_once WT_ROOT.'includes/classes/class_gedcomrecord.php';
$table_id = 'ID'.floor(microtime()*1000000); // sorttable requires a unique ID
$content .= '
| '.i18n::translate('DATE').' | '; $content .= ''.i18n::translate('Record').' | '; if ($config['show_unassigned']=='yes' || $config['show_other']=='yes') { $content .= ''.i18n::translate('User name').' | '; } $content .= ''.i18n::translate('TEXT').' | '; $content .= '
|---|---|---|---|
| '.str_replace('Display(false)).' | '; $name=$record->getListName(); $content.=''.PrintReady($name).' | '; if ($config['show_unassigned']=='yes' || $config['show_other']=='yes') { $content.=''.$pgvu.' | '; } $text=get_gedcom_value('_TODO', 1, $todo['factrec']); $content.=''.PrintReady($text).' | '; $content.='
'.i18n::translate('There are no "To Do" tasks.').'
'; } global $THEME_DIR; if ($block) { require $THEME_DIR.'templates/block_small_temp.php'; } else { require $THEME_DIR.'templates/block_main_temp.php'; } } function print_todo_config($config) { global $WT_BLOCKS, $DAYS_TO_SHOW_LIMIT; if (empty($config)) { $config=$WT_BLOCKS['print_todo']['config']; } echo '