2003-03-28 03:26:04 +01:00
< ? php
/************************************************************************** \
2003-12-10 02:21:31 +01:00
* eGroupWare - InfoLog Preferences *
* http :// www . eGroupWare . org *
* Written by Ralf Becker < RalfBecker @ outdoor - training . de > *
2003-03-28 03:26:04 +01:00
* -------------------------------------------- *
* This program is free software ; you can redistribute it and / or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation ; either version 2 of the License , or ( at your *
* option ) any later version . *
\ **************************************************************************/
/* $Id$ */
2005-07-23 11:44:46 +02:00
/* Setup some values to fill the array of this app's settings below */
2005-04-06 13:05:57 +02:00
$ui =& CreateObject ( 'infolog.uiinfolog' ); // need some labels from
2006-04-09 07:34:59 +02:00
$filters = $show_home = array ();
$show_home [] = lang ( " DON'T show InfoLog " );
2003-07-31 11:18:27 +02:00
foreach ( $ui -> filters as $key => $label )
{
2006-04-09 07:34:59 +02:00
$show_home [ $key ] = $filters [ $key ] = lang ( $label );
2003-07-31 11:18:27 +02:00
}
2006-10-24 13:58:14 +02:00
$have_custom_fields = count ( $ui -> bo -> customfields ) > 0 ;
2003-03-28 03:26:04 +01:00
unset ( $ui );
2006-04-09 07:34:59 +02:00
// migrage old filter-pref 1,2 to the filter one 'own-open-today'
if ( in_array ( $GLOBALS [ 'egw' ] -> preferences -> { $GLOBALS [ 'type' ]}[ 'homeShowEvents' ], array ( '1' , '2' )))
{
$GLOBALS [ 'egw' ] -> preferences -> add ( 'infolog' , 'homeShowEvents' , 'own-open-today' , $GLOBALS [ 'type' ]);
$GLOBALS [ 'egw' ] -> preferences -> save_repository ();
}
2003-06-29 19:03:47 +02:00
$show_links = array (
'all' => lang ( 'all links and attachments' ),
'links' => lang ( 'only the links' ),
'attach' => lang ( 'only the attachments' ),
2005-07-23 17:48:52 +02:00
'none' => lang ( 'no links or attachments' ),
'no_describtion' => lang ( 'no describtion, links or attachments' ),
2003-06-29 19:03:47 +02:00
);
2006-04-09 07:34:59 +02:00
$show_details = array (
0 => lang ( 'No' ),
1 => lang ( 'Yes' ),
2 => lang ( 'Only for details' ),
);
2005-07-23 11:44:46 +02:00
/* Settings array for this app */
$GLOBALS [ 'settings' ] = array (
'defaultFilter' => array (
'type' => 'select' ,
'label' => 'Default Filter for InfoLog' ,
'name' => 'defaultFilter' ,
'values' => $filters ,
'help' => 'This is the filter InfoLog uses when you enter the application. Filters limit the entries to show in the actual view. There are filters to show only finished, still open or futures entries of yourself or all users.' ,
'xmlrpc' => True ,
'admin' => False
),
2006-04-09 07:34:59 +02:00
'homeShowEvents' => array (
'type' => 'select' ,
'label' => 'InfoLog filter for the main screen' ,
'name' => 'homeShowEvents' ,
'values' => $show_home ,
'help' => 'Should InfoLog show up on the main screen and with which filter. Works only if you dont selected an application for the main screen (in your preferences).' ,
'xmlrpc' => True ,
'admin' => False
),
2005-07-23 11:44:46 +02:00
'listNoSubs' => array (
'type' => 'check' ,
'label' => 'List no Subs/Childs' ,
'name' => 'listNoSubs' ,
'help' => 'Should InfoLog show Subtasks, -calls or -notes in the normal view or not. You can always view the Subs via there parent.' ,
'xmlrpc' => True ,
'admin' => False
),
'show_links' => array (
'type' => 'select' ,
'label' => 'Show in the InfoLog list' ,
'name' => 'show_links' ,
'values' => $show_links ,
2005-10-13 17:02:19 +02:00
'help' => 'Should InfoLog show the links to other applications and/or the file-attachments in the InfoLog list (normal view when you enter InfoLog).' ,
2005-07-23 11:44:46 +02:00
'xmlrpc' => True ,
'admin' => False
2005-10-13 17:02:19 +02:00
),
'never_hide' => array (
'type' => 'check' ,
'label' => 'Never hide search and filters' ,
'name' => 'never_hide' ,
'help' => 'If not set, the line with search and filters is hidden for less entries then "max matches per page" (as defined in your common preferences).' ,
'xmlrpc' => True ,
'admin' => False
),
2005-12-06 08:11:14 +01:00
'show_times' => array (
2006-04-09 07:34:59 +02:00
'type' => 'select' ,
2005-12-06 08:11:14 +01:00
'label' => 'Show times' ,
'name' => 'show_times' ,
2006-04-09 07:34:59 +02:00
'values' => $show_details ,
2005-12-06 08:11:14 +01:00
'help' => 'Show a column for used and planned times in the list.' ,
'xmlrpc' => True ,
'admin' => False
),
2006-03-24 17:10:09 +01:00
'show_percent' => array (
2006-04-09 07:34:59 +02:00
'type' => 'select' ,
2006-03-24 17:10:09 +01:00
'label' => 'Show status and percent done separate' ,
'name' => 'show_percent' ,
2006-04-09 07:34:59 +02:00
'values' => $show_details ,
2006-03-24 17:10:09 +01:00
'help' => 'Should the Infolog list show the percent done only for status ongoing or two separate icons.' ,
'xmlrpc' => True ,
'admin' => False
),
'show_id' => array (
2006-04-09 07:34:59 +02:00
'type' => 'select' ,
2006-03-24 17:10:09 +01:00
'label' => 'Show ticket Id' ,
'name' => 'show_id' ,
2006-04-09 07:34:59 +02:00
'values' => $show_details ,
2006-03-24 17:10:09 +01:00
'help' => 'Should the Infolog list show a unique numerical Id, which can be used eg. as ticket Id.' ,
'xmlrpc' => True ,
'admin' => False
),
2006-04-09 07:34:59 +02:00
'show_modified' => array (
'type' => 'select' ,
'label' => 'Show last modified' ,
'name' => 'show_modified' ,
'values' => $show_details ,
'help' => 'Should the Infolog list show the column "last modified".' ,
'xmlrpc' => True ,
'admin' => False
),
2006-03-17 21:53:26 +01:00
'set_start' => array (
'type' => 'select' ,
'label' => 'Startdate for new entries' ,
'name' => 'set_start' ,
'values' => array (
'date' => lang ( 'todays date' ),
'datetime' => lang ( 'actual date and time' ),
'empty' => lang ( 'leave it empty' ),
),
'help' => 'To what should the startdate of new entries be set.' ,
'xmlrpc' => True ,
'admin' => False
),
2005-07-23 11:44:46 +02:00
);
2006-10-24 13:58:14 +02:00
if ( $have_custom_fields )
{
$GLOBALS [ 'settings' ][ 'cal_show_custom' ] = array (
'type' => 'check' ,
'label' => 'Should the calendar show custom types too' ,
'name' => 'cal_show_custom' ,
'help' => 'Do you want to see custome InfoLog types in the calendar?' ,
'xmlrpc' => True ,
'admin' => False
);
}
2006-04-09 07:34:59 +02:00
unset ( $show_home );
unset ( $show_details );
2005-07-23 11:44:46 +02:00
unset ( $filters );
2003-11-20 07:40:29 +01:00
unset ( $show_links );