Index: calendar/inc/class.socalendar__.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar__.inc.php,v retrieving revision 1.11.2.1.2.2 diff -r1.11.2.1.2.2 class.socalendar__.inc.php 59a60,64 > //added by DG > define('MSG_STATUS_ACCEPTED',7); > define('MSG_STATUS_REJECTED',8); > define('MSG_STATUS_WAITLIST',9); > //end add by DG Index: calendar/inc/class.uicalendar.inc.php =================================================================== RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v retrieving revision 1.66.2.55.2.22 diff -r1.66.2.55.2.22 class.uicalendar.inc.php 86a87,89 > //Added by DG > 'status_update' => True, > //end edit by dG 3137a3141,3145 > //Added Mass update status link > if ($this->bo->check_perms(PHPGW_ACL_EDIT,$event)){ > $update_status= " [<a href=\"".$this->page('status_update','&cal_id='.$event['id'])."\">".lang('Update all Status')."</a>]"; > } > 3145c3153 < $vars['participants']['data'] = implode("<br>\n",$vars['participants']['data']); --- > $vars['participants']['data'] = implode("<br>\n",$vars['participants']['data']) . '<p>'.$update_status; 4307a4316,4444 > > > //Added by DG > //function creates a page for user to set status of all participants at once > function status_update() > { > $cal_id = intval($_GET['cal_id']); > $event = $this->bo->read_entry($cal_id); > $vars = $_POST; > > if(!($this->bo->check_perms(PHPGW_ACL_EDIT,$event)) || $vars['cancel']) > { > Header('Location: '.$this->page('view','&cal_id='.$cal_id)); > $GLOBALS['phpgw']->common->phpgw_exit(); > } > > if ($vars['submit']){ > unset($vars['submit']); > $send_update=array(); > $this->connection = $GLOBALS['phpgw']->db; > //update db with new statuses > foreach ($vars as $user_id=>$new_status){ > if (!$this->bo->check_perms(PHPGW_ACL_EDIT,0,$uid)) continue; > > if ($event['participants'][$user_id] != $new_status){ > if(!is_object($preferences)){ > $preferences=CreateObject('phpgwapi.preferences',$userid); > } > $uid_email=$preferences->email_address($userid); > // $send_email[$new_status][]=$uid_email; > $send_update[$new_status][$user_id]=$new_status; > > } > //Update variable for participant's new status > $event['participants'][$user_id]=$new_status; > > $query="UPDATE phpgw_cal_user SET cal_status='" . $new_status . "' WHERE cal_login='" . $user_id . "' and cal_id='". $cal_id ."'"; > $this->connection->lock(array('phpgw_cal_user')); > $this->connection->query($query,__LINE__,__FILE__); > $this->connection->unlock(); > > } > > //Send email to users whose status changed > //$this->bo->send_update(MSG_STATUS_ACCEPTED,$send_update['A'],$event); > //$this->bo->send_update(MSG_STATUS_REJECTED,$send_update['R'],$event); > //$this->bo->send_update(MSG_STATUS_WAITLIST,$send_update['T'],$event); > > > > } > //Re-read the database > $event = $this->bo->read_entry($cal_id); > > unset($GLOBALS['phpgw_info']['flags']['noheader']); > unset($GLOBALS['phpgw_info']['flags']['nonavbar']); > $GLOBALS['phpgw_info']['flags']['noappheader'] = True; > $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; > $GLOBALS['phpgw_info']['flags']['app_header'] = lang ('Update participants'); > $GLOBALS['phpgw']->common->phpgw_header(); > > > //Begin Table > print '<table width="80%" border="0">'; > print '<tr><td width=100><b>'. lang('Title') . ': </b></td><td>' . $event['title'] . '</td></tr>'; > print '<tr><td width=100><b>' . lang('Description') . ': </b></td><td>' . $event['description'] . '</td></tr>'; > print '<tr><td width=100><b>'. lang('Event Limit') . ':</b></td><td> '.($event['eventLimit']?$event['eventLimit']:lang('Not Set')).'</td></tr>'; > print '<tr><td></td><td>'.$eventFull.'</td></tr>'; > print '</table><p>'; > $action= $this->page('status_update','&cal_id='.$event['id']); > > print '<form action="'. $action . '" method="POST" name="update_participants">'; > $table_title=lang('Change Status of Invitees'); > $table_desc=lang('For each invitee, choose their appropriate status'); > echo <<<EOF > <table class="tablecolor" width="100%" cellspacing="0" cellpadding="0" border="0"> > <tr> > <td width="5"> </td> > <td valign="middle" width="100%" class="tabletitlerev">$table_title</td> > <td> </td> > <td align="right" valign="top"> </td> > </tr> > </table> > <table border="0" cellpadding="0" cellspacing="0" width="100%" class="tablecolor"> > <tr> > <td width="100%" class="tablecolor"> > <table border="0" cellspacing="1" cellpadding="4" width="100%" class="tablecolor"> > <tr bgcolor="#FFFFFF"> > <td bgcolor="#dcdcdc" colspan="6" class="tabledescription">$table_desc</td></tr> > EOF; > > $response_choices = Array( > ACCEPTED => array(lang('Accepted'),'A'), > REJECTED => array(lang('Rejected'),'R'), > TENTATIVE =>array( lang('Tentative'),'T'), > NO_RESPONSE => array(lang('No Response'),'U') > ); > $colspan=count($response_choices)+1; > > //Begin column headers > print '<tr bgcolor="#FFFFFF"><td class="tablecolumn">'. lang('User') . '</td>'; > foreach ($response_choices as $key=>$response){ > print '<td class="tablecolumn">'.$response[0].'</td>'; > } > print "</tr>"; > > //Begin list of users and their status > foreach ($event['participants'] as $uid=>$short_status){ > if($GLOBALS['phpgw']->accounts->get_type($uid) == "g") continue; > print '<tr><td class="tablecontent" align="center">'.$GLOBALS['phpgw']->common->grab_owner_name($uid).'</td>'; > if (!$this->bo->check_perms(PHPGW_ACL_EDIT,0,$uid)){ > print '<td colpan="'.$colspan.'">'. lang('Cannot edit'). '</td>'; > } else { > foreach ($response_choices as $key=>$response){ > if ($response[1] == $short_status) $checked='checked'; > print '<td class="tablecontent" align="center"><input type="radio" name="'.$uid.'" value="'.$response[1] . '" '.$checked .'></td>'; > $checked=''; > } > } > print '</tr>'; > } > print '</table></td></tr></table>'; > print '<p align="center"><input type="submit" name="submit" value="Update Responses">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; > print ' <input type="submit" value="Cancel" name="cancel"></p>'; > print '</form>'; > > } > > Index: phpgwapi/templates/idots/css/idots.css =================================================================== RCS file: /cvsroot/phpgroupware/phpgwapi/templates/idots/css/Attic/idots.css,v retrieving revision 1.1.2.2 diff -r1.1.2.2 idots.css 160a161,194 > .tablecolor > { > background: #999999; > } > .tabletitlerev > { > FONT-SIZE: 14px; > FONT-WEIGHT: Bold; > FONT-FAMILY: "Arial"; > Color: #ffffff; > } > .tabledescription > { > FONT-SIZE: 12px; > FONT-WEIGHT: Regular; > FONT-FAMILY: "Arial"; > Color: #000000; > } > .tablecolumn > { > FONT-SIZE: 12px; > FONT-WEIGHT: Bold; > FONT-FAMILY: "Arial"; > text-align: center; > Color: #000000; > } > .tablecontent > { > FONT-SIZE: 12px; > FONT-WEIGHT: Regular; > FONT-FAMILY: "Arial"; > Color: #000000; > background: #FFFFFF; > }