mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
- renamed class to new naming convention
- update version and dependencies for 1.6 - file_access method for attachments
This commit is contained in:
parent
aceef3f548
commit
7f9df0d051
@ -41,7 +41,7 @@ if ($_POST['cancel'])
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog - Import CSV-File');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$boinfolog = createobject('infolog.boinfolog');
|
||||
$infolog_bo = createobject('infolog.infolog_bo');
|
||||
|
||||
$GLOBALS['egw']->template->set_file(array('import_t' => 'csv_import.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('import_t','filename','filenamehandle');
|
||||
@ -222,9 +222,9 @@ case 'download':
|
||||
'link_3' => '3. link: appname:appid the entry should be linked to, eg.: addressbook:123',
|
||||
);
|
||||
// add custom fields
|
||||
if ($boinfolog->customfields)
|
||||
if ($infolog_bo->customfields)
|
||||
{
|
||||
foreach($boinfolog->customfields as $name => $field)
|
||||
foreach($infolog_bo->customfields as $name => $field)
|
||||
{
|
||||
if ($field['type'] == 'label' || !count($field['values']) && $field['rows'] <= 1 && $field['len'] <= 0) continue;
|
||||
|
||||
@ -506,7 +506,7 @@ case 'import':
|
||||
{
|
||||
$values['project_id'] = project_id($values['project_id']);
|
||||
}
|
||||
if (($id = $boinfolog->write($to_write,True,False)))
|
||||
if (($id = $infolog_bo->write($to_write,True,False)))
|
||||
{
|
||||
$info_link_id = false;
|
||||
foreach(array(
|
||||
@ -526,7 +526,7 @@ case 'import':
|
||||
'info_id' => $id,
|
||||
'info_link_id' => $link_id,
|
||||
);
|
||||
$boinfolog->write($to_write);
|
||||
$infolog_bo->write($to_write);
|
||||
$info_link_id = true;
|
||||
}
|
||||
}
|
||||
|
@ -10,21 +10,19 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php');
|
||||
|
||||
define('EGW_ACL_UNDELETE',EGW_ACL_CUSTOM_1); // undelete right
|
||||
|
||||
/**
|
||||
* This class is the BO-layer of InfoLog, it also handles xmlrpc requests
|
||||
*/
|
||||
class boinfolog
|
||||
class infolog_bo
|
||||
{
|
||||
var $enums;
|
||||
var $status;
|
||||
/**
|
||||
* Instance of our so class
|
||||
*
|
||||
* @var soinfolog
|
||||
* @var infolog_so
|
||||
*/
|
||||
var $so;
|
||||
var $vfs;
|
||||
@ -128,7 +126,7 @@ class boinfolog
|
||||
* @param int $info_id
|
||||
* @param boolean $instanciate_link=true should the link class be instanciated, used by the link-registry to prevent infinit recursion
|
||||
*/
|
||||
function boinfolog($info_id = 0,$instanciate_link=true)
|
||||
function __construct($info_id = 0,$instanciate_link=true)
|
||||
{
|
||||
$this->enums = $this->stock_enums = array(
|
||||
'priority' => array (
|
||||
@ -238,7 +236,7 @@ class boinfolog
|
||||
$this->user_time_now = time() + $this->tz_offset_s;
|
||||
|
||||
$this->grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true);
|
||||
$this->so =& new soinfolog($this->grants);
|
||||
$this->so =& new infolog_so($this->grants);
|
||||
|
||||
// are we called via xmlrpc?
|
||||
$this->xmlrpc = is_object($GLOBALS['server']) && $GLOBALS['server']->last_method;
|
||||
@ -874,33 +872,6 @@ class boinfolog
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook called by link-class to include infolog in the appregistry of the linkage
|
||||
*
|
||||
* @param array/string $location location and other parameters (not used)
|
||||
* @return array with method-names
|
||||
*/
|
||||
function search_link($location)
|
||||
{
|
||||
return array(
|
||||
'query' => 'infolog.boinfolog.link_query',
|
||||
'title' => 'infolog.boinfolog.link_title',
|
||||
'titles' => 'infolog.boinfolog.link_titles',
|
||||
'view' => array(
|
||||
'menuaction' => 'infolog.uiinfolog.index',
|
||||
'action' => 'sp'
|
||||
),
|
||||
'view_id' => 'action_id',
|
||||
'add' => array(
|
||||
'menuaction' => 'infolog.uiinfolog.edit',
|
||||
'type' => 'task'
|
||||
),
|
||||
'add_app' => 'action',
|
||||
'add_id' => 'action_id',
|
||||
'add_popup' => '750x550',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* get title for an infolog entry identified by $info
|
||||
*
|
||||
@ -971,6 +942,18 @@ class boinfolog
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check access to the projects file store
|
||||
*
|
||||
* @param int $id id of entry
|
||||
* @param int $check EGW_ACL_READ for read and EGW_ACL_EDIT for write or delete access
|
||||
* @return boolean true if access is granted or false otherwise
|
||||
*/
|
||||
function file_access($id,$check,$rel_path)
|
||||
{
|
||||
return $this->check_access($id,$check);
|
||||
}
|
||||
|
||||
/**
|
||||
* hook called be calendar to include events or todos in the cal-dayview
|
||||
*
|
||||
@ -1310,7 +1293,7 @@ class boinfolog
|
||||
$GLOBALS['egw']->acl->acl($user);
|
||||
$GLOBALS['egw']->acl->read_repository();
|
||||
$this->grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true);
|
||||
$this->so =& new soinfolog($this->grants); // so caches it's filters
|
||||
$this->so =& new infolog_so($this->grants); // so caches it's filters
|
||||
|
||||
$notified_info_ids = array();
|
||||
foreach(array(
|
@ -13,7 +13,7 @@
|
||||
/**
|
||||
* Administration of custom fields, type and status
|
||||
*/
|
||||
class uicustomfields
|
||||
class infolog_customfields
|
||||
{
|
||||
var $public_functions = array(
|
||||
'edit' => True
|
||||
@ -43,10 +43,10 @@ class uicustomfields
|
||||
*/
|
||||
var $group_owners;
|
||||
|
||||
function uicustomfields( )
|
||||
function __construct( )
|
||||
{
|
||||
$this->bo =& CreateObject('infolog.boinfolog');
|
||||
$this->tmpl =& CreateObject('etemplate.etemplate');
|
||||
$this->bo = new infolog_bo();
|
||||
$this->tmpl = new etemplate();
|
||||
$this->types = &$this->bo->enums['type'];
|
||||
$this->status = &$this->bo->status;
|
||||
$this->config_data = config::read('infolog');
|
||||
@ -150,10 +150,10 @@ class uicustomfields
|
||||
|
||||
$content['group_owner'] = $this->group_owners[$content['type2']];
|
||||
|
||||
//echo '<p>uicustomfields.edit(content = <pre style="text-align: left;">'; print_r($content); echo "</pre>\n";
|
||||
//echo '<p>'.__METHOD__'.(content = <pre style="text-align: left;">'; print_r($content); echo "</pre>\n";
|
||||
//echo 'readonlys = <pre style="text-align: left;">'; print_r($readonlys); echo "</pre>\n";
|
||||
$this->tmpl->read('infolog.customfields');
|
||||
$this->tmpl->exec('infolog.uicustomfields.edit',$content,array(
|
||||
$this->tmpl->exec('infolog.infolog_customfields.edit',$content,array(
|
||||
'type2' => $this->types,
|
||||
),$readonlys,array(
|
||||
'status' => $preserv_status,
|
||||
@ -363,9 +363,9 @@ class uicustomfields
|
||||
{
|
||||
// save changes to repository
|
||||
config::save_value('types',$this->types,'infolog');
|
||||
//echo '<p>uicustomfields::save_repository() \$this->status=<pre style="text-aling: left;">'; print_r($this->status); echo "</pre>\n";
|
||||
//echo '<p>'.__METHOD__.'() \$this->status=<pre style="text-aling: left;">'; print_r($this->status); echo "</pre>\n";
|
||||
config::save_value('status',$this->status,'infolog');
|
||||
//echo '<p>uicustomfields::save_repository() \$this->fields=<pre style="text-aling: left;">'; print_r($this->fields); echo "</pre>\n";
|
||||
//echo '<p>'.__METHOD__.'() \$this->fields=<pre style="text-aling: left;">'; print_r($this->fields); echo "</pre>\n";
|
||||
config::save_value('customfields',$this->fields,'infolog');
|
||||
config::save_value('group_owners',$this->group_owners,'infolog');
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @subpackage projectmanager
|
||||
* @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -23,14 +23,14 @@ include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php');
|
||||
* - planned end from the planned time and a start-time
|
||||
* - planned start and end from the "real" values
|
||||
*/
|
||||
class datasource_infolog extends datasource
|
||||
class infolog_datasource extends datasource
|
||||
{
|
||||
/**
|
||||
* Reference to boinfolog
|
||||
* Reference to infolog_bo
|
||||
*
|
||||
* @var boinfolog
|
||||
* @var infolog_bo
|
||||
*/
|
||||
var $boinfolog;
|
||||
var $infolog_bo;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -41,13 +41,12 @@ class datasource_infolog extends datasource
|
||||
|
||||
$this->valid = PM_COMPLETION|PM_PLANNED_START|PM_PLANNED_END|PM_REAL_END|PM_PLANNED_TIME|PM_REPLANNED_TIME|PM_USED_TIME|PM_RESOURCES;
|
||||
|
||||
// we use $GLOBALS['boinfolog'] as an already running instance might be availible there
|
||||
if (!is_object($GLOBALS['boinfolog']))
|
||||
// we use $GLOBALS['infolog_bo'] as an already running instance might be availible there
|
||||
if (!is_object($GLOBALS['infolog_bo']))
|
||||
{
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
|
||||
$GLOBALS['boinfolog'] =& new boinfolog();
|
||||
$GLOBALS['infolog_bo'] =& new infolog_bo();
|
||||
}
|
||||
$this->boinfolog =& $GLOBALS['boinfolog'];
|
||||
$this->infolog_bo =& $GLOBALS['infolog_bo'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,7 +59,7 @@ class datasource_infolog extends datasource
|
||||
{
|
||||
if (!is_array($data_id))
|
||||
{
|
||||
$data =& $this->boinfolog->read((int) $data_id);
|
||||
$data =& $this->infolog_bo->read((int) $data_id);
|
||||
|
||||
if (!is_array($data)) return false;
|
||||
}
|
||||
@ -69,7 +68,7 @@ class datasource_infolog extends datasource
|
||||
$data =& $data_id;
|
||||
}
|
||||
return array(
|
||||
'pe_title' => $this->boinfolog->link_title($data),
|
||||
'pe_title' => $this->infolog_bo->link_title($data),
|
||||
'pe_completion' => $data['info_percent'],
|
||||
'pe_planned_start'=> $data['info_startdate'] ? $data['info_startdate'] : null,
|
||||
'pe_planned_end' => $data['info_enddate'] ? $data['info_enddate'] : null,
|
||||
@ -98,14 +97,14 @@ class datasource_infolog extends datasource
|
||||
*/
|
||||
function copy($element,$target,$extra=null)
|
||||
{
|
||||
$info =& $this->boinfolog->read((int) $element['pe_app_id']);
|
||||
$info =& $this->infolog_bo->read((int) $element['pe_app_id']);
|
||||
|
||||
if (!is_array($info)) return false;
|
||||
|
||||
// unsetting info_link_id and evtl. info_from
|
||||
if ($info['info_link_id'])
|
||||
{
|
||||
$this->boinfolog->link_id2from($info); // unsets info_from and sets info_link_target
|
||||
$this->infolog_bo->link_id2from($info); // unsets info_from and sets info_link_target
|
||||
unset($info['info_link_id']);
|
||||
}
|
||||
// we need to unset a view fields, to get a new entry
|
||||
@ -113,29 +112,29 @@ class datasource_infolog extends datasource
|
||||
{
|
||||
unset($info[$key]);
|
||||
}
|
||||
if(!($info['info_id'] = $this->boinfolog->write($info))) return false;
|
||||
if(!($info['info_id'] = $this->infolog_bo->write($info))) return false;
|
||||
|
||||
// link the new infolog against the project and setting info_link_id and evtl. info_from
|
||||
$info['info_link_id'] = $this->boinfolog->link->link('projectmanager',$target,'infolog',$info['info_id'],$element['pe_remark'],0,0,1);
|
||||
$info['info_link_id'] = $this->infolog_bo->link->link('projectmanager',$target,'infolog',$info['info_id'],$element['pe_remark'],0,0,1);
|
||||
if (!$info['info_from'])
|
||||
{
|
||||
$info['info_from'] = $this->boinfolog->link->title('projectmanager',$target);
|
||||
$info['info_from'] = $this->infolog_bo->link->title('projectmanager',$target);
|
||||
}
|
||||
if ($info['info_status'] == 'template')
|
||||
{
|
||||
$info['info_status'] = $this->boinfolog->activate($info);
|
||||
$info['info_status'] = $this->infolog_bo->activate($info);
|
||||
}
|
||||
$this->boinfolog->write($info);
|
||||
$this->infolog_bo->write($info);
|
||||
|
||||
// creating again all links, beside the one to the source-project
|
||||
foreach($this->boinfolog->link->get_links('infolog',$element['pe_app_id']) as $link)
|
||||
foreach($this->infolog_bo->link->get_links('infolog',$element['pe_app_id']) as $link)
|
||||
{
|
||||
if ($link['app'] == 'projectmanager' && $link['id'] == $element['pm_id'] || // ignoring the source project
|
||||
$link['app'] == $this->boinfolog->link->vfs_appname) // ignoring files attachments for now
|
||||
$link['app'] == $this->infolog_bo->link->vfs_appname) // ignoring files attachments for now
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$this->boinfolog->link->link('infolog',$info['info_id'],$link['app'],$link['id'],$link['remark']);
|
||||
$this->infolog_bo->link->link('infolog',$info['info_id'],$link['app'],$link['id'],$link['remark']);
|
||||
}
|
||||
return array($info['info_id'],$info['info_link_id']);
|
||||
}
|
||||
@ -148,17 +147,17 @@ class datasource_infolog extends datasource
|
||||
*/
|
||||
function delete($id)
|
||||
{
|
||||
if (!is_object($GLOBALS['boinfolog']))
|
||||
if (!is_object($GLOBALS['infolog_bo']))
|
||||
{
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
|
||||
$GLOBALS['boinfolog'] =& new boinfolog();
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.infolog_bo.inc.php');
|
||||
$GLOBALS['infolog_bo'] =& new infolog_bo();
|
||||
}
|
||||
// dont delete infolog, which are linked to other elements, but their project
|
||||
if (count($this->boinfolog->link->get_links('infolog',$id)) > 1)
|
||||
if (count($this->infolog_bo->link->get_links('infolog',$id)) > 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return $this->boinfolog->delete($id);
|
||||
return $this->infolog_bo->delete($id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -171,17 +170,17 @@ class datasource_infolog extends datasource
|
||||
function change_status($id,$status)
|
||||
{
|
||||
//error_log("datasource_infolog::change_status($id,$status)");
|
||||
if (($info = $this->boinfolog->read($id)) && $this->boinfolog->check_access($info,EGW_ACL_EDIT))
|
||||
if (($info = $this->infolog_bo->read($id)) && $this->infolog_bo->check_access($info,EGW_ACL_EDIT))
|
||||
{
|
||||
if ($status == 'active' && in_array($info['info_status'],array('template','nonactive','archive')))
|
||||
{
|
||||
$status = $this->boinfolog->activate($info);
|
||||
$status = $this->infolog_bo->activate($info);
|
||||
}
|
||||
if($info['info_status'] != $status && isset($this->boinfolog->status[$info['info_type']][$status]))
|
||||
if($info['info_status'] != $status && isset($this->infolog_bo->status[$info['info_type']][$status]))
|
||||
{
|
||||
//error_log("datasource_infolog::change_status($id,$status) setting status from ".$info['info_status']);
|
||||
$info['info_status'] = $status;
|
||||
return $this->boinfolog->write($info) !== false;
|
||||
return $this->infolog_bo->write($info) !== false;
|
||||
}
|
||||
}
|
||||
return false;
|
@ -11,8 +11,6 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
|
||||
|
||||
/**
|
||||
* eGroupWare: GroupDAV access: infolog handler
|
||||
*/
|
||||
@ -21,7 +19,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
/**
|
||||
* bo class of the application
|
||||
*
|
||||
* @var boinfolog
|
||||
* @var infolog_bo
|
||||
*/
|
||||
var $bo;
|
||||
|
||||
@ -36,7 +34,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
{
|
||||
parent::__construct($app,$debug,$base_uri);
|
||||
|
||||
$this->bo =& new boinfolog();
|
||||
$this->bo =& new infolog_bo();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,8 +94,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
{
|
||||
return $task;
|
||||
}
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.vcalinfolog.inc.php');
|
||||
$handler = new vcalinfolog();
|
||||
$handler = new infolog_ical();
|
||||
$options['data'] = $handler->exportVTODO($id,'2.0',false,false); // keep UID the client set and no extra charset attributes
|
||||
$options['mimetype'] = 'text/calendar; charset=utf-8';
|
||||
header('Content-Encoding: identity');
|
||||
@ -120,8 +117,7 @@ class infolog_groupdav extends groupdav_handler
|
||||
{
|
||||
return $ok;
|
||||
}
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.vcalinfolog.inc.php');
|
||||
$handler = new vcalinfolog();
|
||||
$handler = new infolog_ical();
|
||||
if (!($info_id = $handler->importVTODO($options['content'],is_numeric($id) ? $id : -1)))
|
||||
{
|
||||
if ($this->debug) error_log(__METHOD__."(,$id) import_vtodo($options[content]) returned false");
|
||||
|
360
infolog/inc/class.infolog_hooks.inc.php
Normal file
360
infolog/inc/class.infolog_hooks.inc.php
Normal file
@ -0,0 +1,360 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - Admin-, Preferences- and SideboxMenu-Hooks
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class containing admin, preferences and sidebox-menus (used as hooks)
|
||||
*/
|
||||
class infolog_hooks
|
||||
{
|
||||
/**
|
||||
* Hook called by link-class to include infolog in the appregistry of the linkage
|
||||
*
|
||||
* @param array/string $location location and other parameters (not used)
|
||||
* @return array with method-names
|
||||
*/
|
||||
static function search_link($location)
|
||||
{
|
||||
return array(
|
||||
'query' => 'infolog.infolog_bo.link_query',
|
||||
'title' => 'infolog.infolog_bo.link_title',
|
||||
'titles' => 'infolog.infolog_bo.link_titles',
|
||||
'view' => array(
|
||||
'menuaction' => 'infolog.infolog_ui.index',
|
||||
'action' => 'sp'
|
||||
),
|
||||
'view_id' => 'action_id',
|
||||
'add' => array(
|
||||
'menuaction' => 'infolog.infolog_ui.edit',
|
||||
'type' => 'task'
|
||||
),
|
||||
'add_app' => 'action',
|
||||
'add_id' => 'action_id',
|
||||
'add_popup' => '750x550',
|
||||
'file_access'=> 'infolog.infolog_bo.file_access',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* hooks to build sidebox-menu plus the admin and preferences sections
|
||||
*
|
||||
* @param string/array $args hook args
|
||||
*/
|
||||
static function all_hooks($args)
|
||||
{
|
||||
$appname = 'infolog';
|
||||
$location = is_array($args) ? $args['location'] : $args;
|
||||
//echo "<p>admin_prefs_sidebox_hooks::all_hooks(".print_r($args,True).") appname='$appname', location='$location'</p>\n";
|
||||
|
||||
if ($location == 'sidebox_menu')
|
||||
{
|
||||
$file = array(
|
||||
'infolog list' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.index' )),
|
||||
array(
|
||||
'text' => '<a class="textSidebox" href="'.htmlspecialchars($GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.edit',
|
||||
))).'" target="_blank" onclick="window.open(this.href,this.target,\'dependent=yes,width=750,height=550,scrollbars=yes,status=yes\'); return false;">'.lang('Add').'</a>',
|
||||
'no_lang' => true,
|
||||
)
|
||||
);
|
||||
display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file);
|
||||
}
|
||||
|
||||
if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin')
|
||||
{
|
||||
$file = array(
|
||||
'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname),
|
||||
'Grant Access' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
|
||||
'Edit Categories' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
|
||||
);
|
||||
if ($location == 'preferences')
|
||||
{
|
||||
display_section($appname,$file);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_sidebox($appname,lang('Preferences'),$file);
|
||||
}
|
||||
}
|
||||
|
||||
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences')
|
||||
{
|
||||
$file = Array(
|
||||
'Site configuration' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.admin' )),
|
||||
'Global Categories' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'admin.uicategories.index',
|
||||
'appname' => $appname,
|
||||
'global_cats'=> True)),
|
||||
'Custom fields, typ and status' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog_customfields.edit')),
|
||||
'CSV-Import' => $GLOBALS['egw']->link('/infolog/csv_import.php')
|
||||
);
|
||||
if ($location == 'admin')
|
||||
{
|
||||
display_section($appname,$file);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_sidebox($appname,lang('Admin'),$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* populates $GLOBALS['settings'] for the preferences
|
||||
*/
|
||||
static function settings()
|
||||
{
|
||||
/* Setup some values to fill the array of this app's settings below */
|
||||
$ui = new infolog_ui(); // need some labels from
|
||||
$filters = $show_home = array();
|
||||
$show_home[] = lang("DON'T show InfoLog");
|
||||
foreach($ui->filters as $key => $label)
|
||||
{
|
||||
$show_home[$key] = $filters[$key] = lang($label);
|
||||
}
|
||||
|
||||
// migrage old filter-pref 1,2 to the filter one 'own-open-today'
|
||||
if (isset($GLOBALS['type']) && in_array($GLOBALS['egw']->preferences->{$GLOBALS['type']}['homeShowEvents'],array('1','2')))
|
||||
{
|
||||
$GLOBALS['egw']->preferences->add('infolog','homeShowEvents','own-open-today',$GLOBALS['type']);
|
||||
$GLOBALS['egw']->preferences->save_repository();
|
||||
}
|
||||
$show_links = array(
|
||||
'all' => lang('all links and attachments'),
|
||||
'links' => lang('only the links'),
|
||||
'attach' => lang('only the attachments'),
|
||||
'none' => lang('no links or attachments'),
|
||||
'no_describtion' => lang('no describtion, links or attachments'),
|
||||
);
|
||||
$show_details = array(
|
||||
0 => lang('No'),
|
||||
1 => lang('Yes'),
|
||||
2 => lang('Only for details'),
|
||||
);
|
||||
|
||||
/* Settings array for this app */
|
||||
$GLOBALS['settings'] = array(
|
||||
'defaultFilter' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Default Filter for InfoLog',
|
||||
'name' => 'defaultFilter',
|
||||
'values' => $filters,
|
||||
'help' => 'This is the filter InfoLog uses when you enter the application. Filters limit the entries to show in the actual view. There are filters to show only finished, still open or futures entries of yourself or all users.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'homeShowEvents' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'InfoLog filter for the main screen',
|
||||
'name' => 'homeShowEvents',
|
||||
'values' => $show_home,
|
||||
'help' => 'Should InfoLog show up on the main screen and with which filter. Works only if you dont selected an application for the main screen (in your preferences).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'listNoSubs' => array(
|
||||
'type' => 'check',
|
||||
'label' => 'List no Subs/Childs',
|
||||
'name' => 'listNoSubs',
|
||||
'help' => 'Should InfoLog show Subtasks, -calls or -notes in the normal view or not. You can always view the Subs via there parent.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_links' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show in the InfoLog list',
|
||||
'name' => 'show_links',
|
||||
'values' => $show_links,
|
||||
'help' => 'Should InfoLog show the links to other applications and/or the file-attachments in the InfoLog list (normal view when you enter InfoLog).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'never_hide' => array(
|
||||
'type' => 'check',
|
||||
'label' => 'Never hide search and filters',
|
||||
'name' => 'never_hide',
|
||||
'help' => 'If not set, the line with search and filters is hidden for less entries then "max matches per page" (as defined in your common preferences).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_percent' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show status and percent done separate',
|
||||
'name' => 'show_percent',
|
||||
'values' => $show_details,
|
||||
'help' => 'Should the Infolog list show the percent done only for status ongoing or two separate icons.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_id' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show ticket Id',
|
||||
'name' => 'show_id',
|
||||
'values' => $show_details,
|
||||
'help' => 'Should the Infolog list show a unique numerical Id, which can be used eg. as ticket Id.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'set_start' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Startdate for new entries',
|
||||
'name' => 'set_start',
|
||||
'values' => array(
|
||||
'date' => lang('todays date'),
|
||||
'datetime' => lang('actual date and time'),
|
||||
'empty' => lang('leave it empty'),
|
||||
),
|
||||
'help' => 'To what should the startdate of new entries be set.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'cal_show' => array(
|
||||
'type' => 'multiselect',
|
||||
'label' => 'Which types should the calendar show',
|
||||
'name' => 'cal_show',
|
||||
'values' => $ui->bo->enums['type'],
|
||||
'help' => 'Can be used to show further InfoLog types in the calendar or limit it to show eg. only tasks.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'cat_add_default' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Default categorie for new Infolog entries',
|
||||
'name' => 'cat_add_default',
|
||||
'values' => self::all_cats(),
|
||||
'help' => 'You can choose a categorie to be preselected, when you create a new Infolog entry',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
// notification preferences
|
||||
$GLOBALS['settings']['notify_creator'] = array(
|
||||
'type' => 'check',
|
||||
'label' => 'Receive notifications about own items',
|
||||
'name' => 'notify_creator',
|
||||
'help' => 'Do you want a notification, if items you created get updated?',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_assigned'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about items assigned to you',
|
||||
'name' => 'notify_assigned',
|
||||
'help' => 'Do you want a notification, if items get assigned to you or assigned items get updated?',
|
||||
'values' => array(
|
||||
'0' => lang('No'),
|
||||
'1' => lang('Yes'),
|
||||
'assignment' => lang('Only if I get assigned or removed'),
|
||||
),
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
|
||||
// to add options for more then 3 days back or in advance, you need to update soinfolog::users_with_open_entries()!
|
||||
$options = array(
|
||||
'0' => lang('No'),
|
||||
'-1d' => lang('one day after'),
|
||||
'0d' => lang('same day'),
|
||||
'1d' => lang('one day in advance'),
|
||||
'2d' => lang('%1 days in advance',2),
|
||||
'3d' => lang('%1 days in advance',3),
|
||||
);
|
||||
$GLOBALS['settings']['notify_due_delegated'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about due entries you delegated',
|
||||
'name' => 'notify_due_delegated',
|
||||
'help' => 'Do you want a notification, if items you delegated are due?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_due_responsible'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about due entries you are responsible for',
|
||||
'name' => 'notify_due_responsible',
|
||||
'help' => 'Do you want a notification, if items you are responsible for are due?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_start_delegated'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about starting entries you delegated',
|
||||
'name' => 'notify_start_delegated',
|
||||
'help' => 'Do you want a notification, if items you delegated are about to start?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_start_responsible'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about starting entries you are responsible for',
|
||||
'name' => 'notify_start_responsible',
|
||||
'help' => 'Do you want a notification, if items you are responsible for are about to start?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
|
||||
return true; // otherwise prefs say it cant find the file ;-)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return InoLog Categories (used for setting )
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private static function all_cats()
|
||||
{
|
||||
$categories = new categories('','infolog');
|
||||
|
||||
foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat)
|
||||
{
|
||||
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
|
||||
|
||||
if ($cat['app_name'] == 'phpgw' || $cat['owner'] == '-1')
|
||||
{
|
||||
$s .= ' ♦';
|
||||
}
|
||||
$sel_options[$cat['id']] = $s; // 0.9.14 only
|
||||
}
|
||||
return $sel_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verification hook called if settings / preferences get stored
|
||||
*
|
||||
* Installs a task to send async infolog notifications at 2h everyday
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
static function verify_settings($data)
|
||||
{
|
||||
if ($data['prefs']['notify_due_delegated'] || $data['prefs']['notify_due_responsible'] ||
|
||||
$data['prefs']['notify_start_delegated'] || $data['prefs']['notify_start_responsible'])
|
||||
{
|
||||
require_once(EGW_API_INC.'/class.asyncservice.inc.php');
|
||||
|
||||
$async =& new asyncservice();
|
||||
//$async->cancel_timer('infolog-async-notification');
|
||||
|
||||
if (!$async->read('infolog-async-notification'))
|
||||
{
|
||||
$async->set_timer(array('hour' => 2),'infolog-async-notification','infolog.infolog_bo.async_notification',null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - Link-registry
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @copyright (c) 2003-6 by Ralf Becker <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.'/infolog/inc/class.boinfolog.inc.php');
|
||||
|
||||
/**
|
||||
* This class returns the link-registry for infolog
|
||||
*
|
||||
* To prevent an invinit recursion, it has to be outside the boinfolog class,
|
||||
* which itself instanciats the link class by default.
|
||||
*
|
||||
* @todo delete after next infolog update
|
||||
*/
|
||||
class infolog_link_registry
|
||||
{
|
||||
function search_link($location)
|
||||
{
|
||||
$bo =& new boinfolog(0,false); // false = dont instanciate the link class
|
||||
|
||||
return $bo->search_link($location);
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - Admin-, Preferences- and SideboxMenu-Hooks
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class containing admin, preferences and sidebox-menus (used as hooks)
|
||||
*/
|
||||
class infolog_prefs_sidebox_hooks
|
||||
{
|
||||
function all_hooks($args)
|
||||
{
|
||||
$appname = 'infolog';
|
||||
$location = is_array($args) ? $args['location'] : $args;
|
||||
//echo "<p>admin_prefs_sidebox_hooks::all_hooks(".print_r($args,True).") appname='$appname', location='$location'</p>\n";
|
||||
|
||||
if ($location == 'sidebox_menu')
|
||||
{
|
||||
$file = array(
|
||||
'infolog list' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.uiinfolog.index' )),
|
||||
array(
|
||||
'text' => '<a class="textSidebox" href="'.htmlspecialchars($GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.uiinfolog.edit',
|
||||
))).'" target="_blank" onclick="window.open(this.href,this.target,\'dependent=yes,width=750,height=550,scrollbars=yes,status=yes\'); return false;">'.lang('Add').'</a>',
|
||||
'no_lang' => true,
|
||||
)
|
||||
);
|
||||
display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file);
|
||||
}
|
||||
|
||||
if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin')
|
||||
{
|
||||
$file = array(
|
||||
'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname),
|
||||
'Grant Access' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
|
||||
'Edit Categories' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
|
||||
);
|
||||
if ($location == 'preferences')
|
||||
{
|
||||
display_section($appname,$file);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_sidebox($appname,lang('Preferences'),$file);
|
||||
}
|
||||
}
|
||||
|
||||
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences')
|
||||
{
|
||||
$file = Array(
|
||||
'Site configuration' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.uiinfolog.admin' )),
|
||||
'Global Categories' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'admin.uicategories.index',
|
||||
'appname' => $appname,
|
||||
'global_cats'=> True)),
|
||||
'Custom fields, typ and status' => $GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.uicustomfields.edit')),
|
||||
'CSV-Import' => $GLOBALS['egw']->link('/infolog/csv_import.php')
|
||||
);
|
||||
if ($location == 'admin')
|
||||
{
|
||||
display_section($appname,$file);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_sidebox($appname,lang('Admin'),$file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verification hook called if settings / preferences get stored
|
||||
*
|
||||
* Installs a task to send async infolog notifications at 2h everyday
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
function verify_settings($data)
|
||||
{
|
||||
if ($data['prefs']['notify_due_delegated'] || $data['prefs']['notify_due_responsible'] ||
|
||||
$data['prefs']['notify_start_delegated'] || $data['prefs']['notify_start_responsible'])
|
||||
{
|
||||
require_once(EGW_API_INC.'/class.asyncservice.inc.php');
|
||||
|
||||
$async =& new asyncservice();
|
||||
//$async->cancel_timer('infolog-async-notification');
|
||||
|
||||
if (!$async->read('infolog-async-notification'))
|
||||
{
|
||||
$async->set_timer(array('hour' => 2),'infolog-async-notification','infolog.boinfolog.async_notification',null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
549
infolog/inc/class.infolog_sif.inc.php
Normal file
549
infolog/inc/class.infolog_sif.inc.php
Normal file
@ -0,0 +1,549 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - SIF Parser
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Lars Kneschke <lkneschke@egroupware.org>
|
||||
* @package infolog
|
||||
* @subpackage syncml
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once EGW_API_INC.'/horde/Horde/iCalendar.php';
|
||||
|
||||
/**
|
||||
* InfoLog: Create and parse SIF
|
||||
*
|
||||
*/
|
||||
class infolog_sif extends infolog_bo
|
||||
{
|
||||
// array containing the result of the xml parser
|
||||
var $_extractedSIFData;
|
||||
|
||||
// array containing the current mappings(task or note)
|
||||
var $_currentSIFMapping;
|
||||
|
||||
var $_sifNoteMapping = array(
|
||||
'Body' => 'info_des',
|
||||
'Categories' => 'info_cat',
|
||||
'Color' => '',
|
||||
'Date' => 'info_startdate',
|
||||
'Height' => '',
|
||||
'Left' => '',
|
||||
'Subject' => 'info_subject',
|
||||
'Top' => '',
|
||||
'Width' => '',
|
||||
);
|
||||
|
||||
// mappings for SIFTask to InfologTask
|
||||
var $_sifTaskMapping = array(
|
||||
'ActualWork' => '',
|
||||
'BillingInformation' => '',
|
||||
'Body' => 'info_des',
|
||||
'Categories' => 'info_cat',
|
||||
'Companies' => '',
|
||||
'Complete' => '',
|
||||
'DateCompleted' => 'info_datecompleted',
|
||||
'DueDate' => 'info_enddate',
|
||||
'Importance' => 'info_priority',
|
||||
'IsRecurring' => '',
|
||||
'Mileage' => '',
|
||||
'PercentComplete' => 'info_percent',
|
||||
'ReminderSet' => '',
|
||||
'ReminderTime' => '',
|
||||
'Sensitivity' => 'info_access',
|
||||
'StartDate' => 'info_startdate',
|
||||
'Status' => 'info_status',
|
||||
'Subject' => 'info_subject',
|
||||
'TeamTask' => '',
|
||||
'TotalWork' => '',
|
||||
'RecurrenceType' => '',
|
||||
'Interval' => '',
|
||||
'MonthOfYear' => '',
|
||||
'DayOfMonth' => '',
|
||||
'DayOfWeekMask' => '',
|
||||
'Instance' => '',
|
||||
'PatternStartDate' => '',
|
||||
'NoEndDate' => '',
|
||||
'PatternEndDate' => '',
|
||||
'Occurrences' => '',
|
||||
);
|
||||
|
||||
|
||||
|
||||
function startElement($_parser, $_tag, $_attributes) {
|
||||
}
|
||||
|
||||
function endElement($_parser, $_tag) {
|
||||
error_log("infolog: tag=$_tag data=".trim($this->sifData));
|
||||
if(!empty($this->_currentSIFMapping[$_tag])) {
|
||||
$this->_extractedSIFData[$this->_currentSIFMapping[$_tag]] = trim($this->sifData);
|
||||
}
|
||||
unset($this->sifData);
|
||||
}
|
||||
|
||||
function characterData($_parser, $_data) {
|
||||
$this->sifData .= $_data;
|
||||
}
|
||||
|
||||
function siftoegw($_sifData, $_sifType) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$sifData = base64_decode($_sifData);
|
||||
|
||||
#$tmpfname = tempnam('/tmp/sync/contents','sift_');
|
||||
|
||||
#$handle = fopen($tmpfname, "w");
|
||||
#fwrite($handle, $sifData);
|
||||
#fclose($handle);
|
||||
|
||||
switch ($_sifType)
|
||||
{
|
||||
case 'note':
|
||||
$this->_currentSIFMapping = $this->_sifNoteMapping;
|
||||
break;
|
||||
|
||||
case 'task':
|
||||
default:
|
||||
$this->_currentSIFMapping = $this->_sifTaskMapping;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->xml_parser = xml_parser_create('UTF-8');
|
||||
xml_set_object($this->xml_parser, $this);
|
||||
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, false);
|
||||
xml_set_element_handler($this->xml_parser, "startElement", "endElement");
|
||||
xml_set_character_data_handler($this->xml_parser, "characterData");
|
||||
$this->strXmlData = xml_parse($this->xml_parser, $sifData);
|
||||
if(!$this->strXmlData) {
|
||||
error_log(sprintf("XML error: %s at line %d",
|
||||
xml_error_string(xml_get_error_code($this->xml_parser)),
|
||||
xml_get_current_line_number($this->xml_parser)));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!array($this->_extractedSIFData)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch($_sifType) {
|
||||
case 'task':
|
||||
$taskData = array();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$taskData['info_type'] = 'task';
|
||||
|
||||
foreach($this->_extractedSIFData as $key => $value) {
|
||||
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
|
||||
error_log("infolog key=$key => value=$value");
|
||||
|
||||
switch($key) {
|
||||
case 'info_access':
|
||||
$taskData[$key] = ((int)$value > 0) ? 'private' : 'public';
|
||||
break;
|
||||
|
||||
case 'info_datecompleted':
|
||||
case 'info_enddate':
|
||||
case 'info_startdate':
|
||||
if(!empty($value)) {
|
||||
$taskData[$key] = $vcal->_parseDateTime($value);
|
||||
// somehow the client always deliver a timestamp about 3538 seconds, when no startdate set.
|
||||
if($taskData[$key] < 10000)
|
||||
$taskData[$key] = '';
|
||||
} else {
|
||||
$taskData[$key] = '';
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'info_cat':
|
||||
if (!empty($value)) {
|
||||
$categories = $this->find_or_add_categories(explode(';', $value));
|
||||
$taskData['info_cat'] = $categories[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'info_priority':
|
||||
$taskData[$key] = (int)$value;
|
||||
break;
|
||||
|
||||
case 'info_status':
|
||||
$taskData[$key] = ((int)$value == 2) ? 'done' : 'ongoing';
|
||||
switch($value) {
|
||||
case '0':
|
||||
$taskData[$key] = 'not-started';
|
||||
break;
|
||||
case '1':
|
||||
$taskData[$key] = 'ongoing';
|
||||
break;
|
||||
case '2':
|
||||
$taskData[$key] = 'done';
|
||||
break;
|
||||
case '4':
|
||||
$taskData[$key] = 'cancelled';
|
||||
break;
|
||||
default:
|
||||
$taskData[$key] = 'ongoing';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$taskData[$key] = $value;
|
||||
break;
|
||||
}
|
||||
error_log("infolog task key=$key => value=".$taskData[$key]);
|
||||
}
|
||||
|
||||
return $taskData;
|
||||
break;
|
||||
|
||||
case 'note':
|
||||
$noteData = array();
|
||||
$noteData['info_type'] = 'note';
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
foreach($this->_extractedSIFData as $key => $value)
|
||||
{
|
||||
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
|
||||
|
||||
error_log("infolog client key=$key => value=".$value);
|
||||
switch ($key)
|
||||
{
|
||||
case 'info_startdate':
|
||||
if(!empty($value)) {
|
||||
$noteData[$key] = $vcal->_parseDateTime($value);
|
||||
// somehow the client always deliver a timestamp about 3538 seconds, when no startdate set.
|
||||
if($noteData[$key] < 10000)
|
||||
$noteData[$key] = '';
|
||||
} else {
|
||||
$noteData[$key] = '';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'info_cat':
|
||||
if (!empty($value)) {
|
||||
$categories = $this->find_or_add_categories(explode(';', $value));
|
||||
$taskData['info_cat'] = $categories[0];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$noteData[$key] = $value;
|
||||
break;
|
||||
}
|
||||
error_log("infolog note key=$key => value=".$noteData[$key]);
|
||||
}
|
||||
return $noteData;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function searchSIF($_sifData, $_sifType) {
|
||||
if(!$egwData = $this->siftoegw($_sifData, $_sifType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$filter = array('col_filter' => $egwData);
|
||||
if($foundItems = $this->search($filter)) {
|
||||
if(count($foundItems) > 0) {
|
||||
$itemIDs = array_keys($foundItems);
|
||||
return $itemIDs[0];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function addSIF($_sifData, $_id, $_sifType) {
|
||||
if(!$egwData = $this->siftoegw($_sifData, $_sifType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($_id > 0)
|
||||
$egwData['info_id'] = $_id;
|
||||
|
||||
$egwID = $this->write($egwData, false);
|
||||
|
||||
return $egwID;
|
||||
}
|
||||
|
||||
function getSIF($_id, $_sifType) {
|
||||
switch($_sifType) {
|
||||
case 'task':
|
||||
if($taskData = $this->read($_id)) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$sifTask = '<task>';
|
||||
|
||||
foreach($this->_sifTaskMapping as $sifField => $egwField)
|
||||
{
|
||||
if(empty($egwField)) continue;
|
||||
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData[$egwField], $sysCharSet, 'utf-8');
|
||||
|
||||
switch($sifField) {
|
||||
case 'DateCompleted':
|
||||
case 'DueDate':
|
||||
case 'StartDate':
|
||||
if(!empty($value)) {
|
||||
$value = $vcal->_exportDateTime($value);
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Importance':
|
||||
if($value > 3) $value = 3;
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Sensitivity':
|
||||
$value = ($value == 'private' ? '2' : '0');
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Status':
|
||||
switch($value) {
|
||||
case 'cancelled':
|
||||
$value = '4';
|
||||
break;
|
||||
case 'done':
|
||||
$value = '2';
|
||||
break;
|
||||
case 'not-started':
|
||||
$value = '0';
|
||||
break;
|
||||
case 'ongoing':
|
||||
$value = '1';
|
||||
break;
|
||||
default:
|
||||
$value = 1;
|
||||
break;
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Categories':
|
||||
if (!empty($value))
|
||||
{
|
||||
$value = implode('; ', $this->get_categories(array($value)));
|
||||
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$sifTask .= '<ActualWork>0</ActualWork><IsRecurring>0</IsRecurring>';
|
||||
return base64_encode($sifTask);
|
||||
|
||||
/* return base64_encode("<task>
|
||||
<ActualWork>0</ActualWork>
|
||||
<BillingInformation></BillingInformation>
|
||||
<Body></Body>
|
||||
<Categories></Categories>
|
||||
<Companies></Companies>
|
||||
<Complete>0</Complete>
|
||||
<DateCompleted></DateCompleted>
|
||||
<DueDate></DueDate>
|
||||
<Importance>1</Importance>
|
||||
<IsRecurring>0</IsRecurring>
|
||||
<Mileage></Mileage>
|
||||
<PercentComplete>0</PercentComplete>
|
||||
<ReminderSet>0</ReminderSet>
|
||||
<ReminderTime></ReminderTime>
|
||||
<Sensitivity>0</Sensitivity>
|
||||
<StartDate>45001231T230000Z</StartDate>
|
||||
<Status>3</Status>
|
||||
<Subject>TARAAA3</Subject>
|
||||
<TeamTask>0</TeamTask>
|
||||
<TotalWork>0</TotalWork>
|
||||
<RecurrenceType>1</RecurrenceType>
|
||||
<Interval>1</Interval>
|
||||
<MonthOfYear>0</MonthOfYear>
|
||||
<DayOfMonth>0</DayOfMonth>
|
||||
<DayOfWeekMask>4</DayOfWeekMask>
|
||||
<Instance>0</Instance>
|
||||
<PatternStartDate>20060320T230000Z</PatternStartDate>
|
||||
<NoEndDate>1</NoEndDate>
|
||||
<PatternEndDate></PatternEndDate>
|
||||
<Occurrences>10</Occurrences>
|
||||
</task>
|
||||
"); */
|
||||
}
|
||||
break;
|
||||
|
||||
case 'note':
|
||||
if($taskData = $this->read($_id)) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$sifNote = '<note>';
|
||||
|
||||
foreach($this->_sifNoteMapping as $sifField => $egwField)
|
||||
{
|
||||
if(empty($egwField)) continue;
|
||||
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData[$egwField], $sysCharSet, 'utf-8');
|
||||
|
||||
switch($sifField) {
|
||||
case 'Date':
|
||||
if(!empty($value)) {
|
||||
$value = $vcal->_exportDateTime($value);
|
||||
}
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Body':
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData['info_subject'], $sysCharSet, 'utf-8') . "\n" . $value;
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Categories':
|
||||
if (!empty($value))
|
||||
{
|
||||
$value = implode('; ', $this->get_categories(array($value)));
|
||||
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
|
||||
}
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return base64_encode($sifNote);
|
||||
}
|
||||
break;
|
||||
|
||||
default;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function exportVTODO($_taskID, $_version)
|
||||
{
|
||||
$taskData = $this->read($_taskID);
|
||||
|
||||
$taskData = $GLOBALS['egw']->translation->convert($taskData,$GLOBALS['egw']->translation->charset(),'UTF-8');
|
||||
|
||||
//_debug_array($taskData);
|
||||
|
||||
$taskGUID = $GLOBALS['phpgw']->common->generate_uid('infolog_task',$_taskID);
|
||||
|
||||
$vcal = &new Horde_iCalendar;
|
||||
$vcal->setAttribute('VERSION',$_version);
|
||||
$vcal->setAttribute('METHOD','PUBLISH');
|
||||
|
||||
$vevent = Horde_iCalendar::newComponent('VTODO',$vcal);
|
||||
|
||||
$options = array();
|
||||
|
||||
$vevent->setAttribute('SUMMARY',$taskData['info_subject']);
|
||||
$vevent->setAttribute('DESCRIPTION',$taskData['info_des']);
|
||||
if($taskData['info_startdate'])
|
||||
$vevent->setAttribute('DTSTART',$taskData['info_startdate']);
|
||||
if($taskData['info_enddate'])
|
||||
$vevent->setAttribute('DUE',$taskData['info_enddate']);
|
||||
$vevent->setAttribute('DTSTAMP',time());
|
||||
$vevent->setAttribute('CREATED',$GLOBALS['phpgw']->contenthistory->getTSforAction($eventGUID,'add'));
|
||||
$vevent->setAttribute('LAST-MODIFIED',$GLOBALS['phpgw']->contenthistory->getTSforAction($eventGUID,'modify'));
|
||||
$vevent->setAttribute('UID',$taskGUID);
|
||||
$vevent->setAttribute('CLASS',(($taskData['info_access'] == 'public')?'PUBLIC':'PRIVATE'));
|
||||
$vevent->setAttribute('STATUS',(($taskData['info_status'] == 'completed')?'COMPLETED':'NEEDS-ACTION'));
|
||||
// 3=urgent => 1, 2=high => 2, 1=normal => 3, 0=low => 4
|
||||
$vevent->setAttribute('PRIORITY',4-$taskData['info_priority']);
|
||||
|
||||
#$vevent->setAttribute('TRANSP','OPAQUE');
|
||||
# status
|
||||
# ATTENDEE
|
||||
|
||||
$options = array('CHARSET' => 'UTF-8','ENCODING' => 'QUOTED-PRINTABLE');
|
||||
$vevent->setParameter('SUMMARY', $options);
|
||||
$vevent->setParameter('DESCRIPTION', $options);
|
||||
|
||||
$vcal->addComponent($vevent);
|
||||
|
||||
#print "<pre>";
|
||||
#print $vcal->exportvCalendar();
|
||||
#print "</pre>";
|
||||
|
||||
return $vcal->exportvCalendar();
|
||||
}
|
||||
|
||||
function importVTODO(&$_vcalData, $_taskID=-1)
|
||||
{
|
||||
$botranslation = CreateObject('phpgwapi.translation');
|
||||
|
||||
$vcal = &new Horde_iCalendar;
|
||||
if(!$vcal->parsevCalendar($_vcalData))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
$components = $vcal->getComponents();
|
||||
if(count($components) > 0)
|
||||
{
|
||||
$component = $components[0];
|
||||
if(is_a($component, 'Horde_iCalendar_vtodo'))
|
||||
{
|
||||
if($_taskID>0)
|
||||
$taskData['info_id'] = $_taskID;
|
||||
|
||||
foreach($component->_attributes as $attributes)
|
||||
{
|
||||
#print $attributes['name'].' - '.$attributes['value'].'<br>';
|
||||
#$attributes['value'] = $GLOBALS['egw']->translation->convert($attributes['value'],'UTF-8');
|
||||
switch($attributes['name'])
|
||||
{
|
||||
case 'CLASS':
|
||||
$taskData['info_access'] = strtolower($attributes['value']);
|
||||
break;
|
||||
case 'DESCRIPTION':
|
||||
$taskData['info_des'] = $attributes['value'];
|
||||
break;
|
||||
case 'DUE':
|
||||
$taskData['info_enddate'] = $attributes['value'];
|
||||
break;
|
||||
case 'DTSTART':
|
||||
$taskData['info_startdate'] = $attributes['value'];
|
||||
break;
|
||||
case 'PRIORITY':
|
||||
// 1 => 3=urgent, 2 => 2=high, 3 => 1=normal, 4 => 0=low
|
||||
if (1 <= $attributes['value'] && $attributes['value'] <= 4)
|
||||
{
|
||||
$taskData['info_priority'] = 4 - $attributes['value'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$taskData['info_priority'] = 1; // default = normal
|
||||
}
|
||||
break;
|
||||
case 'STATUS':
|
||||
$taskData['info_status'] = (strtolower($attributes['value']) == 'completed') ? 'done' : 'ongoing';
|
||||
break;
|
||||
case 'SUMMARY':
|
||||
$taskData['info_subject'] = $attributes['value'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
#_debug_array($eventData);exit;
|
||||
return $this->write($taskData);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
* @copyright (c) by Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
*/
|
||||
class soinfolog // DB-Layer
|
||||
class infolog_so // DB-Layer
|
||||
{
|
||||
/**
|
||||
* Instance of the db class
|
||||
@ -72,7 +72,7 @@ class soinfolog // DB-Layer
|
||||
* @param array $grants
|
||||
* @return soinfolog
|
||||
*/
|
||||
function soinfolog( &$grants )
|
||||
function __construct( &$grants )
|
||||
{
|
||||
$this->db = clone($GLOBALS['egw']->db);
|
||||
$this->db->set_app('infolog');
|
@ -10,8 +10,6 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT.'/etemplate/inc/class.bo_tracking.inc.php');
|
||||
|
||||
/**
|
||||
* Tracker - tracking object for the tracker
|
||||
*/
|
||||
@ -106,12 +104,11 @@ class infolog_tracking extends bo_tracking
|
||||
);
|
||||
|
||||
/**
|
||||
* Instance of the boinfolog class calling us
|
||||
* Instance of the infolog_bo class calling us
|
||||
*
|
||||
* @access private
|
||||
* @var boinfolog
|
||||
* @var infolog_bo
|
||||
*/
|
||||
var $infolog;
|
||||
private $infolog;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -119,11 +116,11 @@ class infolog_tracking extends bo_tracking
|
||||
* @param botracker $botracker
|
||||
* @return tracker_tracking
|
||||
*/
|
||||
function infolog_tracking(&$boinfolog)
|
||||
function __construct(&$infolog_bo)
|
||||
{
|
||||
$this->bo_tracking(); // calling the constructor of the extended class
|
||||
parent::__construct(); // calling the constructor of the extended class
|
||||
|
||||
$this->infolog =& $boinfolog;
|
||||
$this->infolog =& $infolog_bo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,15 +10,12 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
|
||||
|
||||
/**
|
||||
* This class is the UI-layer (user interface) of InfoLog
|
||||
*/
|
||||
class uiinfolog
|
||||
class infolog_ui
|
||||
{
|
||||
var $public_functions = array
|
||||
(
|
||||
var $public_functions = array(
|
||||
'index' => True,
|
||||
'edit' => True,
|
||||
'delete' => True,
|
||||
@ -107,11 +104,11 @@ class uiinfolog
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return uiinfolog
|
||||
* @return infolog_ui
|
||||
*/
|
||||
function uiinfolog()
|
||||
function __construct()
|
||||
{
|
||||
$this->bo =& new boinfolog();
|
||||
$this->bo =& new infolog_bo();
|
||||
|
||||
$this->tmpl = new etemplate();
|
||||
|
||||
@ -144,7 +141,7 @@ class uiinfolog
|
||||
$this->filters['responsible-open-date'.date('Y-m-d',time()+$i*24*60*60)] = "responsible starting in $i day(s)";
|
||||
}
|
||||
*/
|
||||
$GLOBALS['uiinfolog'] =& $this; // make ourself availible for ExecMethod of get_rows function
|
||||
$GLOBALS['infolog_ui'] =& $this; // make ourself availible for ExecMethod of get_rows function
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,7 +249,7 @@ class uiinfolog
|
||||
function save_sessiondata($values)
|
||||
{
|
||||
$for = @$values['session_for'] ? $values['session_for'] : @$this->called_by;
|
||||
//echo "<p>$for: uiinfolog::save_sessiondata(".print_r($values,True).") called_by='$this->called_by', for='$for'<br />".function_backtrace()."</p>\n";
|
||||
//echo "<p>$for: ".__METHOD__.'('.print_r($values,True).") called_by='$this->called_by', for='$for'<br />".function_backtrace()."</p>\n";
|
||||
$GLOBALS['egw']->session->appsession($for.'session_data','infolog',array(
|
||||
'search' => $values['search'],
|
||||
'start' => $values['start'],
|
||||
@ -283,7 +280,7 @@ class uiinfolog
|
||||
$values['session_for'] = $this->called_by;
|
||||
$this->save_sessiondata($values);
|
||||
}
|
||||
//echo "<p>called_by='$this->called_by': uiinfolog::read_sessiondata() = ".print_r($values,True)."</p>\n";
|
||||
//echo "<p>called_by='$this->called_by': ".__METHOD__."() = ".print_r($values,True)."</p>\n";
|
||||
return $values;
|
||||
}
|
||||
|
||||
@ -297,7 +294,7 @@ class uiinfolog
|
||||
*/
|
||||
function get_rows(&$query,&$rows,&$readonlys)
|
||||
{
|
||||
//echo "<p>uiinfolog.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")</p>\n";
|
||||
//echo "<p>infolog_ui.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")</p>\n";
|
||||
if (!isset($query['start'])) $query['start'] = 0;
|
||||
|
||||
if (!$query['csv_export'])
|
||||
@ -454,7 +451,7 @@ class uiinfolog
|
||||
elseif ($own_referer === '')
|
||||
{
|
||||
$own_referer = $GLOBALS['egw']->common->get_referer();
|
||||
if (strpos($own_referer,'menuaction=infolog.uiinfolog.edit') !== false)
|
||||
if (strpos($own_referer,'menuaction=infolog.infolog_ui.edit') !== false)
|
||||
{
|
||||
$own_referer = $GLOBALS['egw']->session->appsession('own_session','infolog');
|
||||
}
|
||||
@ -487,7 +484,7 @@ class uiinfolog
|
||||
unset($session);
|
||||
}
|
||||
}
|
||||
//echo "<p align=right>uiinfolog::index(action='$action/$action_id',called_as='$called_as/$values[referer]',own_referer='$own_referer') values=\n"; _debug_array($values);
|
||||
//echo "<p align=right>infolog_ui::index(action='$action/$action_id',called_as='$called_as/$values[referer]',own_referer='$own_referer') values=\n"; _debug_array($values);
|
||||
if (!is_array($values))
|
||||
{
|
||||
$values = array('nm' => $this->read_sessiondata());
|
||||
@ -586,7 +583,7 @@ class uiinfolog
|
||||
$this->tmpl->read('infolog.index');
|
||||
|
||||
$values['nm']['options-filter'] = $this->filters;
|
||||
$values['nm']['get_rows'] = 'infolog.uiinfolog.get_rows';
|
||||
$values['nm']['get_rows'] = 'infolog.infolog_ui.get_rows';
|
||||
$values['nm']['options-filter2'] = (in_array($this->prefs['show_links'],array('all','no_describtion')) ? array() : array(
|
||||
'' => 'default',
|
||||
)) + array(
|
||||
@ -634,7 +631,7 @@ class uiinfolog
|
||||
{
|
||||
$values['css'] = '<style type="text/css">@import url('.$GLOBALS['egw_info']['server']['webserver_url'].'/infolog/templates/default/app.css);'."</style>";
|
||||
}
|
||||
return $this->tmpl->exec('infolog.uiinfolog.index',$values,array(
|
||||
return $this->tmpl->exec('infolog.infolog_ui.index',$values,array(
|
||||
'info_type' => $this->bo->enums['type'],
|
||||
),$readonlys,$persist,$return_html ? -1 : 0);
|
||||
}
|
||||
@ -675,7 +672,7 @@ class uiinfolog
|
||||
{
|
||||
$values = array('delete' => true);
|
||||
}
|
||||
//echo "<p>uiinfolog::delete(".print_r($values,true).",'$referer','$called_by') info_id=$info_id</p>\n";
|
||||
//echo "<p>infolog_ui::delete(".print_r($values,true).",'$referer','$called_by') info_id=$info_id</p>\n";
|
||||
|
||||
if (is_array($values) || $info_id <= 0)
|
||||
{
|
||||
@ -707,7 +704,7 @@ class uiinfolog
|
||||
'action' => 'sp',
|
||||
'action_id' => $info_id,
|
||||
'options-filter' => $this->filters,
|
||||
'get_rows' => 'infolog.uiinfolog.get_rows',
|
||||
'get_rows' => 'infolog.infolog_ui.get_rows',
|
||||
'no_filter2' => True,
|
||||
'never_hide' => isset($this->prefs['never_hide']) ?
|
||||
$this->prefs['never_hide'] :
|
||||
@ -723,7 +720,7 @@ class uiinfolog
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog').' - '.lang('Delete');
|
||||
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => 'ManualInfologDelete');
|
||||
|
||||
$this->tmpl->exec('infolog.uiinfolog.delete',$values,'',$readonlys,$persist,$called_by == 'edit' ? 2 : 0);
|
||||
$this->tmpl->exec('infolog.infolog_ui.delete',$values,'',$readonlys,$persist,$called_by == 'edit' ? 2 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -741,7 +738,7 @@ class uiinfolog
|
||||
|
||||
if (is_array($content))
|
||||
{
|
||||
//echo "uiinfolog::edit: content="; _debug_array($content);
|
||||
//echo "infolog_ui::edit: content="; _debug_array($content);
|
||||
$info_id = $content['info_id'];
|
||||
$action = $content['action']; unset($content['action']);
|
||||
$action_id = $content['action_id']; unset($content['action_id']);
|
||||
@ -756,7 +753,7 @@ class uiinfolog
|
||||
unset($content['button']);
|
||||
if ($button)
|
||||
{
|
||||
//echo "<p>uiinfolog::edit(info_id=$info_id) '$button' button pressed, content="; _debug_array($content);
|
||||
//echo "<p>infolog_ui::edit(info_id=$info_id) '$button' button pressed, content="; _debug_array($content);
|
||||
if (($button == 'save' || $button == 'apply') && isset($content['info_subject']) && empty($content['info_subject']))
|
||||
{
|
||||
$this->tmpl->set_validation_error('info_subject',lang('Field must not be empty !!!'));
|
||||
@ -791,7 +788,7 @@ class uiinfolog
|
||||
lang('Error: the entry has been updated since you opened it for editing!').'<br />'.
|
||||
lang('Copy your changes to the clipboard, %1reload the entry%2 and merge them.','<a href="'.
|
||||
htmlspecialchars($GLOBALS['egw']->link('/index.php',array(
|
||||
'menuaction' => 'infolog.uiinfolog.edit',
|
||||
'menuaction' => 'infolog.infolog_ui.edit',
|
||||
'info_id' => $content['info_id'],
|
||||
'no_popup' => $no_popup,
|
||||
'referer' => $referer,
|
||||
@ -861,7 +858,7 @@ class uiinfolog
|
||||
elseif ($button == 'delete' && $info_id > 0)
|
||||
{
|
||||
if (!$referer && $action) $referer = array(
|
||||
'menuaction' => 'infolog.uiinfolog.index',
|
||||
'menuaction' => 'infolog.infolog_ui.index',
|
||||
'action' => $action,
|
||||
'action_id' => $action_id
|
||||
);
|
||||
@ -895,16 +892,16 @@ class uiinfolog
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "<p>uiinfolog::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";
|
||||
//echo "<p>infolog_ui::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";
|
||||
$action = $action ? $action : get_var('action', array('POST','GET'));
|
||||
$action_id = $action_id ? $action_id : get_var('action_id',array('POST','GET'));
|
||||
$info_id = $content ? $content : get_var('info_id', array('POST','GET'));
|
||||
$type = $type ? $type : get_var('type', array('POST','GET'));
|
||||
$ref=$referer = $referer !== '' ? $referer : ($_GET['referer'] ? $_GET['referer'] :
|
||||
$GLOBALS['egw']->common->get_referer('/index.php?menuaction=infolog.uiinfolog.index'));
|
||||
$GLOBALS['egw']->common->get_referer('/index.php?menuaction=infolog.infolog_ui.index'));
|
||||
$referer = preg_replace('/([&?]{1})msg=[^&]+&?/','\\1',$referer); // remove previou/old msg from referer
|
||||
$no_popup = $_GET['no_popup'];
|
||||
//echo "<p>uiinfolog::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";
|
||||
//echo "<p>infolog_ui::edit: info_id=$info_id, action='$action', action_id='$action_id', type='$type', referer='$referer'</p>\n";
|
||||
|
||||
$content = $this->bo->read( $info_id || $action != 'sp' ? $info_id : $action_id );
|
||||
if (is_numeric($_REQUEST['cat_id']))
|
||||
@ -1174,8 +1171,8 @@ class uiinfolog
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog').' - '.
|
||||
($content['status_only'] ? lang('Edit Status') : lang('Edit'));
|
||||
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => ($info_id ? 'ManualInfologEdit' : 'ManualInfologAdd'));
|
||||
//echo "<p>uiinfolog.edit(info_id='$info_id',action='$action',action_id='$action_id') readonlys="; print_r($readonlys); echo ", content = "; _debug_array($content);
|
||||
$this->tmpl->exec('infolog.uiinfolog.edit',$content,array(
|
||||
//echo "<p>infolog_ui.edit(info_id='$info_id',action='$action',action_id='$action_id') readonlys="; print_r($readonlys); echo ", content = "; _debug_array($content);
|
||||
$this->tmpl->exec('infolog.infolog_ui.edit',$content,array(
|
||||
'info_type' => $types,
|
||||
'info_priority' => $this->bo->enums['priority'],
|
||||
'info_confirm' => $this->bo->enums['confirm'],
|
||||
@ -1465,7 +1462,7 @@ class uiinfolog
|
||||
}
|
||||
if (!is_array($args) || $args['debug'])
|
||||
{
|
||||
echo "<p>uiinfolog::hook_view("; print_r($args); echo "): app='$app', $view_id='$args[$view_id]', view='$view'</p>\n";
|
||||
echo "<p>infolog_ui::hook_view("; print_r($args); echo "): app='$app', $view_id='$args[$view_id]', view='$view'</p>\n";
|
||||
}
|
||||
if (!isset($app) || !isset($args[$view_id]))
|
||||
{
|
@ -10,10 +10,13 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once EGW_SERVER_ROOT.'/infolog/inc/class.boinfolog.inc.php';
|
||||
require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php';
|
||||
require_once EGW_API_INC.'/horde/Horde/iCalendar.php';
|
||||
|
||||
class vcalinfolog extends boinfolog
|
||||
/**
|
||||
* InfoLog: Create and parse iCal's
|
||||
*
|
||||
*/
|
||||
class infolog_ical extends infolog_bo
|
||||
{
|
||||
var $egw_priority2vcal_priority = array(
|
||||
0 => 3,
|
@ -10,8 +10,6 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php');
|
||||
|
||||
/**
|
||||
* eTemplate Extension: InfoLog widget
|
||||
*
|
||||
@ -62,7 +60,7 @@ class infolog_widget
|
||||
function infolog_widget($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
$this->infolog =& new boinfolog();
|
||||
$this->infolog =& new infolog_bo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,549 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - SIF Parser
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Lars Kneschke <lkneschke@egroupware.org>
|
||||
* @package infolog
|
||||
* @subpackage syncml
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
require_once PHPGW_SERVER_ROOT.'/infolog/inc/class.boinfolog.inc.php';
|
||||
require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php';
|
||||
|
||||
class sifinfolog extends boinfolog
|
||||
{
|
||||
// array containing the result of the xml parser
|
||||
var $_extractedSIFData;
|
||||
|
||||
// array containing the current mappings(task or note)
|
||||
var $_currentSIFMapping;
|
||||
|
||||
var $_sifNoteMapping = array(
|
||||
'Body' => 'info_des',
|
||||
'Categories' => 'info_cat',
|
||||
'Color' => '',
|
||||
'Date' => 'info_startdate',
|
||||
'Height' => '',
|
||||
'Left' => '',
|
||||
'Subject' => 'info_subject',
|
||||
'Top' => '',
|
||||
'Width' => '',
|
||||
);
|
||||
|
||||
// mappings for SIFTask to InfologTask
|
||||
var $_sifTaskMapping = array(
|
||||
'ActualWork' => '',
|
||||
'BillingInformation' => '',
|
||||
'Body' => 'info_des',
|
||||
'Categories' => 'info_cat',
|
||||
'Companies' => '',
|
||||
'Complete' => '',
|
||||
'DateCompleted' => 'info_datecompleted',
|
||||
'DueDate' => 'info_enddate',
|
||||
'Importance' => 'info_priority',
|
||||
'IsRecurring' => '',
|
||||
'Mileage' => '',
|
||||
'PercentComplete' => 'info_percent',
|
||||
'ReminderSet' => '',
|
||||
'ReminderTime' => '',
|
||||
'Sensitivity' => 'info_access',
|
||||
'StartDate' => 'info_startdate',
|
||||
'Status' => 'info_status',
|
||||
'Subject' => 'info_subject',
|
||||
'TeamTask' => '',
|
||||
'TotalWork' => '',
|
||||
'RecurrenceType' => '',
|
||||
'Interval' => '',
|
||||
'MonthOfYear' => '',
|
||||
'DayOfMonth' => '',
|
||||
'DayOfWeekMask' => '',
|
||||
'Instance' => '',
|
||||
'PatternStartDate' => '',
|
||||
'NoEndDate' => '',
|
||||
'PatternEndDate' => '',
|
||||
'Occurrences' => '',
|
||||
);
|
||||
|
||||
|
||||
|
||||
function startElement($_parser, $_tag, $_attributes) {
|
||||
}
|
||||
|
||||
function endElement($_parser, $_tag) {
|
||||
error_log("infolog: tag=$_tag data=".trim($this->sifData));
|
||||
if(!empty($this->_currentSIFMapping[$_tag])) {
|
||||
$this->_extractedSIFData[$this->_currentSIFMapping[$_tag]] = trim($this->sifData);
|
||||
}
|
||||
unset($this->sifData);
|
||||
}
|
||||
|
||||
function characterData($_parser, $_data) {
|
||||
$this->sifData .= $_data;
|
||||
}
|
||||
|
||||
function siftoegw($_sifData, $_sifType) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$sifData = base64_decode($_sifData);
|
||||
|
||||
#$tmpfname = tempnam('/tmp/sync/contents','sift_');
|
||||
|
||||
#$handle = fopen($tmpfname, "w");
|
||||
#fwrite($handle, $sifData);
|
||||
#fclose($handle);
|
||||
|
||||
switch ($_sifType)
|
||||
{
|
||||
case 'note':
|
||||
$this->_currentSIFMapping = $this->_sifNoteMapping;
|
||||
break;
|
||||
|
||||
case 'task':
|
||||
default:
|
||||
$this->_currentSIFMapping = $this->_sifTaskMapping;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->xml_parser = xml_parser_create('UTF-8');
|
||||
xml_set_object($this->xml_parser, $this);
|
||||
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, false);
|
||||
xml_set_element_handler($this->xml_parser, "startElement", "endElement");
|
||||
xml_set_character_data_handler($this->xml_parser, "characterData");
|
||||
$this->strXmlData = xml_parse($this->xml_parser, $sifData);
|
||||
if(!$this->strXmlData) {
|
||||
error_log(sprintf("XML error: %s at line %d",
|
||||
xml_error_string(xml_get_error_code($this->xml_parser)),
|
||||
xml_get_current_line_number($this->xml_parser)));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!array($this->_extractedSIFData)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch($_sifType) {
|
||||
case 'task':
|
||||
$taskData = array();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$taskData['info_type'] = 'task';
|
||||
|
||||
foreach($this->_extractedSIFData as $key => $value) {
|
||||
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
|
||||
error_log("infolog key=$key => value=$value");
|
||||
|
||||
switch($key) {
|
||||
case 'info_access':
|
||||
$taskData[$key] = ((int)$value > 0) ? 'private' : 'public';
|
||||
break;
|
||||
|
||||
case 'info_datecompleted':
|
||||
case 'info_enddate':
|
||||
case 'info_startdate':
|
||||
if(!empty($value)) {
|
||||
$taskData[$key] = $vcal->_parseDateTime($value);
|
||||
// somehow the client always deliver a timestamp about 3538 seconds, when no startdate set.
|
||||
if($taskData[$key] < 10000)
|
||||
$taskData[$key] = '';
|
||||
} else {
|
||||
$taskData[$key] = '';
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'info_cat':
|
||||
if (!empty($value)) {
|
||||
$categories = $this->find_or_add_categories(explode(';', $value));
|
||||
$taskData['info_cat'] = $categories[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'info_priority':
|
||||
$taskData[$key] = (int)$value;
|
||||
break;
|
||||
|
||||
case 'info_status':
|
||||
$taskData[$key] = ((int)$value == 2) ? 'done' : 'ongoing';
|
||||
switch($value) {
|
||||
case '0':
|
||||
$taskData[$key] = 'not-started';
|
||||
break;
|
||||
case '1':
|
||||
$taskData[$key] = 'ongoing';
|
||||
break;
|
||||
case '2':
|
||||
$taskData[$key] = 'done';
|
||||
break;
|
||||
case '4':
|
||||
$taskData[$key] = 'cancelled';
|
||||
break;
|
||||
default:
|
||||
$taskData[$key] = 'ongoing';
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$taskData[$key] = $value;
|
||||
break;
|
||||
}
|
||||
error_log("infolog task key=$key => value=".$taskData[$key]);
|
||||
}
|
||||
|
||||
return $taskData;
|
||||
break;
|
||||
|
||||
case 'note':
|
||||
$noteData = array();
|
||||
$noteData['info_type'] = 'note';
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
foreach($this->_extractedSIFData as $key => $value)
|
||||
{
|
||||
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
|
||||
|
||||
error_log("infolog client key=$key => value=".$value);
|
||||
switch ($key)
|
||||
{
|
||||
case 'info_startdate':
|
||||
if(!empty($value)) {
|
||||
$noteData[$key] = $vcal->_parseDateTime($value);
|
||||
// somehow the client always deliver a timestamp about 3538 seconds, when no startdate set.
|
||||
if($noteData[$key] < 10000)
|
||||
$noteData[$key] = '';
|
||||
} else {
|
||||
$noteData[$key] = '';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'info_cat':
|
||||
if (!empty($value)) {
|
||||
$categories = $this->find_or_add_categories(explode(';', $value));
|
||||
$taskData['info_cat'] = $categories[0];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$noteData[$key] = $value;
|
||||
break;
|
||||
}
|
||||
error_log("infolog note key=$key => value=".$noteData[$key]);
|
||||
}
|
||||
return $noteData;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function searchSIF($_sifData, $_sifType) {
|
||||
if(!$egwData = $this->siftoegw($_sifData, $_sifType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$filter = array('col_filter' => $egwData);
|
||||
if($foundItems = $this->search($filter)) {
|
||||
if(count($foundItems) > 0) {
|
||||
$itemIDs = array_keys($foundItems);
|
||||
return $itemIDs[0];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function addSIF($_sifData, $_id, $_sifType) {
|
||||
if(!$egwData = $this->siftoegw($_sifData, $_sifType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($_id > 0)
|
||||
$egwData['info_id'] = $_id;
|
||||
|
||||
$egwID = $this->write($egwData, false);
|
||||
|
||||
return $egwID;
|
||||
}
|
||||
|
||||
function getSIF($_id, $_sifType) {
|
||||
switch($_sifType) {
|
||||
case 'task':
|
||||
if($taskData = $this->read($_id)) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$sifTask = '<task>';
|
||||
|
||||
foreach($this->_sifTaskMapping as $sifField => $egwField)
|
||||
{
|
||||
if(empty($egwField)) continue;
|
||||
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData[$egwField], $sysCharSet, 'utf-8');
|
||||
|
||||
switch($sifField) {
|
||||
case 'DateCompleted':
|
||||
case 'DueDate':
|
||||
case 'StartDate':
|
||||
if(!empty($value)) {
|
||||
$value = $vcal->_exportDateTime($value);
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Importance':
|
||||
if($value > 3) $value = 3;
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Sensitivity':
|
||||
$value = ($value == 'private' ? '2' : '0');
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Status':
|
||||
switch($value) {
|
||||
case 'cancelled':
|
||||
$value = '4';
|
||||
break;
|
||||
case 'done':
|
||||
$value = '2';
|
||||
break;
|
||||
case 'not-started':
|
||||
$value = '0';
|
||||
break;
|
||||
case 'ongoing':
|
||||
$value = '1';
|
||||
break;
|
||||
default:
|
||||
$value = 1;
|
||||
break;
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Categories':
|
||||
if (!empty($value))
|
||||
{
|
||||
$value = implode('; ', $this->get_categories(array($value)));
|
||||
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
|
||||
}
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sifTask .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$sifTask .= '<ActualWork>0</ActualWork><IsRecurring>0</IsRecurring>';
|
||||
return base64_encode($sifTask);
|
||||
|
||||
/* return base64_encode("<task>
|
||||
<ActualWork>0</ActualWork>
|
||||
<BillingInformation></BillingInformation>
|
||||
<Body></Body>
|
||||
<Categories></Categories>
|
||||
<Companies></Companies>
|
||||
<Complete>0</Complete>
|
||||
<DateCompleted></DateCompleted>
|
||||
<DueDate></DueDate>
|
||||
<Importance>1</Importance>
|
||||
<IsRecurring>0</IsRecurring>
|
||||
<Mileage></Mileage>
|
||||
<PercentComplete>0</PercentComplete>
|
||||
<ReminderSet>0</ReminderSet>
|
||||
<ReminderTime></ReminderTime>
|
||||
<Sensitivity>0</Sensitivity>
|
||||
<StartDate>45001231T230000Z</StartDate>
|
||||
<Status>3</Status>
|
||||
<Subject>TARAAA3</Subject>
|
||||
<TeamTask>0</TeamTask>
|
||||
<TotalWork>0</TotalWork>
|
||||
<RecurrenceType>1</RecurrenceType>
|
||||
<Interval>1</Interval>
|
||||
<MonthOfYear>0</MonthOfYear>
|
||||
<DayOfMonth>0</DayOfMonth>
|
||||
<DayOfWeekMask>4</DayOfWeekMask>
|
||||
<Instance>0</Instance>
|
||||
<PatternStartDate>20060320T230000Z</PatternStartDate>
|
||||
<NoEndDate>1</NoEndDate>
|
||||
<PatternEndDate></PatternEndDate>
|
||||
<Occurrences>10</Occurrences>
|
||||
</task>
|
||||
"); */
|
||||
}
|
||||
break;
|
||||
|
||||
case 'note':
|
||||
if($taskData = $this->read($_id)) {
|
||||
$sysCharSet = $GLOBALS['egw']->translation->charset();
|
||||
$vcal = &new Horde_iCalendar;
|
||||
|
||||
$sifNote = '<note>';
|
||||
|
||||
foreach($this->_sifNoteMapping as $sifField => $egwField)
|
||||
{
|
||||
if(empty($egwField)) continue;
|
||||
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData[$egwField], $sysCharSet, 'utf-8');
|
||||
|
||||
switch($sifField) {
|
||||
case 'Date':
|
||||
if(!empty($value)) {
|
||||
$value = $vcal->_exportDateTime($value);
|
||||
}
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Body':
|
||||
$value = $GLOBALS['egw']->translation->convert($taskData['info_subject'], $sysCharSet, 'utf-8') . "\n" . $value;
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
case 'Categories':
|
||||
if (!empty($value))
|
||||
{
|
||||
$value = implode('; ', $this->get_categories(array($value)));
|
||||
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
|
||||
}
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$sifNote .= "<$sifField>$value</$sifField>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return base64_encode($sifNote);
|
||||
}
|
||||
break;
|
||||
|
||||
default;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function exportVTODO($_taskID, $_version)
|
||||
{
|
||||
$taskData = $this->read($_taskID);
|
||||
|
||||
$taskData = $GLOBALS['egw']->translation->convert($taskData,$GLOBALS['egw']->translation->charset(),'UTF-8');
|
||||
|
||||
//_debug_array($taskData);
|
||||
|
||||
$taskGUID = $GLOBALS['phpgw']->common->generate_uid('infolog_task',$_taskID);
|
||||
|
||||
$vcal = &new Horde_iCalendar;
|
||||
$vcal->setAttribute('VERSION',$_version);
|
||||
$vcal->setAttribute('METHOD','PUBLISH');
|
||||
|
||||
$vevent = Horde_iCalendar::newComponent('VTODO',$vcal);
|
||||
|
||||
$options = array();
|
||||
|
||||
$vevent->setAttribute('SUMMARY',$taskData['info_subject']);
|
||||
$vevent->setAttribute('DESCRIPTION',$taskData['info_des']);
|
||||
if($taskData['info_startdate'])
|
||||
$vevent->setAttribute('DTSTART',$taskData['info_startdate']);
|
||||
if($taskData['info_enddate'])
|
||||
$vevent->setAttribute('DUE',$taskData['info_enddate']);
|
||||
$vevent->setAttribute('DTSTAMP',time());
|
||||
$vevent->setAttribute('CREATED',$GLOBALS['phpgw']->contenthistory->getTSforAction($eventGUID,'add'));
|
||||
$vevent->setAttribute('LAST-MODIFIED',$GLOBALS['phpgw']->contenthistory->getTSforAction($eventGUID,'modify'));
|
||||
$vevent->setAttribute('UID',$taskGUID);
|
||||
$vevent->setAttribute('CLASS',(($taskData['info_access'] == 'public')?'PUBLIC':'PRIVATE'));
|
||||
$vevent->setAttribute('STATUS',(($taskData['info_status'] == 'completed')?'COMPLETED':'NEEDS-ACTION'));
|
||||
// 3=urgent => 1, 2=high => 2, 1=normal => 3, 0=low => 4
|
||||
$vevent->setAttribute('PRIORITY',4-$taskData['info_priority']);
|
||||
|
||||
#$vevent->setAttribute('TRANSP','OPAQUE');
|
||||
# status
|
||||
# ATTENDEE
|
||||
|
||||
$options = array('CHARSET' => 'UTF-8','ENCODING' => 'QUOTED-PRINTABLE');
|
||||
$vevent->setParameter('SUMMARY', $options);
|
||||
$vevent->setParameter('DESCRIPTION', $options);
|
||||
|
||||
$vcal->addComponent($vevent);
|
||||
|
||||
#print "<pre>";
|
||||
#print $vcal->exportvCalendar();
|
||||
#print "</pre>";
|
||||
|
||||
return $vcal->exportvCalendar();
|
||||
}
|
||||
|
||||
function importVTODO(&$_vcalData, $_taskID=-1)
|
||||
{
|
||||
$botranslation = CreateObject('phpgwapi.translation');
|
||||
|
||||
$vcal = &new Horde_iCalendar;
|
||||
if(!$vcal->parsevCalendar($_vcalData))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
$components = $vcal->getComponents();
|
||||
if(count($components) > 0)
|
||||
{
|
||||
$component = $components[0];
|
||||
if(is_a($component, 'Horde_iCalendar_vtodo'))
|
||||
{
|
||||
if($_taskID>0)
|
||||
$taskData['info_id'] = $_taskID;
|
||||
|
||||
foreach($component->_attributes as $attributes)
|
||||
{
|
||||
#print $attributes['name'].' - '.$attributes['value'].'<br>';
|
||||
#$attributes['value'] = $GLOBALS['egw']->translation->convert($attributes['value'],'UTF-8');
|
||||
switch($attributes['name'])
|
||||
{
|
||||
case 'CLASS':
|
||||
$taskData['info_access'] = strtolower($attributes['value']);
|
||||
break;
|
||||
case 'DESCRIPTION':
|
||||
$taskData['info_des'] = $attributes['value'];
|
||||
break;
|
||||
case 'DUE':
|
||||
$taskData['info_enddate'] = $attributes['value'];
|
||||
break;
|
||||
case 'DTSTART':
|
||||
$taskData['info_startdate'] = $attributes['value'];
|
||||
break;
|
||||
case 'PRIORITY':
|
||||
// 1 => 3=urgent, 2 => 2=high, 3 => 1=normal, 4 => 0=low
|
||||
if (1 <= $attributes['value'] && $attributes['value'] <= 4)
|
||||
{
|
||||
$taskData['info_priority'] = 4 - $attributes['value'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$taskData['info_priority'] = 1; // default = normal
|
||||
}
|
||||
break;
|
||||
case 'STATUS':
|
||||
$taskData['info_status'] = (strtolower($attributes['value']) == 'completed') ? 'done' : 'ongoing';
|
||||
break;
|
||||
case 'SUMMARY':
|
||||
$taskData['info_subject'] = $attributes['value'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
#_debug_array($eventData);exit;
|
||||
return $this->write($taskData);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
@ -12,10 +12,8 @@
|
||||
// Delete all records for a user
|
||||
if((int)$GLOBALS['hook_values']['account_id'] > 0)
|
||||
{
|
||||
require_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php');
|
||||
|
||||
$grants = array();
|
||||
$info =& new soinfolog($grants);
|
||||
$info =& new infolog_so($grants);
|
||||
|
||||
$info->change_delete_owner((int)$GLOBALS['hook_values']['account_id'],(int)$_POST['new_owner']);
|
||||
|
||||
|
@ -19,7 +19,7 @@ if (($showevents = $GLOBALS['egw_info']['user']['preferences']['infolog']['homeS
|
||||
$app_id = $GLOBALS['egw']->applications->name2id('infolog');
|
||||
$GLOBALS['portal_order'][] = $app_id;
|
||||
|
||||
$infolog =& CreateObject('infolog.uiinfolog');
|
||||
$infolog =& infolog_ui();
|
||||
$infolog->called_by = 'home';
|
||||
|
||||
if (in_array($showevents,array('1','2'))) $showevents = 'own-open-today';
|
||||
|
@ -1,231 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InfoLog - Preferences
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/* Setup some values to fill the array of this app's settings below */
|
||||
$ui =& CreateObject('infolog.uiinfolog'); // need some labels from
|
||||
$filters = $show_home = array();
|
||||
$show_home[] = lang("DON'T show InfoLog");
|
||||
foreach($ui->filters as $key => $label)
|
||||
{
|
||||
$show_home[$key] = $filters[$key] = lang($label);
|
||||
}
|
||||
|
||||
// migrage old filter-pref 1,2 to the filter one 'own-open-today'
|
||||
if (isset($GLOBALS['type']) && in_array($GLOBALS['egw']->preferences->{$GLOBALS['type']}['homeShowEvents'],array('1','2')))
|
||||
{
|
||||
$GLOBALS['egw']->preferences->add('infolog','homeShowEvents','own-open-today',$GLOBALS['type']);
|
||||
$GLOBALS['egw']->preferences->save_repository();
|
||||
}
|
||||
$show_links = array(
|
||||
'all' => lang('all links and attachments'),
|
||||
'links' => lang('only the links'),
|
||||
'attach' => lang('only the attachments'),
|
||||
'none' => lang('no links or attachments'),
|
||||
'no_describtion' => lang('no describtion, links or attachments'),
|
||||
);
|
||||
$show_details = array(
|
||||
0 => lang('No'),
|
||||
1 => lang('Yes'),
|
||||
2 => lang('Only for details'),
|
||||
);
|
||||
/**
|
||||
* Return InoLog Categories (used for setting )
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function all_cats()
|
||||
{
|
||||
$categories = new categories('','infolog');
|
||||
|
||||
foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat)
|
||||
{
|
||||
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
|
||||
|
||||
if ($cat['app_name'] == 'phpgw' || $cat['owner'] == '-1')
|
||||
{
|
||||
$s .= ' ♦';
|
||||
}
|
||||
$sel_options[$cat['id']] = $s; // 0.9.14 only
|
||||
}
|
||||
return $sel_options;
|
||||
}
|
||||
|
||||
/* Settings array for this app */
|
||||
$GLOBALS['settings'] = array(
|
||||
'defaultFilter' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Default Filter for InfoLog',
|
||||
'name' => 'defaultFilter',
|
||||
'values' => $filters,
|
||||
'help' => 'This is the filter InfoLog uses when you enter the application. Filters limit the entries to show in the actual view. There are filters to show only finished, still open or futures entries of yourself or all users.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'homeShowEvents' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'InfoLog filter for the main screen',
|
||||
'name' => 'homeShowEvents',
|
||||
'values' => $show_home,
|
||||
'help' => 'Should InfoLog show up on the main screen and with which filter. Works only if you dont selected an application for the main screen (in your preferences).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'listNoSubs' => array(
|
||||
'type' => 'check',
|
||||
'label' => 'List no Subs/Childs',
|
||||
'name' => 'listNoSubs',
|
||||
'help' => 'Should InfoLog show Subtasks, -calls or -notes in the normal view or not. You can always view the Subs via there parent.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_links' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show in the InfoLog list',
|
||||
'name' => 'show_links',
|
||||
'values' => $show_links,
|
||||
'help' => 'Should InfoLog show the links to other applications and/or the file-attachments in the InfoLog list (normal view when you enter InfoLog).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'never_hide' => array(
|
||||
'type' => 'check',
|
||||
'label' => 'Never hide search and filters',
|
||||
'name' => 'never_hide',
|
||||
'help' => 'If not set, the line with search and filters is hidden for less entries then "max matches per page" (as defined in your common preferences).',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_percent' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show status and percent done separate',
|
||||
'name' => 'show_percent',
|
||||
'values' => $show_details,
|
||||
'help' => 'Should the Infolog list show the percent done only for status ongoing or two separate icons.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'show_id' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Show ticket Id',
|
||||
'name' => 'show_id',
|
||||
'values' => $show_details,
|
||||
'help' => 'Should the Infolog list show a unique numerical Id, which can be used eg. as ticket Id.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'set_start' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Startdate for new entries',
|
||||
'name' => 'set_start',
|
||||
'values' => array(
|
||||
'date' => lang('todays date'),
|
||||
'datetime' => lang('actual date and time'),
|
||||
'empty' => lang('leave it empty'),
|
||||
),
|
||||
'help' => 'To what should the startdate of new entries be set.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'cal_show' => array(
|
||||
'type' => 'multiselect',
|
||||
'label' => 'Which types should the calendar show',
|
||||
'name' => 'cal_show',
|
||||
'values' => $ui->bo->enums['type'],
|
||||
'help' => 'Can be used to show further InfoLog types in the calendar or limit it to show eg. only tasks.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
'cat_add_default' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Default categorie for new Infolog entries',
|
||||
'name' => 'cat_add_default',
|
||||
'values' => all_cats(),
|
||||
'help' => 'You can choose a categorie to be preselected, when you create a new Infolog entry',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False
|
||||
),
|
||||
|
||||
);
|
||||
unset($ui);
|
||||
unset($show_home);
|
||||
unset($show_details);
|
||||
unset($filters);
|
||||
unset($show_links);
|
||||
|
||||
// notification preferences
|
||||
$GLOBALS['settings']['notify_creator'] = array(
|
||||
'type' => 'check',
|
||||
'label' => 'Receive notifications about own items',
|
||||
'name' => 'notify_creator',
|
||||
'help' => 'Do you want a notification, if items you created get updated?',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_assigned'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about items assigned to you',
|
||||
'name' => 'notify_assigned',
|
||||
'help' => 'Do you want a notification, if items get assigned to you or assigned items get updated?',
|
||||
'values' => array(
|
||||
'0' => lang('No'),
|
||||
'1' => lang('Yes'),
|
||||
'assignment' => lang('Only if I get assigned or removed'),
|
||||
),
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
|
||||
// to add options for more then 3 days back or in advance, you need to update soinfolog::users_with_open_entries()!
|
||||
$options = array(
|
||||
'0' => lang('No'),
|
||||
'-1d' => lang('one day after'),
|
||||
'0d' => lang('same day'),
|
||||
'1d' => lang('one day in advance'),
|
||||
'2d' => lang('%1 days in advance',2),
|
||||
'3d' => lang('%1 days in advance',3),
|
||||
);
|
||||
$GLOBALS['settings']['notify_due_delegated'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about due entries you delegated',
|
||||
'name' => 'notify_due_delegated',
|
||||
'help' => 'Do you want a notification, if items you delegated are due?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_due_responsible'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about due entries you are responsible for',
|
||||
'name' => 'notify_due_responsible',
|
||||
'help' => 'Do you want a notification, if items you are responsible for are due?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_start_delegated'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about starting entries you delegated',
|
||||
'name' => 'notify_start_delegated',
|
||||
'help' => 'Do you want a notification, if items you delegated are about to start?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$GLOBALS['settings']['notify_start_responsible'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Receive notifications about starting entries you are responsible for',
|
||||
'name' => 'notify_start_responsible',
|
||||
'help' => 'Do you want a notification, if items you are responsible for are about to start?',
|
||||
'values' => $options,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
|
@ -29,4 +29,4 @@ if ($setup_info['infolog']['version'] != $GLOBALS['egw_info']['apps']['infolog']
|
||||
}
|
||||
unset($setup_info);
|
||||
|
||||
ExecMethod('infolog.uiinfolog.index','reset_action_view');
|
||||
ExecMethod('infolog.infolog_ui.index','reset_action_view');
|
||||
|
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
$setup_info['infolog']['name'] = 'infolog';
|
||||
$setup_info['infolog']['version'] = '1.5.004';
|
||||
$setup_info['infolog']['version'] = '1.6';
|
||||
$setup_info['infolog']['app_order'] = 5;
|
||||
$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra');
|
||||
$setup_info['infolog']['enable'] = 1;
|
||||
@ -44,29 +44,28 @@ $setup_info['infolog']['note'] =
|
||||
<a href="http://www.egroupware.org/wiki/infolog" target="_blank">InfoLog page on our Website</a>.</p>';
|
||||
|
||||
/* The hooks this app includes, needed for hooks registration */
|
||||
$setup_info['infolog']['hooks']['preferences'] = 'infolog.infolog_prefs_sidebox_hooks.all_hooks';
|
||||
$setup_info['infolog']['hooks'][] = 'settings';
|
||||
$setup_info['infolog']['hooks']['verify_settings'] = 'infolog.infolog_prefs_sidebox_hooks.verify_settings';
|
||||
$setup_info['infolog']['hooks']['admin'] = 'infolog.infolog_prefs_sidebox_hooks.all_hooks';
|
||||
$setup_info['infolog']['hooks']['preferences'] = 'infolog_hooks::all_hooks';
|
||||
$setup_info['infolog']['hooks']['settings'] = 'infolog_hooks::settings';
|
||||
$setup_info['infolog']['hooks']['verify_settings'] = 'infolog_hooks::verify_settings';
|
||||
$setup_info['infolog']['hooks']['admin'] = 'infolog_hooks::all_hooks';
|
||||
$setup_info['infolog']['hooks'][] = 'deleteaccount';
|
||||
$setup_info['infolog']['hooks'][] = 'home';
|
||||
$setup_info['infolog']['hooks']['addressbook_view'] = 'infolog.uiinfolog.hook_view';
|
||||
$setup_info['infolog']['hooks']['projects_view'] = 'infolog.uiinfolog.hook_view';
|
||||
$setup_info['infolog']['hooks']['calendar_view'] = 'infolog.uiinfolog.hook_view';
|
||||
$setup_info['infolog']['hooks']['infolog'] = 'infolog.uiinfolog.hook_view';
|
||||
$setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.boinfolog.cal_to_include';
|
||||
$setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.boinfolog.cal_to_include';
|
||||
$setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog.infolog_prefs_sidebox_hooks.all_hooks';
|
||||
$setup_info['infolog']['hooks']['search_link'] = 'infolog.boinfolog.search_link';
|
||||
$setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.boinfolog.pm_icons';
|
||||
$setup_info['infolog']['hooks']['addressbook_view'] = 'infolog.infolog_ui.hook_view';
|
||||
$setup_info['infolog']['hooks']['projects_view'] = 'infolog.infolog_ui.hook_view';
|
||||
$setup_info['infolog']['hooks']['calendar_view'] = 'infolog.infolog_ui.hook_view';
|
||||
$setup_info['infolog']['hooks']['infolog'] = 'infolog.infolog_ui.hook_view';
|
||||
$setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.infolog_bo.cal_to_include';
|
||||
$setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.infolog_bo.cal_to_include';
|
||||
$setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog_hooks::all_hooks';
|
||||
$setup_info['infolog']['hooks']['search_link'] = 'infolog_hooks::search_link';
|
||||
$setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.infolog_bo.pm_icons';
|
||||
|
||||
/* Dependencies for this app to work */
|
||||
$setup_info['infolog']['depends'][] = array(
|
||||
'appname' => 'phpgwapi',
|
||||
'versions' => Array('1.3','1.4','1.5')
|
||||
'versions' => Array('1.5','1.6','1.7')
|
||||
);
|
||||
$setup_info['infolog']['depends'][] = array(
|
||||
'appname' => 'etemplate',
|
||||
'versions' => Array('1.3','1.4','1.5')
|
||||
'versions' => Array('1.5','1.6','1.7')
|
||||
);
|
||||
|
||||
|
@ -11,27 +11,23 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$test[] = '0.9.11';
|
||||
function infolog_upgrade0_9_11()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameColumn('phpgw_infolog','info_datecreated','info_datemodified');
|
||||
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_infolog','info_event_id',array(
|
||||
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_datecreated','info_datemodified');
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_event_id',array(
|
||||
'type' => 'int',
|
||||
'precision' => '4',
|
||||
'default' => '0',
|
||||
'nullable' => False
|
||||
));
|
||||
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.001';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.001';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.001';
|
||||
function infolog_upgrade0_9_15_001()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_links',array(
|
||||
$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_links',array(
|
||||
'fd' => array(
|
||||
'link_id' => array('type' => 'auto','nullable' => False),
|
||||
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||
@ -48,28 +44,25 @@
|
||||
'uc' => array()
|
||||
));
|
||||
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.002';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.002';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.002';
|
||||
function infolog_upgrade0_9_15_002()
|
||||
{
|
||||
//echo "<p>infolog_upgrade0_9_15_002</p>\n";
|
||||
$insert = 'INSERT INTO phpgw_links (link_app1,link_id1,link_app2,link_id2,link_remark,link_lastmod,link_owner) ';
|
||||
$select = "SELECT 'infolog',info_id,'addressbook',info_addr_id,info_from,info_datemodified,info_owner FROM phpgw_infolog WHERE info_addr_id != 0";
|
||||
//echo "<p>copying address-links: $insert.$select</p>\n";
|
||||
$GLOBALS['phpgw_setup']->oProc->query($insert.$select);
|
||||
$GLOBALS['egw_setup']->oProc->query($insert.$select);
|
||||
$select = "SELECT 'infolog',info_id,'projects',info_proj_id,'',info_datemodified,info_owner FROM phpgw_infolog WHERE info_proj_id != 0";
|
||||
//echo "<p>copying projects-links: $insert.$select</p>\n";
|
||||
$GLOBALS['phpgw_setup']->oProc->query($insert.$select);
|
||||
$GLOBALS['egw_setup']->oProc->query($insert.$select);
|
||||
$select = "SELECT 'infolog',info_id,'calendar',info_event_id,'',info_datemodified,info_owner FROM phpgw_infolog WHERE info_event_id != 0";
|
||||
//echo "<p>copying calendar-links: $insert.$select</p>\n";
|
||||
$GLOBALS['phpgw_setup']->oProc->query($insert.$select);
|
||||
$GLOBALS['egw_setup']->oProc->query($insert.$select);
|
||||
|
||||
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'auto','nullable' => False),
|
||||
'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
|
||||
@ -98,7 +91,7 @@
|
||||
'ix' => array(),
|
||||
'uc' => array()
|
||||
),'info_addr_id');
|
||||
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'auto','nullable' => False),
|
||||
'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
|
||||
@ -126,7 +119,7 @@
|
||||
'ix' => array(),
|
||||
'uc' => array()
|
||||
),'info_proj_id');
|
||||
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'auto','nullable' => False),
|
||||
'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
|
||||
@ -154,46 +147,43 @@
|
||||
'uc' => array()
|
||||
),'info_event_id');
|
||||
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.003';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.003';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.003';
|
||||
function infolog_upgrade0_9_15_003()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '10',
|
||||
'nullable' => False,
|
||||
'default' => 'task'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_pri',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_pri',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '10',
|
||||
'nullable' => True,
|
||||
'default' => 'normal'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '10',
|
||||
'nullable' => True,
|
||||
'default' => 'done'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_confirm',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_confirm',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '10',
|
||||
'nullable' => True,
|
||||
'default' => 'not'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_infolog','info_modifier',array(
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_modifier',array(
|
||||
'type' => 'int',
|
||||
'precision' => '4',
|
||||
'nullable' => False,
|
||||
'default' => '0'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_infolog','info_link_id',array(
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_link_id',array(
|
||||
'type' => 'int',
|
||||
'precision' => '4',
|
||||
'nullable' => False,
|
||||
@ -201,49 +191,46 @@
|
||||
));
|
||||
|
||||
// ORDER BY link_app2 DESC gives addressbook the highes precedens, use ASC for projects
|
||||
$GLOBALS['phpgw_setup']->oProc->query("SELECT link_id,link_id1 FROM phpgw_links WHERE link_app1='infolog' ORDER BY link_app2 DESC");
|
||||
$GLOBALS['egw_setup']->oProc->query("SELECT link_id,link_id1 FROM phpgw_links WHERE link_app1='infolog' ORDER BY link_app2 DESC");
|
||||
$links = array();
|
||||
while ($GLOBALS['phpgw_setup']->oProc->next_record())
|
||||
while ($GLOBALS['egw_setup']->oProc->next_record())
|
||||
{
|
||||
$links[$GLOBALS['phpgw_setup']->oProc->f(1)] = $GLOBALS['phpgw_setup']->oProc->f(0);
|
||||
$links[$GLOBALS['egw_setup']->oProc->f(1)] = $GLOBALS['egw_setup']->oProc->f(0);
|
||||
}
|
||||
reset($links);
|
||||
while (list($info_id,$link_id) = each($links))
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->query("UPDATE phpgw_infolog SET info_link_id=$link_id WHERE info_id=$info_id");
|
||||
$GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_link_id=$link_id WHERE info_id=$info_id");
|
||||
}
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.004';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.004';
|
||||
}
|
||||
|
||||
$test[] = '0.9.15.004';
|
||||
|
||||
function infolog_upgrade0_9_15_004()
|
||||
{
|
||||
// this update correctes wrong escapes of ' and " in the past
|
||||
//
|
||||
$db2 = $GLOBALS['phpgw_setup']->db; // we need a 2. result-set
|
||||
$db2 = $GLOBALS['egw_setup']->db; // we need a 2. result-set
|
||||
|
||||
$to_correct = array('info_from','info_subject','info_des');
|
||||
foreach ($to_correct as $col)
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->query("SELECT info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'");
|
||||
while ($GLOBALS['phpgw_setup']->oProc->next_record())
|
||||
$GLOBALS['egw_setup']->oProc->query("SELECT info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'");
|
||||
while ($GLOBALS['egw_setup']->oProc->next_record())
|
||||
{
|
||||
$db2->query("UPDATE phpgw_infolog SET $col='".$db2->db_addslashes(stripslashes($GLOBALS['phpgw_setup']->oProc->f($col))).
|
||||
"' WHERE info_id=".$GLOBALS['phpgw_setup']->oProc->f('info_id'));
|
||||
$db2->query("UPDATE phpgw_infolog SET $col='".$db2->db_addslashes(stripslashes($GLOBALS['egw_setup']->oProc->f($col))).
|
||||
"' WHERE info_id=".$GLOBALS['egw_setup']->oProc->f('info_id'));
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.005';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.005';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.005';
|
||||
function infolog_upgrade0_9_15_005()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_infolog_extra',array(
|
||||
$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_infolog_extra',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
||||
'info_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False),
|
||||
@ -255,18 +242,14 @@
|
||||
'uc' => array()
|
||||
));
|
||||
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.006';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.006';
|
||||
}
|
||||
|
||||
|
||||
// the following series of updates add some indices, to speedup the selects
|
||||
|
||||
$test[] = '0.9.15.006';
|
||||
function infolog_upgrade0_9_15_006()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->RefreshTable('phpgw_links',array(
|
||||
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_links',array(
|
||||
'fd' => array(
|
||||
'link_id' => array('type' => 'auto','nullable' => False),
|
||||
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
||||
@ -283,15 +266,13 @@
|
||||
'uc' => array()
|
||||
));
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.007';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.007';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.007';
|
||||
function infolog_upgrade0_9_15_007()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->RefreshTable('phpgw_infolog',array(
|
||||
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_infolog',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'auto','nullable' => False),
|
||||
'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'),
|
||||
@ -322,74 +303,68 @@
|
||||
));
|
||||
|
||||
// we dont need to do update 0.9.15.008, as UpdateSequenze is called now by RefreshTable
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.15.008';
|
||||
function infolog_upgrade0_9_15_008()
|
||||
{
|
||||
// update the sequenzes for refreshed tables (postgres only)
|
||||
$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_infolog','info_id');
|
||||
$GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_links','link_id');
|
||||
$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_infolog','info_id');
|
||||
$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_links','link_id');
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.0.0';
|
||||
function infolog_upgrade1_0_0()
|
||||
{
|
||||
// longer columns to cope with multibyte charsets
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '40',
|
||||
'nullable' => False,
|
||||
'default' => 'task'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_from',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_from',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '255'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_addr',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_addr',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '255'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_subject',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_subject',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '255'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '40',
|
||||
'default' => 'done'
|
||||
));
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0.001';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0.001';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.0.0.001';
|
||||
function infolog_upgrade1_0_0_001()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameColumn('phpgw_infolog','info_time','info_planned_time');
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameColumn('phpgw_infolog','info_bill_cat','info_used_time');
|
||||
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_time','info_planned_time');
|
||||
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_bill_cat','info_used_time');
|
||||
// timestamps have to be 8byte ints
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_datemodified',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_datemodified',array(
|
||||
'type' => 'int',
|
||||
'precision' => '8',
|
||||
'nullable' => False
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_startdate',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_startdate',array(
|
||||
'type' => 'int',
|
||||
'precision' => '8',
|
||||
'nullable' => False,
|
||||
'default' => '0'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_infolog','info_enddate',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_enddate',array(
|
||||
'type' => 'int',
|
||||
'precision' => '8',
|
||||
'nullable' => False,
|
||||
@ -397,14 +372,14 @@
|
||||
));
|
||||
|
||||
// setting numerical priority 3=urgent, 2=high, 1=normal, 0=
|
||||
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_infolog','info_priority',array(
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_priority',array(
|
||||
'type' => 'int',
|
||||
'precision' => '2',
|
||||
'default' => '1'
|
||||
));
|
||||
$GLOBALS['phpgw_setup']->oProc->query("UPDATE phpgw_infolog SET info_priority=(CASE WHEN info_pri='urgent' THEN 3 WHEN info_pri='high' THEN 2 WHEN info_pri='low' THEN 0 ELSE 1 END)",__LINE__,__FILE__);
|
||||
$GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_priority=(CASE WHEN info_pri='urgent' THEN 3 WHEN info_pri='high' THEN 2 WHEN info_pri='low' THEN 0 ELSE 1 END)",__LINE__,__FILE__);
|
||||
|
||||
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
|
||||
'fd' => array(
|
||||
'info_id' => array('type' => 'auto','nullable' => False),
|
||||
'info_type' => array('type' => 'varchar','precision' => '40','nullable' => False,'default' => 'task'),
|
||||
@ -434,42 +409,37 @@
|
||||
'uc' => array()
|
||||
),'info_pri');
|
||||
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog');
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra');
|
||||
$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog');
|
||||
$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra');
|
||||
// only rename links table, if it has not been moved into the API and therefor been already renamed by the API update
|
||||
if ($GLOBALS['phpgw_setup']->oProc->GetTableDefinition('phpgw_links'))
|
||||
if ($GLOBALS['egw_setup']->oProc->GetTableDefinition('phpgw_links'))
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_links','egw_links');
|
||||
$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_links','egw_links');
|
||||
}
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.0.1.001';
|
||||
function infolog_upgrade1_0_1_001()
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->oProc->AlterColumn('egw_infolog','info_responsible',array(
|
||||
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_responsible',array(
|
||||
'type' => 'varchar',
|
||||
'precision' => '255',
|
||||
'nullable' => False,
|
||||
'default' => '0'
|
||||
));
|
||||
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.002';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.002';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.0.1.002';
|
||||
function infolog_upgrade1_0_1_002()
|
||||
{
|
||||
$GLOBALS['setup_info']['infolog']['currentver'] = '1.2';
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'];
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.2';
|
||||
function infolog_upgrade1_2()
|
||||
{
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','pl_id',array(
|
||||
@ -486,7 +456,6 @@
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.2.001';
|
||||
function infolog_upgrade1_2_001()
|
||||
{
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_percent',array(
|
||||
@ -527,7 +496,6 @@
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.2.002';
|
||||
function infolog_upgrade1_2_002()
|
||||
{
|
||||
// change the phone-status: call --> not-started, will-call --> ongoing to be able to sync them
|
||||
@ -548,7 +516,6 @@
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.2.003';
|
||||
function infolog_upgrade1_2_003()
|
||||
{
|
||||
// fix wrong info_responsible='' --> '0'
|
||||
@ -557,7 +524,7 @@
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.004';
|
||||
}
|
||||
|
||||
$test[] = '1.2.004';
|
||||
|
||||
function infolog_upgrade1_2_004()
|
||||
{
|
||||
// column to save if from contains a custom text
|
||||
@ -569,13 +536,13 @@
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.3.001';
|
||||
}
|
||||
|
||||
$test[] = '1.3.001';
|
||||
|
||||
function infolog_upgrade1_3_001()
|
||||
{
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.4';
|
||||
}
|
||||
|
||||
$test[] = '1.4';
|
||||
|
||||
function infolog_upgrade1_4()
|
||||
{
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_uid',array(
|
||||
@ -589,7 +556,7 @@
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.001';
|
||||
}
|
||||
|
||||
$test[] = '1.5.001';
|
||||
|
||||
/**
|
||||
* Fix missing info_from values, caused by a (fixed) bug
|
||||
*
|
||||
@ -612,7 +579,7 @@
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.002';
|
||||
}
|
||||
|
||||
$test[] = '1.5.002';
|
||||
|
||||
/**
|
||||
* make customfield names varchar(64) and values text
|
||||
*
|
||||
@ -633,7 +600,7 @@
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.003';
|
||||
}
|
||||
|
||||
$test[] = '1.5.003';
|
||||
|
||||
/**
|
||||
* Add re-planned time column
|
||||
*
|
||||
@ -650,3 +617,14 @@
|
||||
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.004';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1.6 release
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function infolog_upgrade1_5_004()
|
||||
{
|
||||
return $GLOBALS['setup_info']['infolog']['currentver'] = '1.6';
|
||||
}
|
||||
|
@ -1,96 +1,145 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="infolog.index.rows-noheader" template="" lang="" group="0" version="1.0.1.002">
|
||||
<template id="infolog.index.rows-noheader" template="" lang="" group="0" version="1.5.004">
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="5%"/>
|
||||
<column width="2%"/>
|
||||
<column/>
|
||||
<column width="8%"/>
|
||||
<column width="8%"/>
|
||||
<column width="12%"/>
|
||||
<column disabled="@no_customfields"/>
|
||||
<column width="120"/>
|
||||
<column disabled="@no_info_used_time_info_planned_time"/>
|
||||
<column width="8%" disabled="@no_info_onwer_info_responsible"/>
|
||||
<column width="12%" disabled="@no_info_datemodified"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<vbox>
|
||||
<vbox options="0,0">
|
||||
<description value="Type"/>
|
||||
<description value="Status"/>
|
||||
<description value="Status" align="center"/>
|
||||
<description value="Completed" align="right"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<vbox rows="2" cols="1" options="2">
|
||||
<description value="Subject"/>
|
||||
<description value="Description"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<vbox options="0,0">
|
||||
<description id="customfields" options="Custom fields"/>
|
||||
<grid spacing="0" padding="0">
|
||||
<columns>
|
||||
<column disabled="@no_customfields"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description no_lang="1" id="customfields[$row][label]" options="Custom fields"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</vbox>
|
||||
<vbox options="0,0">
|
||||
<description value="Startdate"/>
|
||||
<description value="Enddate"/>
|
||||
<description value="Date completed"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Times"/>
|
||||
<description class="planned" value="planned"/>
|
||||
<description class="replanned" value="Re-planned"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<description value="Owner"/>
|
||||
<description value="Responsible"/>
|
||||
</vbox>
|
||||
<description value="last changed"/>
|
||||
<description value="Sub"/>
|
||||
<description value="Action"/>
|
||||
<description value="Sub" class="noPrint"/>
|
||||
<description value="Action" class="noPrint"/>
|
||||
</row>
|
||||
<row class="row" valign="top">
|
||||
<hbox align="center" orient="2,2">
|
||||
<hbox options="5" align="center">
|
||||
<image label="$row_cont[info_type]" src="${row}[info_type]"/>
|
||||
<button image="$row_cont[info_status]" ro_image="$row_cont[info_status]" label="$row_cont[info_status]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
</hbox>
|
||||
<vbox orient="0,0">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]"/>
|
||||
<vbox options="0,0" class="fullWidth">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
|
||||
<hbox options="0,0">
|
||||
<description class="$row_cont[sub_class]" no_lang="1" id="${row}[info_subject]"/>
|
||||
<description no_lang="1" align="right" id="{$row}[info_number]" class="infoId"/>
|
||||
</hbox>
|
||||
<description options=",,1" no_lang="1" id="${row}[info_des]"/>
|
||||
<link-string id="${row}[filelinks]"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<date id="${row}[info_startdate]" readonly="true"/>
|
||||
<date class="$row_cont[end_class]" id="${row}[info_enddate]" readonly="true"/>
|
||||
<customfields-list class="customfields" id="$row" readonly="true"/>
|
||||
<vbox options="0,0,1" rows="3" cols="1">
|
||||
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="fixedHeight"/>
|
||||
<date class="$row_cont[end_class] fixedHeight" id="${row}[info_enddate]" readonly="true"/>
|
||||
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<vbox rows="3" cols="1">
|
||||
<hbox options="1,0" id="l_used_time">
|
||||
<image label="Times" src="timesheet"/>
|
||||
<date-duration id="${row}[info_used_time]" readonly="true" options="@duration_format"/>
|
||||
<date-duration id="${row}[info_sum_timesheets]" readonly="true" options="@duration_format" class="timesheet"/>
|
||||
</hbox>
|
||||
<hbox options="1,0" id="lplanified">
|
||||
<image label="planned time" src="k_alarm.png" readonly="true"/>
|
||||
<date-duration id="${row}[info_planned_time]" span="all" class="planned" readonly="true" options="@duration_format"/>
|
||||
</hbox>
|
||||
<hbox options="1,0" id="replanified">
|
||||
<image label="Re-planned time" src="agt_reload.png"/>
|
||||
<date-duration id="${row}[info_replanned_time]" span="all" class="replanned" readonly="true" options="@duration_format"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox options="0,0">
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_owner]" readonly="true"/>
|
||||
</menulist>
|
||||
<listbox type="select-account" id="${row}[info_responsible]" readonly="true" rows="5"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<vbox options="0" orient="0">
|
||||
<date-time id="${row}[info_datemodified]" readonly="true"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_modifier]" readonly="true"/>
|
||||
</menulist>
|
||||
</vbox>
|
||||
<vbox align="center" orient="0,0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<vbox options="0" align="center" class="noPrint" orient="0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="view.gif" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
|
||||
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&link_app[]=infolog&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
</vbox>
|
||||
<hbox>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<hbox class="noPrint">
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="infolog.index.rows" template="" lang="" group="0" version="1.0.1.003">
|
||||
<template id="infolog.index.rows" template="" lang="" group="0" version="1.5.004">
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="2%"/>
|
||||
<column/>
|
||||
<column width="8%"/>
|
||||
<column width="8%"/>
|
||||
<column disabled="@no_customfields"/>
|
||||
<column/>
|
||||
<column width="120"/>
|
||||
<column/>
|
||||
<column width="8%" disabled="@no_info_owner_info_responsible"/>
|
||||
<column width="12%"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
<column width="3%" disabled="@no_actions"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<vbox orient="0,0">
|
||||
<nextmatch-filterheader options="Type ..." id="info_type"/>
|
||||
<nextmatch-filterheader options="Status ..." id="info_status"/>
|
||||
<vbox options="0,0">
|
||||
<nextmatch-filterheader options="Type" id="info_type" no_lang="1"/>
|
||||
<nextmatch-filterheader options="Status" id="info_status" align="center"/>
|
||||
<nextmatch-sortheader label="Completed" id="info_percent" align="right"/>
|
||||
</vbox>
|
||||
<grid width="100%" spacing="0" padding="0">
|
||||
<columns>
|
||||
@ -98,64 +147,102 @@
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description/>
|
||||
<nextmatch-sortheader label="Priority" align="right" id="info_priority" options="DESC" class="noPrint"/>
|
||||
</row>
|
||||
<row>
|
||||
<nextmatch-sortheader label="Subject" id="info_subject"/>
|
||||
<nextmatch-sortheader label="Priority" align="right" id="info_priority" options="DESC"/>
|
||||
<nextmatch-sortheader label="Creation" align="right" id="info_id" options="DESC" class="noPrint"/>
|
||||
</row>
|
||||
<row>
|
||||
<nextmatch-sortheader label="Description" id="info_des"/>
|
||||
<nextmatch-sortheader label="Creation" align="right" id="info_id" options="DESC"/>
|
||||
<nextmatch-sortheader label="last changed" id="info_datemodified" options="DESC" class="noPrint" align="right"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<vbox>
|
||||
<nextmatch-customfields id="customfields"/>
|
||||
<nextmatch-header label="Category" id="cat_id"/>
|
||||
<vbox options="0,0">
|
||||
<nextmatch-sortheader label="Startdate" id="info_startdate"/>
|
||||
<nextmatch-sortheader label="Enddate" id="info_enddate"/>
|
||||
<nextmatch-sortheader id="info_datecompleted" label="Date completed"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<nextmatch-accountfilter id="info_owner" options="Owner" statustext="Select to filter by owner"/>
|
||||
<nextmatch-accountfilter id="info_responsible" options="Responsible" statustext="Select to filter by responsible"/>
|
||||
<vbox rows="2" cols="1" options="2">
|
||||
<nextmatch-sortheader label="Times" id="info_used_time"/>
|
||||
<nextmatch-sortheader id="info_planned_time" class="planned" label="planned"/>
|
||||
<nextmatch-sortheader id="info_replanned_time" class="replanned" label="Re-planned"/>
|
||||
</vbox>
|
||||
<vbox options="0,0">
|
||||
<nextmatch-accountfilter id="info_owner" options="Owner" statustext="Select to filter by owner" class="user_filter"/>
|
||||
<nextmatch-accountfilter id="info_responsible" options="Responsible,both" statustext="Select to filter by responsible" class="user_filter"/>
|
||||
</vbox>
|
||||
<nextmatch-sortheader label="last changed" id="info_datemodified" options="DESC"/>
|
||||
<description value="Sub"/>
|
||||
<description value="Action"/>
|
||||
<description value="Sub" class="noPrint"/>
|
||||
<description value="Action" class="noPrint"/>
|
||||
</row>
|
||||
<row class="row" valign="top">
|
||||
<hbox align="center" orient=",5">
|
||||
<hbox options="5" align="center">
|
||||
<image label="$row_cont[info_type]" src="${row}[info_type]"/>
|
||||
<button image="$row_cont[info_status]" ro_image="$row_cont[info_status]" label="$row_cont[info_status]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
</hbox>
|
||||
<vbox orient="0,0">
|
||||
<vbox options="0,0" class="fullWidth">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
|
||||
<hbox options="0,0">
|
||||
<description class="$row_cont[sub_class]" no_lang="1" id="${row}[info_subject]"/>
|
||||
<description options=",,1" no_lang="1" id="${row}[info_des]"/>
|
||||
<description no_lang="1" align="right" id="{$row}[info_number]" class="infoId"/>
|
||||
</hbox>
|
||||
<description no_lang="1" id="${row}[info_des]" options=",,1"/>
|
||||
<link-string id="${row}[filelinks]"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<date-time options=",8" id="${row}[info_startdate]" readonly="true"/>
|
||||
<date class="$row_cont[end_class]" id="${row}[info_enddate]" readonly="true"/>
|
||||
<customfields-list class="customfields" id="$row"/>
|
||||
<menulist>
|
||||
<menupopup type="select-cat" id="${row}[info_cat]" readonly="true"/>
|
||||
</menulist>
|
||||
<vbox options="0,0,1" rows="3" cols="1">
|
||||
<date-time options=",8" id="${row}[info_startdate]" readonly="true" class="fixedHeight"/>
|
||||
<date class="$row_cont[end_class] fixedHeight" id="${row}[info_enddate]" readonly="true"/>
|
||||
<date-time id="${row}[info_datecompleted]" readonly="true" class="fixedHeight"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<vbox rows="3" cols="1">
|
||||
<hbox options="1,0" id="r_used_time">
|
||||
<image label="Times" src="timesheet"/>
|
||||
<date-duration id="${row}[info_used_time]" readonly="true" options="@duration_format"/>
|
||||
<date-duration id="${row}[info_sum_timesheets]" readonly="true" options="@duration_format" class="timesheet"/>
|
||||
</hbox>
|
||||
<hbox options="1,0" id="planified">
|
||||
<image label="planned time" src="k_alarm.png" readonly="true"/>
|
||||
<date-duration id="${row}[info_planned_time]" span="all" class="planned" readonly="true" options="@duration_format"/>
|
||||
</hbox>
|
||||
<hbox options="1,0" id="replanified">
|
||||
<image label="Re-planned time" src="agt_reload.png"/>
|
||||
<date-duration id="${row}[info_replanned_time]" span="all" class="replanned" readonly="true" options="@duration_format"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox options="0,0">
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_owner]" readonly="true"/>
|
||||
</menulist>
|
||||
<listbox type="select-account" id="${row}[info_responsible]" readonly="true" rows="5"/>
|
||||
</vbox>
|
||||
<vbox orient="0,0">
|
||||
<vbox options="0" orient="0">
|
||||
<date-time id="${row}[info_datemodified]" readonly="true"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[info_modifier]" readonly="true"/>
|
||||
</menulist>
|
||||
</vbox>
|
||||
<vbox align="center" orient="0,0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<vbox options="0" align="center" class="noPrint" orient="0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="view.gif" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
|
||||
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&link_app[]=infolog&cat_id=$row_cont[info_cat]&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
</vbox>
|
||||
<hbox>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=550,scrollbars=yes,status=yes'); return false;"/>
|
||||
<hbox class="noPrint">
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done.gif" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry to done"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
|
@ -5,12 +5,12 @@
|
||||
<description class="headertext bold" value="InfoLog"/>
|
||||
<styles>.bold { font-weight: bold; }</styles>
|
||||
</template>
|
||||
<template id="infolog.index.header_right" template="" lang="" group="0" version="1.4.001">
|
||||
<template id="infolog.index.header_right" template="" lang="" group="0" version="1.5.001">
|
||||
<hbox>
|
||||
<description class="headertext" value="Add:"/>
|
||||
<button image="task" label="ToDo" id="add[task]" statustext="Add a new ToDo" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&type=task&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="phone" label="Phonecall" id="add[phone]" statustext="Add a new Phonecall" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&type=phone&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]}'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="note" label="Note" id="add[note]" statustext="Add a new Note" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&type=note&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="task" label="ToDo" id="add[task]" statustext="Add a new ToDo" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&type=task&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="phone" label="Phonecall" id="add[phone]" statustext="Add a new Phonecall" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&type=phone&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]}'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="note" label="Note" id="add[note]" statustext="Add a new Note" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&type=note&action=$cont[action]&action_id=$cont[action_id]&cat_id=$cont[cat_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
</hbox>
|
||||
</template>
|
||||
<template id="infolog.index.rows-noheader" template="" lang="" group="0" version="1.5.004">
|
||||
@ -71,9 +71,9 @@
|
||||
<row class="row" valign="top">
|
||||
<hbox options="5" align="center">
|
||||
<image label="$row_cont[info_type]" src="${row}[info_type]"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
</hbox>
|
||||
<vbox options="0,0" class="fullWidth">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
|
||||
@ -118,13 +118,13 @@
|
||||
</menulist>
|
||||
</vbox>
|
||||
<vbox options="0" align="center" class="noPrint" orient="0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="view.gif" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
|
||||
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.edit&link_app[]=infolog&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&link_app[]=infolog&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
</vbox>
|
||||
<hbox class="noPrint">
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
@ -196,9 +196,9 @@
|
||||
<row class="row" valign="top">
|
||||
<hbox options="5" align="center">
|
||||
<image label="$row_cont[info_type]" src="${row}[info_type]"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_status_label]" ro_image="$row_cont[info_status_label]" label="$row_cont[info_status_label]" id="edit_status[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="$row_cont[info_percent]" label="$row_cont[info_percent]" id="edit_percent[$row_cont[info_id]]" statustext="Change the status of an entry, eg. close it" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<image label="$row_cont[info_percent2]" src="{$row}[info_percent2]" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
</hbox>
|
||||
<vbox options="0,0" class="fullWidth">
|
||||
<link label="%s $row_cont[info_addr]" id="${row}[info_link]" options="b"/>
|
||||
@ -246,13 +246,13 @@
|
||||
</menulist>
|
||||
</vbox>
|
||||
<vbox options="0" align="center" class="noPrint" orient="0">
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="new" label="Add sub" align="center" id="sp[$row_cont[info_id]]" statustext="Add a new sub-task, -note, -call to this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&action=sp&action_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="view.gif" label="View subs" align="center" id="view[$row_cont[info_id]]" statustext="View all subs of this entry"/>
|
||||
<button image="parent.gif" label="View parent" align="center" id="view[$row_cont[info_id_parent]]" statustext="View the parent of this entry and all his subs"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.edit&link_app[]=infolog&cat_id=$row_cont[info_cat]&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
<button image="timesheet" label="Add timesheet entry" id="timesheet[$row_cont[info_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&link_app[]=infolog&cat_id=$row_cont[info_cat]&link_id[]=$row_cont[info_id]$row_cont[extra_links]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" align="center"/>
|
||||
</vbox>
|
||||
<hbox class="noPrint">
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[info_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&info_id=$row_cont[info_id]'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="delete" label="Delete" id="delete[$row_cont[info_id]]" statustext="Delete this entry" onclick="return $row_cont[info_anz_subs] || confirm('Delete this entry');"/>
|
||||
<button image="done" label="Close" id="close[$row_cont[info_id]]" statustext="Sets the status of this entry and its subs to done"/>
|
||||
</hbox>
|
||||
@ -286,7 +286,7 @@
|
||||
</row>
|
||||
<row class="noPrint">
|
||||
<hbox span="all">
|
||||
<button label="Add" id="add[note]" statustext="Add a new Entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.uiinfolog.edit&type=note&action=$cont[action]&action_id=$cont[action_id]&cat_id={$cont[nm][cat_id]}'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button label="Add" id="add[note]" statustext="Add a new Entry" onclick="window.open(egw::link('/index.php','menuaction=infolog.infolog_ui.edit&type=note&action=$cont[action]&action_id=$cont[action_id]&cat_id={$cont[nm][cat_id]}'),'_blank','dependent=yes,width=750,height=600,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button label="Cancel" id="cancel" statustext="Back to main list"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
Loading…
Reference in New Issue
Block a user