From: <nat...@us...> - 2011-10-26 16:45:45
|
Author: nathangray Date: Wed Oct 26 18:45:38 2011 New Revision: 37063 URL: http://svn.stylite.de/viewvc/egroupware?rev=37063&view=rev Log: Add {{links}}, {{attachments}}, {{links_attachments}} placeholders Modified: trunk/addressbook/inc/class.addressbook_merge.inc.php trunk/calendar/inc/class.calendar_merge.inc.php trunk/projectmanager/inc/class.projectmanager_merge.inc.php trunk/timesheet/inc/class.timesheet_merge.inc.php trunk/tracker/inc/class.tracker_merge.inc.php Modified: trunk/addressbook/inc/class.addressbook_merge.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_merge.inc.php?rev=37063&r1=37062&r2=37063&view=diff ============================================================================== --- trunk/addressbook/inc/class.addressbook_merge.inc.php (original) +++ trunk/addressbook/inc/class.addressbook_merge.inc.php Wed Oct 26 18:45:38 2011 @@ -48,6 +48,12 @@ { return false; } + // Links + $replacements += array( + '$$links$$' => $this->get_links('addressbook', $id, '!'.egw_link::VFS_APPNAME), + '$$attachments$$' => $this->get_links('addressbook', $id, egw_link::VFS_APPNAME), + '$$links_attachments$$' => $this->get_links('addressbook', $id) + ); if (!(strpos($content,'$$calendar/') === false)) { $replacements += $this->calendar_replacements($id,!(strpos($content,'$$calendar/-1/') === false)); @@ -173,6 +179,9 @@ echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>"; foreach(array( + 'links' => lang('Titles of any entries linked to the current record, excluding attached files'), + 'attachments' => lang('List of files linked to the current record'), + 'links_attachments' => lang('Links and attached files'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'), Modified: trunk/calendar/inc/class.calendar_merge.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_merge.inc.php?rev=37063&r1=37062&r2=37063&view=diff ============================================================================== --- trunk/calendar/inc/class.calendar_merge.inc.php (original) +++ trunk/calendar/inc/class.calendar_merge.inc.php Wed Oct 26 18:45:38 2011 @@ -207,6 +207,12 @@ { $replacements['$$'.($prefix?$prefix.'/':'').'#'.$name.'$$'] = $event['#'.$name]; } + + // Links + $replacements['$$'.($prefix?$prefix.'/':'').'links$$'] = $this->get_links('calendar', $event['id'], '!'.egw_link::VFS_APPNAME); + $replacements['$$'.($prefix?$prefix.'/':'').'attachments$$'] = $this->get_links('calendar', $event['id'], egw_link::VFS_APPNAME); + $replacements['$$'.($prefix?$prefix.'/':'').'links_attachments$$'] = $this->get_links('calendar', $event['id']); + return $replacements; } @@ -563,6 +569,9 @@ echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>"; foreach(array( + 'links' => lang('Titles of any entries linked to the current record, excluding attached files'), + 'attachments' => lang('List of files linked to the current record'), + 'links_attachments' => lang('Links and attached files'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'), Modified: trunk/projectmanager/inc/class.projectmanager_merge.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/projectmanager/inc/class.projectmanager_merge.inc.php?rev=37063&r1=37062&r2=37063&view=diff ============================================================================== --- trunk/projectmanager/inc/class.projectmanager_merge.inc.php (original) +++ trunk/projectmanager/inc/class.projectmanager_merge.inc.php Wed Oct 26 18:45:38 2011 @@ -305,7 +305,6 @@ break; } } - return empty($replacements) ? false : $replacements; } @@ -402,6 +401,12 @@ } $replacements['$$'.($prefix ? $prefix.'/':'').$name.'$$'] = $value; } + + // Project links + $replacements['$$'.($prefix ? $prefix.'/':'').'links$$'] = $this->get_links('projectmanager', $project['pm_id'], '!'.egw_link::VFS_APPNAME); + $replacements['$$'.($prefix ? $prefix.'/':'').'attachments$$'] = $this->get_links('projectmanager', $project['pm_id'], egw_link::VFS_APPNAME); + $replacements['$$'.($prefix ? $prefix.'/':'').'links_attachments$$'] = $this->get_links('projectmanager', $project['pm_id']); + return $replacements; } @@ -466,6 +471,11 @@ $replacements['$$'.($prefix ? $prefix.'/':'').$name.'$$'] = $value; } + // Element links + $replacements['$$'.($prefix ? $prefix.'/':'').'links$$'] = $this->get_links($element['pe_app'], $element['pe_app_id'], '!'.egw_link::VFS_APPNAME); + $replacements['$$'.($prefix ? $prefix.'/':'').'attachments$$'] = $this->get_links($element['pe_app'], $element['pe_app_id'], egw_link::VFS_APPNAME); + $replacements['$$'.($prefix ? $prefix.'/':'').'links_attachments$$'] = $this->get_links($element['pe_app'], $element['pe_app_id']); + return $replacements; } @@ -633,6 +643,9 @@ // General echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>"; foreach(array( + 'links' => lang('Titles of any entries linked to the current record, excluding attached files'), + 'attachments' => lang('List of files linked to the current record'), + 'links_attachments' => lang('Links and attached files'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'), @@ -690,7 +703,7 @@ throw new egw_exception(lang('No rights to export more then %1 entries!',(int)$this->export_limit)); } } - + $element =& $elements[$n]; $replacement = false; if(isset($element)) Modified: trunk/timesheet/inc/class.timesheet_merge.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/timesheet/inc/class.timesheet_merge.inc.php?rev=37063&r1=37062&r2=37063&view=diff ============================================================================== --- trunk/timesheet/inc/class.timesheet_merge.inc.php (original) +++ trunk/timesheet/inc/class.timesheet_merge.inc.php Wed Oct 26 18:45:38 2011 @@ -124,6 +124,11 @@ if(!$array['#'.$name]) $array['#'.$name] = ''; } + // Links + $array['links'] = $this->get_links('timesheet', $id, '!'.egw_link::VFS_APPNAME); + $array['attachments'] = $this->get_links('timesheet', $id, egw_link::VFS_APPNAME); + $array['links_attachments'] = $this->get_links('timesheet', $id); + // Add markers foreach($array as $key => &$value) { @@ -182,6 +187,9 @@ echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>"; foreach(array( + 'links' => lang('Titles of any entries linked to the current record, excluding attached files'), + 'attachments' => lang('List of files linked to the current record'), + 'links_attachments' => lang('Links and attached files'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'), Modified: trunk/tracker/inc/class.tracker_merge.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/tracker/inc/class.tracker_merge.inc.php?rev=37063&r1=37062&r2=37063&view=diff ============================================================================== --- trunk/tracker/inc/class.tracker_merge.inc.php (original) +++ trunk/tracker/inc/class.tracker_merge.inc.php Wed Oct 26 18:45:38 2011 @@ -110,6 +110,11 @@ if(!$array['#'.$name]) $array['#'.$name] = ''; } + // Links + $array['links'] = $this->get_links('tracker', $id, '!'.egw_link::VFS_APPNAME); + $array['attachments'] = $this->get_links('tracker', $id, egw_link::VFS_APPNAME); + $array['links_attachments'] = $this->get_links('tracker', $id); + // Add markers foreach($array as $key => &$value) { @@ -206,6 +211,9 @@ echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>"; foreach(array( + 'links' => lang('Titles of any entries linked to the current record, excluding attached files'), + 'attachments' => lang('List of files linked to the current record'), + 'links_attachments' => lang('Links and attached files'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'), |