new pref to display emtpy lines in the planner

This commit is contained in:
Ralf Becker 2007-03-09 11:26:22 +00:00
parent 3a8cf8dba3
commit 7a06fca30e
2 changed files with 40 additions and 19 deletions

View File

@ -1,16 +1,14 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar - Views and Widgets *
* http://www.egroupware.org *
* Written and (c) 2004/5 by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* 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$ */
/**
* eGroupWare - Calendar's views and widgets
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
@ -18,10 +16,16 @@ require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
/**
* Class to generate the calendar views and the necesary widgets
*
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2004/5 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* The listview is in a separate class uilist!
*
* The new UI, BO and SO classes have a strikt definition, in which time-zone they operate:
* UI only operates in user-time, so there have to be no conversation at all !!!
* BO's functions take and return user-time only (!), they convert internaly everything to servertime, because
* SO operates only on server-time
*
* The state of the UI elements is managed in the uical class, which all UI classes extend.
*
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class uiviews extends uical
{
@ -1405,8 +1409,12 @@ class uiviews extends uical
// display a plannerRowWidget for each row (user or category)
foreach($sort2label as $sort => $label)
{
if (!isset($rows[$sort])) continue; // dont show empty categories (user-rows get all initialised
if (!isset($rows[$sort]) && (!$this->cal_prefs['planner_show_empty_rows'] ||
$by_cat === false && $this->cal_prefs['planner_show_empty_rows'] == 'cat' ||
$by_cat !== false && $this->cal_prefs['planner_show_empty_rows'] == 'user'))
{
continue; // dont show empty categories or user rows
}
$class = $class == 'row_on' ? 'row_off' : 'row_on';
$content .= $this->plannerRowWidget(isset($rows[$sort]) ? $rows[$sort] : array(),$start,$end,$label,$class,$indent."\t");
}

View File

@ -223,6 +223,20 @@
'xmlrpc' => True,
'admin' => False
),
'planner_show_empty_rows' => array(
'type' => 'select',
'label' => 'Show empty rows in Planner',
'name' => 'planner_show_empty_rows',
'values' => array(
'' => lang('no'),
'user' => lang('Planner by user'),
'cat' => lang('Planner by category'),
'both' => lang('All'),
),
'help' => 'Should the planner display an empty row for users or categories without any appointment.',
'xmlrpc' => True,
'admin' => False
),
'default_private' => array(
'type' => 'check',
'label' => 'Set new events to private',
@ -326,7 +340,6 @@
'xmlrpc' => True,
'admin' => False
),
// disabled free/busy stuff til it gets rewritten with new Horde iCal classes -- RalfBecker 2006/03/03
'freebusy' => array(
'type' => 'check',
'label' => 'Make freebusy information available to not loged in persons?',