From 17fb3e7d52974373a1a7b720003816b80fb18e8c Mon Sep 17 00:00:00 2001 From: shrykedude Date: Thu, 20 Nov 2003 06:15:03 +0000 Subject: [PATCH] - 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. --- calendar/inc/class.uicalendar.inc.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index 9d0df0e19e..2311e0a7a6 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -1359,17 +1359,38 @@ '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 = ''; 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) { + $i = 0; if (is_array($todos) && count($todos)) { foreach($todos as $todo) { + if(!$showall && ($i++>$maxshow)) + { + break; + } $icons = ''; foreach($todo['icons'] as $name => $app) {