diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index b07c653248..87db73b3fc 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -265,7 +265,7 @@ class calendar_hooks $export_tzs += egw_time::getTimezones(); } - return array( + $settings = array( 'days_in_weekview' => array( 'type' => 'select', 'label' => 'default week view', @@ -580,6 +580,38 @@ class calendar_hooks 'default'=> '0', ), ); + + // Merge print + if ($GLOBALS['egw_info']['user']['apps']['filemanager']) + { + $link = egw::link('/index.php','menuaction=calendar.calendar_merge.show_replacements'); + + $settings['default_document'] = array( + 'type' => 'input', + 'size' => 60, + 'label' => 'Default document to insert entries', + 'name' => 'default_document', + 'help' => lang('If you specify a document (full vfs path) here, infolog displays an extra document icon for each entry. That icon allows to download the specified document with the contact data inserted.').' '. + lang('The document can contain placeholder like $$info_subject$$, to be replaced with the contact data (%1full list of placeholder names%2).','','').' '. + lang('At the moment the following document-types are supported:').'*.rtf, *.txt', + 'run_lang' => false, + 'xmlrpc' => True, + 'admin' => False, + ); + $settings['document_dir'] = array( + 'type' => 'input', + 'size' => 60, + 'label' => 'Directory with documents to insert entries', + 'name' => 'document_dir', + 'help' => lang('If you specify a directory (full vfs path) here, infolog displays an action for each document. That action allows to download the specified document with the infolog data inserted.').' '. + lang('The document can contain placeholder like $$info_subject$$, to be replaced with the contact data (%1full list of placeholder names%2).','','').' '. + lang('At the moment the following document-types are supported:').'*.rtf, *.txt', + 'run_lang' => false, + 'xmlrpc' => True, + 'admin' => False, + ); + } + return $settings; } public static function config_validate() { diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php new file mode 100644 index 0000000000..c0f64e4f88 --- /dev/null +++ b/calendar/inc/class.calendar_merge.inc.php @@ -0,0 +1,357 @@ + + * @author Nathan Gray + * @package calendar + * @copyright (c) 2007-9 by Ralf Becker + * @copyright 2011 Nathan Gray + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ + +/** + * Calendar - document merge object + */ +class calendar_merge extends bo_merge +{ + /** + * Functions that can be called via menuaction + * + * @var array + */ + var $public_functions = array( + 'show_replacements' => true, + ); + + // Object for getting calendar info + protected $bo; + + // Object used for getting resource info + protected static $resources; + + /** + * Constructor + */ + function __construct() + { + parent::__construct(); + + $this->bo = new calendar_boupdate(); + + // Register table plugins + $this->table_plugins['participant'] = 'participant'; + for($i = 0; $i < 7; $i++) + { + $this->table_plugins[date('l', strtotime("+$i days"))] = 'day_plugin'; + } + } + + /** + * Get replacements + * + * @param int|array $id event-id array with id,recur_date, or array with search parameters + * @param string &$content=null content to create some replacements only if they are used + * @return array|boolean + */ + protected function get_replacements($id,&$content=null) + { + $prefix = ''; + + // List events ? + if(is_array($id) && !$id['id'] && strpos($content,'$$calendar') !== false) + { + $events = $this->bo->search($id + array( + 'offset' => 0, + 'order' => 'cal_start', + )); + array_unshift($events,false); unset($events[0]); // renumber the array to start with key 1, instead of 0 + $prefix = 'calendar/%d/'; + } + else + { + $events = array($id); + } + $replacements = array(); + foreach($events as $n => $event) + { + $values = $this->calendar_replacements($event,sprintf($prefix,$n)); + $replacements += $values; + } + return $replacements; + } + + /** + * Return replacements for the calendar + * + * @param int|array $id event-id or array with id/recur_date, or array with event info + * @param boolean $last_event_too=false also include information about the last event + * @return array + */ + protected function calendar_replacements($id,$prefix = '') + { + $replacements = array(); + if(!is_array($id) || !$id['start']) { + $event = $this->bo->read(is_array($id) ? $id['id'] : $id, is_array($id) ? $id['recur_date'] : null); + } else { + $event = $id; + } + foreach($this->bo->event2array($event) as $name => $data) + { + if (substr($name,-4) == 'date') $name = substr($name,0,-4); + $replacements['$$' . ($prefix ? $prefix . '/' : '') . $name . '$$'] = is_array($data['data']) ? implode(', ',$data['data']) : $data['data']; + } + foreach(array('start','end') as $what) + { + foreach(array( + 'date' => $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'], + 'day' => 'l', + 'time' => $GLOBALS['egw_info']['user']['preferences']['common']['timeformat'] == 12 ? 'h:i a' : 'H:i', + ) as $name => $format) + { + $value = date($format,$event[$what]); + if ($format == 'l') $value = lang($value); + $replacements['$$' .($prefix ? $prefix.'/':'').$what.$name.'$$'] = $value; + } + } + $duration = ($event['end'] - $event['start'])/60; + $replacements['$$'.($prefix?$prefix.'/':'').'duration$$'] = floor($duration/60).lang('h').($duration%60 ? $duration%60 : ''); + + $custom = config::get_customfields('calendar'); + foreach($custom as $name => $field) + { + $replacements['$$'.($prefix?$prefix.'/':'').'#'.$name.'$$'] = $event['#'.$name]; + } + + return $replacements; + } + + /** + * Table plugin for event + * Lists events for a certain day of the week. Only works for one week at a time, so for multiple weeks, + * use multiple date ranges. + * + * Use: + * $$table/Monday$$ $$starttime$$ $$title$$ $$endtable$$ + * The day of the week may be language specific (date('l')). + * + * @param string $plugin (Monday-Sunday) + * @param int/array date or date range + * @param int $n + * @param string $repeat Text being repeated for each entry + * @return array + */ + public function day_plugin($plugin,$date,$n,$repeat) + { + static $days; + if(is_array($date) && !$date['start']) { + $event = $this->bo->read(is_array($date) ? $date['id'] : $date, is_array($date) ? $date['recur_date'] : null); + if(date('l',$event['start']) != $plugin) return array(); + $date = $event['start']; + } + + $_date = $date['start'] ? $date['start'] : $date; + + if($days[date('Ymd',$_date)][$plugin]) return $days[date('Ymd',$_date)][$plugin][$n]; + + $events = $this->bo->search(array( + 'start' => $date['end'] ? $date['start'] : mktime(0,0,0,date('m',$_date),date('d',$_date),date('Y',$_date)), + 'end' => $date['end'] ? $date['end'] : mktime(23,59,59,date('m',$_date),date('d',$_date),date('Y',$_date)), + 'offset' => 0, + 'num_rows' => 20, + 'order' => 'cal_start', + 'daywise' => true + )); + $replacements = array(); + foreach($events as $day => $list) + { + $i = 0; + foreach($list as $key => $event) + { + $days[date('Ymd',$_date)][date('l',$event['start'])][$i++] = $this->calendar_replacements($event); + } + } + return $days[date('Ymd',$_date)][$plugin][0]; + } + + /** + * Table plugin for participants + * + * Copied from eventmgr resources + * + * @param string $plugin + * @param int $id + * @param int $n + * @return array + */ + public function participant($plugin,$id,$n) + { + if(!is_array($id) || !$id['start']) { + $event = $this->bo->read(is_array($id) ? $id['id'] : $id, is_array($id) ? $id['recur_date'] : null); + } else { + $event = $id; + } + + if(!is_array($event['participants']) || $n >= count($event['participants'])) return array(); + + $participant = null; + $status = null; + $i = -1; + foreach($event['participants'] as $participant => $status) { + if(++$i == $n) break; + } + + if(!$participant) return array(); + + // Add some common information + calendar_so::split_status($status,$quantity,$role); + if ($role != 'REQ-PARTICIPANT') + { + if (isset($this->bo->roles[$role])) + { + $role = lang($this->bo->roles[$role]); + } + // allow to use cats as roles (beside regular iCal ones) + elseif (substr($role,0,6) == 'X-CAT-' && ($cat_id = (int)substr($role,6)) > 0) + { + $role = $GLOBALS['egw']->categories->id2name($cat_id); + } + else + { + $role = lang(str_replace('X-','',$role)); + } + } + $info = array( + 'name' => $this->bo->participant_name($participant), + 'status' => $this->bo->verbose_status[$status], + 'quantity' => $quantity, + 'role' => $role + ); + + switch ($participant[0]) + { + case 'c': + $replacements = $this->contact_replacements(substr($participant,1),''); + break; + case 'r': + if (is_null(self::$resources)) self::$resources = CreateObject('resources.bo_resources'); + if (($resource = self::$resources->read(substr($participant,1)))) + { + foreach($resource as $name => $value) + { + $replacements['$$'.$name.'$$'] = $value; + } + } + break; + default: + if (is_numeric($participant) && ($contact = $GLOBALS['egw']->accounts->id2name($participant,'person_id'))) + { + $replacements = $this->contact_replacements($contact,''); + } + break; + } + foreach($info as $name => $value) + { + $replacements['$$'.$name.'$$'] = $value; + } + return $replacements; + } + + /** + * Generate table with replacements for the preferences + * + */ + public function show_replacements() + { + $GLOBALS['egw']->translation->add_app('calendar'); + $GLOBALS['egw_info']['flags']['app_header'] = lang('calendar').' - '.lang('Replacements for inserting events into documents'); + $GLOBALS['egw_info']['flags']['nonavbar'] = false; + common::egw_header(); + + echo "\n"; + echo '"; + + foreach(array( + 'title' => lang('Title'), + 'description' => lang('Description'), + 'participants' => lang('Participants'), + 'location' => lang('Location'), + 'start' => lang('Start').': '.lang('Date').'+'.lang('Time'), + 'startday' => lang('Start').': '.lang('Weekday'), + 'startdate'=> lang('Start').': '.lang('Date'), + 'starttime'=> lang('Start').': '.lang('Time'), + 'end' => lang('End').': '.lang('Date').'+'.lang('Time'), + 'endday' => lang('End').': '.lang('Weekday'), + 'enddate' => lang('End').': '.lang('Date'), + 'endtime' => lang('End').': '.lang('Time'), + 'duration' => lang('Duration'), + 'category' => lang('Category'), + 'priority' => lang('Priority'), + 'updated' => lang('Updated'), + 'recur_type' => lang('Repetition'), + 'access' => lang('Access').': '.lang('public').', '.lang('private'), + 'owner' => lang('Owner'), + ) as $name => $label) + { + if (in_array($name,array('start','end')) && $n&1) // main values, which should be in the first column + { + echo "\n"; + $n++; + } + if (!($n&1)) echo ''; + echo ''; + if ($n&1) echo "\n"; + $n++; + } + + echo '"; + $custom = config::get_customfields('calendar'); + foreach($custom as $name => $field) + { + echo '\n"; + } + + echo '"; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo '"; + $days = array(); + for($i = 0; $i < 7; $i++) + { + $days[date('N',strtotime("+$i days"))] = date('l',strtotime("+$i days")); + } + ksort($days); + foreach($days as $day) + { + echo ''; + } + + echo '"; + foreach(array( + 'date' => lang('Date'), + 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), + 'user/account_lid' => lang('Username'), + 'pagerepeat' => lang('For serial letter use this tag. Put the content, you want to repeat between two Tags.'), + 'label' => lang('Use this tag for addresslabels. Put the content, you want to repeat, between two tags.'), + 'labelplacement' => lang('Tag to mark positions for address labels'), + 'IF fieldname' => lang('Example $$IF n_prefix~Mr~Hello Mr.~Hello Ms.$$ - search the field "n_prefix", for "Mr", if found, write Hello Mr., else write Hello Ms.'), + 'NELF' => lang('Example $$NELF role$$ - if field role is not empty, you will get a new line with the value of field role'), + 'NENVLF' => lang('Example $$NELFNV role$$ - if field role is not empty, set a LF without any value of the field'), + 'LETTERPREFIX' => lang('Example $$LETTERPREFIX$$ - Gives a letter prefix without double spaces, if the title is emty for example'), + 'LETTERPREFIXCUSTOM' => lang('Example $$LETTERPREFIXCUSTOM n_prefix title n_family$$ - Example: Mr Dr. James Miller'), + ) as $name => $label) + { + echo '\n"; + } + + echo "

'.lang('Calendar fields:')."

$$'.$name.'$$'.$label.'

'.lang('Custom fields').":

$$#'.$name.'$$'.$field['label']."

'.lang('Participant table').":

$$table/participant$$ ... $$endtable$$
$$name$$
$$role$$
$$quantity$$
$$status$$

'.lang('Day of week tables').":

$$table/'.$day. '$$ ... $$endtable$$

'.lang('General fields:')."

$$'.$name.'$$'.$label."
\n"; + + common::egw_footer(); + } +} diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index 2b201477b5..ff846a433c 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -111,6 +111,12 @@ class calendar_uilist extends calendar_ui $content['action'] = 'timesheet-add'; $content['nm']['rows']['checked'] = array($id); } + if (is_array($content) && isset($content['nm']['rows']['document'])) // handle insert in default document button like an action + { + list($id) = @each($content['nm']['rows']['document']); + $content['action'] = 'document'; + $content['nm']['rows']['checked'] = array($id); + } // Handle actions if ($content['action'] != '') @@ -187,6 +193,11 @@ class calendar_uilist extends calendar_ui if($key == 'G') continue; $sel_options['action'][lang('Change your participant status')]['status-'.$key] = $value; } + // Merge print + if ($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']) + { + $sel_options['action'][lang('Insert in document').':'] = calendar_merge::get_documents($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']); + } // add scrollbar to long describtion, if user choose so in his prefs if ($this->prefs['limit_des_lines'] > 0 || (string)$this->prefs['limit_des_lines'] == '') { @@ -470,6 +481,8 @@ class calendar_uilist extends calendar_ui // Split out combined values if(strpos($action, 'status') !== false) { list($action, $status) = explode('-', $action); + } elseif (strpos($action, '_') !== false) { + list($action, $settings) = explode('_', $action,2); } if ($use_all) @@ -502,7 +515,10 @@ class calendar_uilist extends calendar_ui echo $ical; common::egw_exit(); break; - + case 'document': + $msg = $this->download_document($checked,$settings); + $failed = count($checked); + return false; } // Actions where the action is applied to each entry @@ -657,4 +673,30 @@ class calendar_uilist extends calendar_ui } '; } + + /** + * Download a document with inserted entries + * + * @param array $ids timesheet-ids + * @param string $document vfs-path of document + * @return string error-message or error, otherwise the function does NOT return! + */ + function download_document($ids,$document='') + { + if (!$document) + { + $document = $GLOBALS['egw_info']['user']['preferences']['calendar']['default_document']; + } + else + { + $document = $GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir'].'/'.$document; + } + if (!@egw_vfs::stat($document)) + { + return lang("Document '%1' does not exist or is not readable for you!",$document); + } + require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.calendar_merge.inc.php'); + $document_merge = new calendar_merge(); + return $document_merge->download($document,$ids); + } } diff --git a/calendar/setup/etemplates.inc.php b/calendar/setup/etemplates.inc.php index 983c195bef..c7b65f22f9 100644 --- a/calendar/setup/etemplates.inc.php +++ b/calendar/setup/etemplates.inc.php @@ -2,7 +2,7 @@ /** * eGroupWare - eTemplates for Application calendar * http://www.egroupware.org - * generated by soetemplate::dump4setup() 2011-01-05 14:12 + * generated by soetemplate::dump4setup() 2011-02-09 08:55 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package calendar @@ -67,7 +67,7 @@ $templ_data[] = array('name' => 'calendar.list','template' => '','lang' => '','g $templ_data[] = array('name' => 'calendar.list.dates','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:2:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1173420675',); -$templ_data[] = array('name' => 'calendar.list.rows','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:1:"B";s:3:"40%";s:2:"c1";s:2:"th";s:2:"c2";s:23:"$row_cont[category],top";}i:1;a:14:{s:1:"A";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:5:"Start";s:4:"name";s:9:"cal_start";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:3:"End";s:4:"name";s:7:"cal_end";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"C";a:3:{s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"D";a:3:{s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"E";a:3:{s:5:"label";s:10:"Recurrence";s:4:"name";s:6:"recure";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"F";a:3:{s:5:"label";s:7:"Project";s:4:"name";s:5:"pm_id";s:4:"type";s:16:"nextmatch-header";}s:1:"G";a:3:{s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:4:"type";s:16:"nextmatch-header";}s:1:"H";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:5:"label";s:5:"Owner";s:8:"readonly";s:4:"true";s:4:"name";s:9:"cal_owner";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:8:"Location";s:4:"name";s:12:"cal_location";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"I";a:4:{s:5:"label";s:5:"Owner";s:8:"readonly";s:4:"true";s:4:"name";s:9:"cal_owner";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"J";a:3:{s:5:"label";s:8:"Location";s:4:"name";s:12:"cal_location";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"K";a:4:{s:5:"label";s:12:"Participants";s:4:"name";s:11:"participant";s:4:"size";s:3:"All";s:4:"type";s:23:"nextmatch-accountfilter";}s:1:"L";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Created";s:4:"name";s:11:"cal_created";}i:2;a:4:{s:4:"type";s:16:"nextmatch-header";s:4:"name";s:11:"cal_creator";s:4:"size";s:7:"Creator";s:5:"label";s:7:"Creator";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Last changed";}}s:1:"M";a:4:{s:5:"label";s:13:"Custom fields";s:8:"readonly";s:4:"true";s:4:"name";s:3:"cfs";s:4:"type";s:22:"nextmatch-customfields";}s:1:"N";a:7:{s:5:"label";s:7:"Actions";s:5:"class";s:7:"noPrint";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"help";s:9:"Check all";s:4:"span";s:8:",noPrint";}i:2;a:8:{s:5:"label";s:9:"Check all";s:7:"onclick";s:60:"toggle_all(this.form,form::name(\'checked[]\')); return false;";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:5:"check";s:4:"help";s:9:"Check all";}s:4:"span";s:8:",noPrint";}}i:2;a:14:{s:1:"A";a:5:{s:4:"name";s:5:"start";s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:5:{s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[start]";s:4:"size";s:14:",$cont[format]";s:4:"type";s:9:"date-time";s:4:"span";s:7:",noWrap";}i:2;a:5:{s:8:"readonly";s:4:"true";s:4:"name";s:11:"${row}[end]";s:4:"size";s:14:",$cont[format]";s:4:"type";s:9:"date-time";s:4:"span";s:7:",noWrap";}}s:1:"B";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:6:{s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"2";s:4:"type";s:4:"hbox";i:1;a:5:{s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[title]";s:4:"size";s:1:"b";s:4:"type";s:5:"label";}i:2;a:5:{s:4:"type";s:5:"label";s:5:"label";s:3:"#%s";s:4:"name";s:10:"${row}[id]";s:4:"size";s:1:"b";s:5:"align";s:5:"right";}}i:2;a:5:{s:7:"no_lang";s:1:"1";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[description]";s:4:"type";s:5:"label";}s:4:"span";s:16:",listDescription";}i:3;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[recure]";s:4:"type";s:5:"label";}s:4:"span";s:9:",listVbox";}s:1:"C";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"name";s:13:"${row}[title]";s:4:"type";s:5:"label";}i:2;a:5:{s:4:"type";s:5:"label";s:5:"label";s:3:"#%s";s:4:"name";s:10:"${row}[id]";s:4:"size";s:1:"b";s:5:"align";s:5:"right";}}s:1:"D";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[description]";s:4:"type";s:5:"label";}s:1:"E";a:2:{s:4:"name";s:14:"${row}[recure]";s:4:"type";s:5:"label";}s:1:"F";a:3:{s:4:"name";s:10:"${row}[id]";s:4:"size";s:23:"calendar,projectmanager";s:4:"type";s:11:"link-string";}s:1:"G";a:3:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:16:"${row}[category]";}s:1:"H";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:14:"select-account";s:5:"class";s:6:"noWrap";s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[owner]";}i:2;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";s:4:"type";s:5:"label";}}s:1:"I";a:4:{s:4:"type";s:14:"select-account";s:5:"class";s:6:"noWrap";s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[owner]";}s:1:"J";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";s:4:"type";s:5:"label";}s:1:"K";a:4:{s:8:"readonly";s:4:"true";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[parts]";s:4:"type";s:4:"html";}s:1:"L";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:15:"${row}[created]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:15:"${row}[creator]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[modified]";s:8:"readonly";s:1:"1";}}s:1:"M";a:2:{s:4:"name";s:4:"$row";s:4:"type";s:17:"customfields-list";}s:1:"N";a:5:{s:4:"size";s:6:"2,,0,0";s:4:"type";s:4:"vbox";i:1;a:8:{s:5:"class";s:7:"noPrint";s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:6:{s:5:"label";s:4:"View";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:4:"help";s:15:"View this event";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:267:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit&link_app[]=$row_cont[app]&cat_id=$row_cont[category]&link_id[]=$row_cont[app_id]$row_cont[extra_links]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}i:3;a:6:{s:5:"label";s:4:"Edit";s:7:"onclick";s:20:"$row_cont[edit_link]";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:4:"help";s:15:"Edit this event";}i:4;a:6:{s:5:"label";s:6:"Delete";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:4:"help";s:17:"Delete this event";}i:5;a:5:{s:5:"align";s:5:"right";s:4:"name";s:9:"checked[]";s:4:"size";s:35:"$row_cont[id]:$row_cont[recur_date]";s:4:"type";s:8:"checkbox";s:4:"help";s:45:"Select multiple contacts for a further action";}}i:2;a:3:{s:4:"size";s:6:"1,,0,0";s:4:"type";s:4:"hbox";i:1;a:6:{s:5:"label";s:11:"Filemanager";s:4:"size";s:18:"filemanager/navbar";s:4:"type";s:6:"button";s:4:"name";s:26:"filemanager[$row_cont[id]]";s:4:"span";s:8:",image16";s:7:"onclick";s:139:"window.location.href=egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.index&path=/apps/calendar/$row_cont[id]\'); return false;";}}s:4:"span";s:8:",noPrint";}}}s:4:"cols";i:14;s:4:"rows";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1294261361',); +$templ_data[] = array('name' => 'calendar.list.rows','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:1:"B";s:3:"40%";s:2:"c1";s:2:"th";s:2:"c2";s:23:"$row_cont[category],top";}i:1;a:14:{s:1:"A";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:5:"Start";s:4:"name";s:9:"cal_start";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:3:"End";s:4:"name";s:7:"cal_end";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"C";a:3:{s:5:"label";s:5:"Title";s:4:"name";s:9:"cal_title";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"D";a:3:{s:5:"label";s:11:"Description";s:4:"name";s:15:"cal_description";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"E";a:3:{s:5:"label";s:10:"Recurrence";s:4:"name";s:6:"recure";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"F";a:3:{s:5:"label";s:7:"Project";s:4:"name";s:5:"pm_id";s:4:"type";s:16:"nextmatch-header";}s:1:"G";a:3:{s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";s:4:"type";s:16:"nextmatch-header";}s:1:"H";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:5:"label";s:5:"Owner";s:8:"readonly";s:4:"true";s:4:"name";s:9:"cal_owner";s:4:"type";s:20:"nextmatch-sortheader";}i:2;a:3:{s:5:"label";s:8:"Location";s:4:"name";s:12:"cal_location";s:4:"type";s:20:"nextmatch-sortheader";}}s:1:"I";a:4:{s:5:"label";s:5:"Owner";s:8:"readonly";s:4:"true";s:4:"name";s:9:"cal_owner";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"J";a:3:{s:5:"label";s:8:"Location";s:4:"name";s:12:"cal_location";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"K";a:4:{s:5:"label";s:12:"Participants";s:4:"name";s:11:"participant";s:4:"size";s:3:"All";s:4:"type";s:23:"nextmatch-accountfilter";}s:1:"L";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Created";s:4:"name";s:11:"cal_created";}i:2;a:4:{s:4:"type";s:16:"nextmatch-header";s:4:"name";s:11:"cal_creator";s:4:"size";s:7:"Creator";s:5:"label";s:7:"Creator";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Last changed";}}s:1:"M";a:4:{s:5:"label";s:13:"Custom fields";s:8:"readonly";s:4:"true";s:4:"name";s:3:"cfs";s:4:"type";s:22:"nextmatch-customfields";}s:1:"N";a:7:{s:5:"label";s:7:"Actions";s:5:"class";s:7:"noPrint";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"help";s:9:"Check all";s:4:"span";s:8:",noPrint";}i:2;a:8:{s:5:"label";s:9:"Check all";s:7:"onclick";s:60:"toggle_all(this.form,form::name(\'checked[]\')); return false;";s:6:"needed";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:5:"check";s:4:"help";s:9:"Check all";}s:4:"span";s:8:",noPrint";}}i:2;a:14:{s:1:"A";a:5:{s:4:"name";s:5:"start";s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:5:{s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[start]";s:4:"size";s:14:",$cont[format]";s:4:"type";s:9:"date-time";s:4:"span";s:7:",noWrap";}i:2;a:5:{s:8:"readonly";s:4:"true";s:4:"name";s:11:"${row}[end]";s:4:"size";s:14:",$cont[format]";s:4:"type";s:9:"date-time";s:4:"span";s:7:",noWrap";}}s:1:"B";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:6:{s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"2";s:4:"type";s:4:"hbox";i:1;a:5:{s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[title]";s:4:"size";s:1:"b";s:4:"type";s:5:"label";}i:2;a:5:{s:4:"type";s:5:"label";s:5:"label";s:3:"#%s";s:4:"name";s:10:"${row}[id]";s:4:"size";s:1:"b";s:5:"align";s:5:"right";}}i:2;a:5:{s:7:"no_lang";s:1:"1";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[description]";s:4:"type";s:5:"label";}s:4:"span";s:16:",listDescription";}i:3;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[recure]";s:4:"type";s:5:"label";}s:4:"span";s:9:",listVbox";}s:1:"C";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"name";s:13:"${row}[title]";s:4:"type";s:5:"label";}i:2;a:5:{s:4:"type";s:5:"label";s:5:"label";s:3:"#%s";s:4:"name";s:10:"${row}[id]";s:4:"size";s:1:"b";s:5:"align";s:5:"right";}}s:1:"D";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[description]";s:4:"type";s:5:"label";}s:1:"E";a:2:{s:4:"name";s:14:"${row}[recure]";s:4:"type";s:5:"label";}s:1:"F";a:3:{s:4:"name";s:10:"${row}[id]";s:4:"size";s:23:"calendar,projectmanager";s:4:"type";s:11:"link-string";}s:1:"G";a:3:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:16:"${row}[category]";}s:1:"H";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:14:"select-account";s:5:"class";s:6:"noWrap";s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[owner]";}i:2;a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";s:4:"type";s:5:"label";}}s:1:"I";a:4:{s:4:"type";s:14:"select-account";s:5:"class";s:6:"noWrap";s:8:"readonly";s:4:"true";s:4:"name";s:13:"${row}[owner]";}s:1:"J";a:3:{s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";s:4:"type";s:5:"label";}s:1:"K";a:4:{s:8:"readonly";s:4:"true";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[parts]";s:4:"type";s:4:"html";}s:1:"L";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:15:"${row}[created]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:15:"${row}[creator]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[modified]";s:8:"readonly";s:1:"1";}}s:1:"M";a:2:{s:4:"name";s:4:"$row";s:4:"type";s:17:"customfields-list";}s:1:"N";a:5:{s:4:"size";s:6:"2,,0,0";s:4:"type";s:4:"vbox";i:1;a:8:{s:5:"class";s:7:"noPrint";s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:6:{s:5:"label";s:4:"View";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.calendar_uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]\'),\'425\',\'dependent=yes,width=750,height=450,scrollbars=yes,status=yes\'); return false;";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:4:"help";s:15:"View this event";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:267:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit&link_app[]=$row_cont[app]&cat_id=$row_cont[category]&link_id[]=$row_cont[app_id]$row_cont[extra_links]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}i:3;a:6:{s:5:"label";s:4:"Edit";s:7:"onclick";s:20:"$row_cont[edit_link]";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:4:"help";s:15:"Edit this event";}i:4;a:6:{s:5:"label";s:6:"Delete";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:4:"help";s:17:"Delete this event";}i:5;a:5:{s:5:"align";s:5:"right";s:4:"name";s:9:"checked[]";s:4:"size";s:35:"$row_cont[id]:$row_cont[recur_date]";s:4:"type";s:8:"checkbox";s:4:"help";s:45:"Select multiple contacts for a further action";}}i:2;a:4:{s:4:"size";s:6:"2,,0,0";s:4:"type";s:4:"hbox";i:1;a:4:{s:4:"type";s:6:"button";s:4:"size";s:15:"etemplate/merge";s:5:"label";s:5:"merge";s:4:"name";s:45:"document[$row_cont[id]:$row_cont[recur_date]]";}i:2;a:6:{s:5:"label";s:11:"Filemanager";s:4:"size";s:18:"filemanager/navbar";s:4:"type";s:6:"button";s:4:"name";s:26:"filemanager[$row_cont[id]]";s:4:"span";s:8:",image16";s:7:"onclick";s:139:"window.location.href=egw::link(\'/index.php\',\'menuaction=filemanager.filemanager_ui.index&path=/apps/calendar/$row_cont[id]\'); return false;";}}s:4:"span";s:8:",noPrint";}}}s:4:"cols";i:14;s:4:"rows";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1297185309',); $templ_data[] = array('name' => 'calendar.print','template' => '','lang' => '','group' => '0','version' => '1.6.001','data' => 'a:1:{i:0;a:3:{s:4:"size";s:6:"1,,0,0";s:4:"type";s:4:"hbox";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:15:{i:0;a:13:{s:1:"A";s:2:"95";s:2:"c2";s:2:"th";s:2:"c5";s:3:"row";s:2:"c6";s:7:"row_off";s:2:"c7";s:3:"row";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c8";s:3:"row";s:2:"c9";s:3:"row";s:2:"h2";s:2:"28";s:2:"c1";s:2:"th";s:3:"c10";s:4:",top";s:3:"c11";s:2:"th";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:4:"name";s:5:"print";s:7:"onclick";s:15:"window.print();";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"span";s:5:",bold";s:5:"label";s:8:"Calendar";s:4:"size";s:4:"bold";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"name";s:5:"title";s:4:"size";s:6:"80,255";s:8:"readonly";s:1:"1";s:4:"span";s:3:"all";}}i:3;a:2:{s:1:"A";a:4:{s:5:"width";s:2:"95";s:4:"size";s:8:",,,start";s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"name";s:5:"start";s:4:"type";s:9:"date-time";s:8:"readonly";s:1:"1";}i:2;a:7:{s:5:"label";s:9:"whole day";s:4:"name";s:9:"whole_day";s:4:"size";s:11:",, ,disable";s:4:"type";s:8:"checkbox";s:4:"help";s:31:"Event will occupy the whole day";s:5:"align";s:6:"center";s:8:"readonly";s:1:"1";}}}i:4;a:2:{s:1:"A";a:4:{s:5:"width";s:1:"0";s:4:"size";s:11:",,,duration";s:4:"type";s:5:"label";s:5:"label";s:8:"Duration";}s:1:"B";a:4:{s:4:"size";s:6:"2,,0,0";s:4:"type";s:4:"hbox";i:1;a:7:{s:7:"no_lang";s:1:"1";s:8:"onchange";s:227:"set_style_by_class(\'table\',\'end_hide\',\'visibility\',this.value == \'\' ? \'visible\' : \'hidden\'); if (this.value == \'\') document.getElementById(form::name(\'end[str]\')).value = document.getElementById(form::name(\'start[str]\')).value;";s:4:"name";s:8:"duration";s:4:"size";s:12:"Use end date";s:4:"type";s:6:"select";s:4:"help";s:23:"Duration of the meeting";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"name";s:3:"end";s:4:"type";s:9:"date-time";s:4:"span";s:9:",end_hide";s:8:"readonly";s:1:"1";}}}i:5;a:2:{s:1:"A";a:4:{s:4:"size";s:11:",,,location";s:4:"type";s:5:"label";s:5:"label";s:8:"Location";s:5:"width";s:1:"0";}s:1:"B";a:5:{s:4:"size";s:4:",255";s:4:"name";s:8:"location";s:4:"type";s:4:"text";s:4:"span";s:15:",inputFullWidth";s:8:"readonly";s:1:"1";}}i:6;a:2:{s:1:"A";a:4:{s:4:"size";s:11:",,,priority";s:4:"type";s:5:"label";s:5:"label";s:8:"Priority";s:5:"width";s:1:"0";}s:1:"B";a:3:{s:4:"type";s:15:"select-priority";s:4:"name";s:8:"priority";s:8:"readonly";s:1:"1";}}i:7;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Options";s:5:"width";s:1:"0";}s:1:"B";a:6:{s:4:"name";s:12:"non_blocking";s:4:"size";s:11:",, ,disable";s:4:"type";s:8:"checkbox";s:4:"help";s:56:"A non blocking event will not conflict with other events";s:5:"label";s:12:"non blocking";s:8:"readonly";s:1:"1";}}i:8;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:5:{s:4:"name";s:6:"public";s:4:"size";s:3:"0,1";s:4:"type";s:8:"checkbox";s:5:"label";s:7:"Private";s:8:"readonly";s:1:"1";}}i:9;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:10:"Categories";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"name";s:8:"category";s:8:"readonly";s:1:"1";}}i:10;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:11:"description";s:8:"readonly";s:1:"1";}}i:11;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:13:"custom fields";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:12;a:2:{s:1:"A";a:3:{s:4:"type";s:12:"customfields";s:4:"span";s:3:"all";s:8:"readonly";s:1:"1";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:13;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"name";s:27:"calendar.print.participants";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:14;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:20:"calendar.print.links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"cols";i:2;s:4:"rows";i:14;s:4:"size";s:8:"100%,200";}}}','size' => '','style' => '','modified' => '1229596125',);