forked from extern/egroupware
Add {{links}}, {{attachments}}, {{links_attachments}} placeholders
This commit is contained in:
parent
5878768532
commit
4ab5f97ed0
@ -48,6 +48,12 @@ class addressbook_merge extends bo_merge
|
|||||||
{
|
{
|
||||||
return false;
|
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))
|
if (!(strpos($content,'$$calendar/') === false))
|
||||||
{
|
{
|
||||||
$replacements += $this->calendar_replacements($id,!(strpos($content,'$$calendar/-1/') === false));
|
$replacements += $this->calendar_replacements($id,!(strpos($content,'$$calendar/-1/') === false));
|
||||||
@ -173,6 +179,9 @@ class addressbook_merge extends bo_merge
|
|||||||
|
|
||||||
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
||||||
foreach(array(
|
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'),
|
'date' => lang('Date'),
|
||||||
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
||||||
'user/account_lid' => lang('Username'),
|
'user/account_lid' => lang('Username'),
|
||||||
|
@ -207,6 +207,12 @@ class calendar_merge extends bo_merge
|
|||||||
{
|
{
|
||||||
$replacements['$$'.($prefix?$prefix.'/':'').'#'.$name.'$$'] = $event['#'.$name];
|
$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;
|
return $replacements;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,6 +569,9 @@ class calendar_merge extends bo_merge
|
|||||||
|
|
||||||
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
||||||
foreach(array(
|
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'),
|
'date' => lang('Date'),
|
||||||
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
||||||
'user/account_lid' => lang('Username'),
|
'user/account_lid' => lang('Username'),
|
||||||
|
@ -124,6 +124,11 @@ class timesheet_merge extends bo_merge
|
|||||||
if(!$array['#'.$name]) $array['#'.$name] = '';
|
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
|
// Add markers
|
||||||
foreach($array as $key => &$value)
|
foreach($array as $key => &$value)
|
||||||
{
|
{
|
||||||
@ -182,6 +187,9 @@ class timesheet_merge extends bo_merge
|
|||||||
|
|
||||||
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
|
||||||
foreach(array(
|
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'),
|
'date' => lang('Date'),
|
||||||
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
|
||||||
'user/account_lid' => lang('Username'),
|
'user/account_lid' => lang('Username'),
|
||||||
|
Loading…
Reference in New Issue
Block a user