[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.36,
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.36,1.66.2.37 |
Date: |
Thu, 31 Oct 2002 18:29:39 -0500 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv22080
Modified Files:
Tag: Version-0_9_14-branch
class.uicalendar.inc.php
Log Message:
ordered planner by user alphabetical
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.36
retrieving revision 1.66.2.37
diff -C2 -r1.66.2.36 -r1.66.2.37
*** class.uicalendar.inc.php 31 Oct 2002 14:40:28 -0000 1.66.2.36
--- class.uicalendar.inc.php 31 Oct 2002 23:29:35 -0000 1.66.2.37
***************
*** 1344,1347 ****
--- 1344,1373 ----
}
+ function set_planner_group_members()
+ {
+ $type =
$GLOBALS['phpgw']->accounts->get_type($this->bo->owner);
+
+ if ($type == 'g') // display schedule of all group
members
+ {
+ $members = array();
+ $ids =
$GLOBALS['phpgw']->acl->get_ids_for_location($this->bo->owner, 1,
'phpgw_group');
+ while (list(,$id) = each($ids))
+ {
+ if
($this->bo->check_perms(PHPGW_ACL_READ,0,$id))
+ {
+
$members[$GLOBALS['phpgw']->common->grab_owner_name($id)] = $id;
+ }
+ }
+ ksort($members);
+ $this->planner_group_members = $members;
+ }
+ else
+ {
+ $this->planner_group_members = array(
+
$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner) => $this->bo->owner
+ );
+ }
+ }
+
/**
* planner_prepare - prepare the planner view
***************
*** 1354,1358 ****
{
if(floor(phpversion()) == 4)
! {
eval('
// set some globals
--- 1380,1384 ----
{
if(floor(phpversion()) == 4)
! {
eval('
// set some globals
***************
*** 1382,1396 ****
{
$title = lang(\'User\');
! $o = $this->bo->owner;
! $type =
$GLOBALS[\'phpgw\']->accounts->get_type($o);
!
! if ($type == \'g\') // display
schedule of all group members
! {
!
$this->planner_group_members =
$GLOBALS[\'phpgw\']->acl->get_ids_for_location($o, 1, \'phpgw_group\');
! }
! else // display schedule of
owner only
! {
!
$this->planner_group_members[0] = $o;
! }
}
--- 1408,1413 ----
{
$title = lang(\'User\');
!
!
$this->set_planner_group_members();
}
***************
*** 1605,1609 ****
// FIXME: how many chars can
be displayed in the event\'s cell?
//
! $max_chars =
2*4*$colspan/$intervals_per_day-5;
$max_chars /=
($colspan<9 ? 2 : 1);
--- 1622,1626 ----
// FIXME: how many chars can
be displayed in the event\'s cell?
//
! $max_chars =
6*$colspan/$intervals_per_day-5;
$max_chars /=
($colspan<9 ? 2 : 1);
***************
*** 1733,1737 ****
$end_cell = $last_cell -
$intervals_per_day * ($days_between+1) + $interval[$event[\'end\'][\'hour\']];
! if ($end_cell == $start_cell)
$end_cell++; // min. width 1 interval
}
else
--- 1750,1757 ----
$end_cell = $last_cell -
$intervals_per_day * ($days_between+1) + $interval[$event[\'end\'][\'hour\']];
! if ($end_cell == $start_cell &&
$end_cell < $last_cell)
! {
! $end_cell++; // min.
width 1 interval
! }
}
else
***************
*** 1780,1795 ****
// event needs to show up in
rows of all participants that are also owners
//
! for($j=0;
$j<count($this->planner_group_members); $j++)
{
- $id =
$this->planner_group_members[$j];
$status =
$event[\'participants\'][$id];
if (isset($status) &&
$status != \'R\')
{
- $user_name =
$GLOBALS[\'phpgw\']->common->grab_owner_name($id);
-
$this->planner_update_row(
Array(
!
\'index\' => $id,
\'name\' => $user_name,
\'event\' => $event,
--- 1800,1813 ----
// event needs to show up in
rows of all participants that are also owners
//
!
reset($this->planner_group_members);
! while(list($user_name,$id) =
each($this->planner_group_members))
{
$status =
$event[\'participants\'][$id];
if (isset($status) &&
$status != \'R\')
{
$this->planner_update_row(
Array(
!
\'index\' => $user_name,
\'name\' => $user_name,
\'event\' => $event,
***************
*** 1817,1829 ****
// add empty rows for users
that do not participante in any event
//
! for($j=0;
$j<count($this->planner_group_members); $j++)
{
! $id =
$this->planner_group_members[$j];
! $k = $id.\'_1\';
$ka = \'.nr_\'.$k;
!
if (!isset($rows[$k]))
{
!
$rows[$k][\'_name\'] = $GLOBALS[\'phpgw\']->common->grab_owner_name($id);
$rows[$k][\'._name\'] .= \' nowrap\';
$rows[$ka] = 0;
--- 1835,1847 ----
// add empty rows for users
that do not participante in any event
//
!
reset($this->planner_group_members);
! while(list($user_name,$id) =
each($this->planner_group_members))
{
! $k = $user_name.\'_1\';
$ka = \'.nr_\'.$k;
!
if (!isset($rows[$k]))
{
!
$rows[$k][\'_name\'] = $user_name;
$rows[$k][\'._name\'] .= \' nowrap\';
$rows[$ka] = 0;
***************
*** 1844,1848 ****
$row = &$rows[$k];
$akt_cell =
&$rows[\'.nr_\'.$k];
! if ($akt_cell <=
$last_cell)
{
$row[\'3\'] =
\' \';
--- 1862,1866 ----
$row = &$rows[$k];
$akt_cell =
&$rows[\'.nr_\'.$k];
! if ($akt_cell <
$last_cell)
{
$row[\'3\'] =
\' \';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.36,1.66.2.37,
Ralf Becker <address@hidden> <=