- Added small view for main screen display of infolog entries.

- Added pref setting for choosing and using small view.
- Updated calendar method to support display limit.
This commit is contained in:
shrykedude 2003-11-20 06:15:03 +00:00
parent 1e9f5d229f
commit 17fb3e7d52

View File

@ -1359,17 +1359,38 @@
'owner' => $this->bo->owner // num. id of the user, not necessary current user 'owner' => $this->bo->owner // num. id of the user, not necessary current user
)); ));
if(is_array($todo_label))
{
list($label,$showall)=$todo_label;
}
else
{
$label=$todo_label;
$showall=true;
}
$maxshow = intval($GLOBALS['phpgw_info']['user']['preferences']['infolog']['mainscreen_maxshow']);
if($maxshow<=0)
{
$maxshow=10;
}
//print_debug("get_todos(): label=$label; showall=$showall; max=$maxshow");
$content = $todo_label = ''; $content = $todo_label = '';
if (is_array($todos_from_hook) && count($todos_from_hook)) if (is_array($todos_from_hook) && count($todos_from_hook))
{ {
$todo_label = lang("open ToDo's:"); $todo_label = !empty($label)?$label:lang("open ToDo's:");
foreach($todos_from_hook as $todos) foreach($todos_from_hook as $todos)
{ {
$i = 0;
if (is_array($todos) && count($todos)) if (is_array($todos) && count($todos))
{ {
foreach($todos as $todo) foreach($todos as $todo)
{ {
if(!$showall && ($i++>$maxshow))
{
break;
}
$icons = ''; $icons = '';
foreach($todo['icons'] as $name => $app) foreach($todo['icons'] as $name => $app)
{ {