phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] infolog/inc class.boinfolog.inc.php, 1.39 class.soinf


From: ceb
Subject: [Phpgroupware-cvs] infolog/inc class.boinfolog.inc.php, 1.39 class.soinfolog.inc.php, 1.24 class.uiinfolog.inc.php, 1.77
Date: Thu, 24 Feb 2005 13:35:07 -0000

Update of infolog/inc

Modified Files:
     Branch: MAIN
            class.boinfolog.inc.php lines: +14 -10
            class.soinfolog.inc.php lines: +8 -2
            class.uiinfolog.inc.php lines: +30 -21

Log Message:
update

====================================================
Index: infolog/inc/class.boinfolog.inc.php
diff -u infolog/inc/class.boinfolog.inc.php:1.38 
infolog/inc/class.boinfolog.inc.php:1.39
--- infolog/inc/class.boinfolog.inc.php:1.38    Thu Jan  6 23:24:53 2005
+++ infolog/inc/class.boinfolog.inc.php Fri Jan  7 01:37:22 2005
@@ -42,20 +42,16 @@
                function boinfolog( $info_id = 0)
                {
                        $this->enums = $this->stock_enums = array(
-                               'priority' => array (
-                                       'urgent' => 'urgent','high' => 
'high','normal' => 'normal',
-                                       'low' => 'low' ),
+                               'priority'                      => 
array('urgent' => 'urgent','high' => 'high','normal' => 'normal','low' => 'low' 
),
 /*                             'status'   => array(
                                        'offer' => 'offer','ongoing' => 
'ongoing','call' => 'call',
                                        'will-call' => 'will-call','done' => 
'done',
                                        'billed' => 'billed' ),
-*/                             'confirm'   => array(
-                                       'not' => 'not','accept' => 
'accept','finish' => 'finish',
-                                       'both' => 'both' ),
-                               'type'      => array(
-                                       'task' => 'task','phone' => 
'phone','note' => 'note'
+*/                             'confirm'                       => array('not' 
=> 'not','accept' => 'accept','finish' => 'finish','both' => 'both' ),
+                               'confirm_status'        => array('not' => 
'not','accepted' => 'accepted','finished' => 'finished','canceled' => 
'canceled'),
+                               'type'                          => array('task' 
=> 'task','phone' => 'phone','note' => 'note')
                                /*      ,'confirm' => 'confirm','reject' => 
'reject','email' => 'email',
-                                       'fax' => 'fax' not implemented so far 
*/ )
+                                       'fax' => 'fax' not implemented so far)*/
                        );
                        $this->status = $this->stock_status = array(
                                'defaults' => array(
@@ -306,6 +302,11 @@
                                                break;
                                }

+                               if($content['info_confirm_status'] == 
'canceled')
+                               {
+                                       $send = True;
+                               }
+
                                if(!$send)
                                {
                                        return False;
@@ -336,6 +337,9 @@
                                                case 'finished':
                                                        $subject = 
lang('infolog task *%1* has been finished',$content['info_subject']);
                                                        break;
+                                               case 'canceled':
+                                                       $subject = 
lang('infolog task *%1* delegation has been canceled',$content['info_subject']);
+                                                       break;
                                        }
                                        $msg .= lang('responsible') . ': ' . 
$GLOBALS['phpgw']->common->grab_owner_name($content['info_responsible']) . "\n";
                                        $msg .= lang('confirmation status') . 
': ' . lang($content['info_confirm_status']);

====================================================
Index: infolog/inc/class.soinfolog.inc.php
diff -u infolog/inc/class.soinfolog.inc.php:1.23 
infolog/inc/class.soinfolog.inc.php:1.24
--- infolog/inc/class.soinfolog.inc.php:1.23    Thu Jan  6 23:24:53 2005
+++ infolog/inc/class.soinfolog.inc.php Fri Jan  7 01:37:22 2005
@@ -85,7 +85,13 @@

                                if($required_rights == 'finish' && 
($info['info_confirm'] == 'finish' || $info['info_confirm'] == 'both'))
                                {
-                                       $access_ok = 
($info['info_confirm_status'] != 'finished');
+                                       $access_ok = 
($info['info_confirm_status'] != 'finished' && $info['info_confirm_status'] != 
'canceled');
+                                       return $access_ok;
+                               }
+
+                               if($required_rights == 'cancel')
+                               {
+                                       $access_ok = 
($info['info_confirm_status'] != 'canceled');
                                        return $access_ok;
                                }
                                return False;

====================================================
Index: infolog/inc/class.uiinfolog.inc.php
diff -u infolog/inc/class.uiinfolog.inc.php:1.76 
infolog/inc/class.uiinfolog.inc.php:1.77
--- infolog/inc/class.uiinfolog.inc.php:1.76    Thu Jan  6 23:24:53 2005
+++ infolog/inc/class.uiinfolog.inc.php Fri Jan  7 01:37:22 2005
@@ -35,13 +35,14 @@

                        $this->icons = array(
                                'type' => array(
-                                       'task'      => 'task.gif',      
'task_alt'      => 'Task',
-                                       'phone'     => 'phone.gif',     
'phone_alt'     => 'Phonecall',
-                                       'note'      => 'note.gif',      
'note_alt'      => 'Note',
-                                       'confirm'   => 'confirm.gif',   
'confirm_alt'   => 'Confirmation',
+                                       'task'          => 'task.gif',          
'task_alt'              => 'Task',
+                                       'phone'         => 'phone.gif',         
'phone_alt'             => 'Phonecall',
+                                       'note'          => 'note.gif',          
'note_alt'              => 'Note',
+                                       'cancel'        => 'cancel.png',        
'cancel_alt'    => 'Cancel',
+                                       'confirm'       => 'confirm.gif',       
'confirm_alt'   => 'Confirmation',
                                        'finish'        => 'finish.png',        
'finish_alt'    => 'Finished',
-                                       'reject'    => 'reject.gif',    
'reject_alt'    => 'Reject',
-                                       'email'     => 'email.gif',     
'email_alt'     => 'Email' ),
+                                       'reject'        => 'reject.gif',        
'reject_alt'    => 'Reject',
+                                       'email'     => 'email.gif',             
'email_alt'             => 'Email' ),
                                'action' => array(
                                        'new'       => 'new.gif',       
'new_alt'       => 'Add Sub',
                                        'view'      => 'view.gif',      
'view_alt'      => 'View Subs',
@@ -110,10 +111,11 @@
                        {
                                $readonlys["confirm[$id]"] = 
!$this->bo->check_access($id,'confirm');
                                $readonlys["finish[$id]"] = 
!$this->bo->check_access($id,'finish');
+                               $readonlys["cancel[$id]"] = 
!$this->bo->check_access($id,'cancel');
                        }
                        else
                        {
-                               $readonlys["confirm[$id]"] = 
$readonlys["finish[$id]"] = True;
+                               $readonlys["confirm[$id]"] = 
$readonlys["finish[$id]"]  = $readonlys["cancel[$id]"] = True;
                        }

                        $readonlys["sp[$id]"] = 
!$this->bo->check_access($id,PHPGW_ACL_ADD);
@@ -243,6 +245,12 @@
                                                        $action = '';
                                                        $action_id = 0;
                                                        break;
+                                               case 'cancel':
+                                                       
$this->bo->confirm($do_id,'canceled');
+                                                       $value = array();
+                                                       $action = '';
+                                                       $action_id = 0;
+                                                       break;
                                                default:
                                                        $value = array();
                                                        $action = '';
@@ -250,7 +258,7 @@
                                                        break;
                                        }

-                                       if($this->bo->emailnotification && ($do 
== 'confirm' || $do == 'finish'))
+                                       if($this->bo->emailnotification && ($do 
== 'confirm' || $do == 'finish' || $do == 'cancel'))
                                        {
                                                
$this->bo->send_notification($do_id,'confirm');
                                        }
@@ -515,18 +523,19 @@
                        }
                        //echo "<p>uiinfolog.edit(info_id=$info_id,mode=$mode) 
content = "; _debug_array($content);
                        
$this->tmpl->exec('infolog.uiinfolog.edit',$content,array(
-                               'info_type'     => $this->bo->enums['type'],
-                               'info_pri'      => $this->bo->enums['priority'],
-                               'info_confirm'  => $this->bo->enums['confirm'],
-                               'info_status'   => 
$this->bo->status[$content['info_type']]
-                       ),$readonlys,array(
-                               'info_id'   => $info_id,
-                               'info_id_parent' => $content['info_id_parent'],
-                               'info_link_id' => $content['info_link_id'],
-                               'action'    => $action,
-                               'action_id' => $action_id,
-                               'referer'   => $referer,
-                               'link_to'   => array('to_id' => 
$content['link_to']['to_id'])   // in case tab gets not viewed
+                                       'info_type'                             
=> $this->bo->enums['type'],
+                                       'info_pri'                              
=> $this->bo->enums['priority'],
+                                       'info_confirm'                  => 
$this->bo->enums['confirm'],
+                                       'info_confirm_status'   => 
$this->bo->enums['confirm_status'],
+                                       'info_status'                   => 
$this->bo->status[$content['info_type']]),
+                               $readonlys,array(
+                                       'info_id'                               
=> $info_id,
+                                       'info_id_parent'                => 
$content['info_id_parent'],
+                                       'info_link_id'                  => 
$content['info_link_id'],
+                                       'action'                                
=> $action,
+                                       'action_id'                             
=> $action_id,
+                                       'referer'                               
=> $referer,
+                                       'link_to'                               
=> array('to_id' => $content['link_to']['to_id'])       // in case tab gets not 
viewed
                        ));
                }







reply via email to

[Prev in Thread] Current Thread [Next in Thread]