forked from extern/egroupware
new pref to display emtpy lines in the planner
This commit is contained in:
parent
3a8cf8dba3
commit
7a06fca30e
@ -1,27 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**
|
||||||
* eGroupWare - Calendar - Views and Widgets *
|
* eGroupWare - Calendar's views and widgets
|
||||||
* http://www.egroupware.org *
|
*
|
||||||
* Written and (c) 2004/5 by Ralf Becker <RalfBecker@outdoor-training.de> *
|
* @link http://www.egroupware.org
|
||||||
* -------------------------------------------- *
|
* @package calendar
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* option) any later version. *
|
* @version $Id$
|
||||||
\**************************************************************************/
|
*/
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
|
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
|
||||||
require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
|
require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to generate the calendar views and the necesary widgets
|
* Class to generate the calendar views and the necesary widgets
|
||||||
|
*
|
||||||
|
* The listview is in a separate class uilist!
|
||||||
*
|
*
|
||||||
* @package calendar
|
* The new UI, BO and SO classes have a strikt definition, in which time-zone they operate:
|
||||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* UI only operates in user-time, so there have to be no conversation at all !!!
|
||||||
* @copyright (c) 2004/5 by RalfBecker-At-outdoor-training.de
|
* BO's functions take and return user-time only (!), they convert internaly everything to servertime, because
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* 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
|
class uiviews extends uical
|
||||||
{
|
{
|
||||||
@ -1405,8 +1409,12 @@ class uiviews extends uical
|
|||||||
// display a plannerRowWidget for each row (user or category)
|
// display a plannerRowWidget for each row (user or category)
|
||||||
foreach($sort2label as $sort => $label)
|
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';
|
$class = $class == 'row_on' ? 'row_off' : 'row_on';
|
||||||
$content .= $this->plannerRowWidget(isset($rows[$sort]) ? $rows[$sort] : array(),$start,$end,$label,$class,$indent."\t");
|
$content .= $this->plannerRowWidget(isset($rows[$sort]) ? $rows[$sort] : array(),$start,$end,$label,$class,$indent."\t");
|
||||||
}
|
}
|
||||||
|
@ -223,6 +223,20 @@
|
|||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False
|
'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(
|
'default_private' => array(
|
||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'label' => 'Set new events to private',
|
'label' => 'Set new events to private',
|
||||||
@ -326,7 +340,6 @@
|
|||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False
|
'admin' => False
|
||||||
),
|
),
|
||||||
// disabled free/busy stuff til it gets rewritten with new Horde iCal classes -- RalfBecker 2006/03/03
|
|
||||||
'freebusy' => array(
|
'freebusy' => array(
|
||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'label' => 'Make freebusy information available to not loged in persons?',
|
'label' => 'Make freebusy information available to not loged in persons?',
|
||||||
|
Loading…
Reference in New Issue
Block a user