<?php
/**
 * $Horde: nag/config/prefs.php.dist,v 1.42 2004/12/07 19:55:17 chuck Exp $
 *
 * See horde/config/prefs.php for documentation on the structure of this file.
 */

// Make sure that constants are defined.
@define('NAG_BASE', dirname(__FILE__) . '/..');
require_once NAG_BASE . '/lib/Nag.php';

$prefGroups['display'] = array(
    'column' => _("General Options"),
    'label' => _("Display Options"),
    'desc' => _("Change your task sorting and display options."),
    'members' => array('sortby', 'altsortby', 'sortdir')
);

$prefGroups['share'] = array(
    'column' => _("Task List and Share Options"),
    'label' => _("Default Task List"),
    'desc' => _("Choose your default task list."),
    'members' => array('tasklistselect')
);

$_show_external = array();
if ($GLOBALS['registry']->hasMethod('getListTypes', 'whups')) {
    $_show_external['whups'] = $GLOBALS['registry']->get('name', 'whups');
}
if (count($_show_external)) {
    $prefGroups['external'] = array(
        'column'  => _("Task List and Share Options"),
        'label'   => _("External Data"),
        'desc'    => _("Show data from other applications or sources."),
        'members' => array('show_external')
    );
}

// user preferred sorting column
$_prefs['sortby'] = array(
    'value' => NAG_SORT_PRIORITY,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(NAG_SORT_PRIORITY => _("Priority"),
                    NAG_SORT_NAME => _("Task Name"),
                    NAG_SORT_CATEGORY => _("Category"),
                    NAG_SORT_DUE => _("Due Date"),
                    NAG_SORT_COMPLETION => _("Completed?"),
                    NAG_SORT_OWNER => _("Owner")),
    'desc' => _("Sort tasks by:")
);

// alternate sort column
$_prefs['altsortby'] = array(
    'value' => NAG_SORT_CATEGORY,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(NAG_SORT_PRIORITY => _("Priority"),
                    NAG_SORT_NAME => _("Task Name"),
                    NAG_SORT_CATEGORY => _("Category"),
                    NAG_SORT_DUE => _("Due Date"),
                    NAG_SORT_COMPLETION => _("Completed?"),
                    NAG_SORT_OWNER => _("Owner")),
    'desc' => _("Then:")
);

// user preferred sorting direction
$_prefs['sortdir'] = array(
    'value' => NAG_SORT_ASCEND,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(NAG_SORT_ASCEND => _("Ascending"),
                    NAG_SORT_DESCEND => _("Descending")),
    'desc' => _("Sort direction:")
);

// show data from other applications that can be listed as tasks?
if (count($_show_external)) {
    $_prefs['show_external'] = array(
        'value' => 'a:0:{}',
        'locked' => false,
        'shared' => false,
        'type' => 'multienum',
        'enum' => $_show_external,
        'desc' => _("Show data from any of these other applications in your task list?")
    );
}

// show complete/incomplete tasks?
$_prefs['show_completed'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(1 => _("All tasks"),
                    0 => _("Incomplete tasks"),
                    2 => _("Complete tasks")),
    'desc' => _("Show complete, incomplete, or all tasks in the task list?")
);

// user task categories
$_prefs['task_categories'] = array(
    'value' => '',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

// default tasklist selection widget
$_prefs['tasklistselect'] = array('type' => 'special');

// default tasklists
// Set locked to true if you don't want users to have multiple tasklists.
$_prefs['default_tasklist'] = array(
    'value' => Auth::getAuth() ? Auth::getAuth() : 0,
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// store the tasklists to diplay
$_prefs['display_tasklists'] = array(
    'value' => 'a:0:{}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);
