Add mergeprint tag for links to a specified application: links/appname

This commit is contained in:
Nathan Gray 2012-01-05 17:43:44 +00:00
parent 32b1cc2a29
commit 2e9866bab9
3 changed files with 15 additions and 0 deletions

View File

@ -306,6 +306,14 @@ abstract class bo_merge
$link_titles = array(); $link_titles = array();
foreach($links as $link_id => $link_info) foreach($links as $link_id => $link_info)
{ {
// Using only_app only returns the ID
if(!is_array($link_info) && $only_app && $only_app[0] !== '!')
{
$link_info = array(
'app' => $only_app,
'id' => $link_info
);
}
$title = egw_link::title($link_info['app'], $link_info['id']); $title = egw_link::title($link_info['app'], $link_info['id']);
if(class_exists('stylite_links_stream_wrapper') && $link_info['app'] != egw_link::VFS_APPNAME) if(class_exists('stylite_links_stream_wrapper') && $link_info['app'] != egw_link::VFS_APPNAME)
{ {

View File

@ -251,6 +251,7 @@ linkapps etemplate en Link apps
linkentry etemplate en Link entry linkentry etemplate en Link entry
linklist etemplate en Link list linklist etemplate en Link list
links and attached files preferences en Links and attached files links and attached files preferences en Links and attached files
links to specified application. example: {{links/addressbook}} etemplate en Links to specified application. Example: {{links/addressbook}}
linkstring etemplate en Link string linkstring etemplate en Link string
linkto etemplate en Link to linkto etemplate en Link to
list of files linked to the current record preferences en List of files linked to the current record list of files linked to the current record preferences en List of files linked to the current record

View File

@ -113,6 +113,11 @@ class infolog_merge extends bo_merge
$array['links'] = $this->get_links('infolog', $id, '!'.egw_link::VFS_APPNAME); $array['links'] = $this->get_links('infolog', $id, '!'.egw_link::VFS_APPNAME);
$array['attachments'] = $this->get_links('infolog', $id, egw_link::VFS_APPNAME); $array['attachments'] = $this->get_links('infolog', $id, egw_link::VFS_APPNAME);
$array['links_attachments'] = $this->get_links('infolog', $id); $array['links_attachments'] = $this->get_links('infolog', $id);
// Need to set each app, to make sure placeholders are removed
foreach(array_keys($GLOBALS['egw_info']['user']['apps']) as $app)
{
$array["links/$app"] = $this->get_links('infolog',$id,$app);
}
// Check for linked project ID // Check for linked project ID
$links = egw_link::get_links('infolog', $id, 'projectmanager'); $links = egw_link::get_links('infolog', $id, 'projectmanager');
@ -197,6 +202,7 @@ class infolog_merge extends bo_merge
'links' => lang('Titles of any entries linked to the current record, excluding attached files'), 'links' => lang('Titles of any entries linked to the current record, excluding attached files'),
'attachments' => lang('List of files linked to the current record'), 'attachments' => lang('List of files linked to the current record'),
'links_attachments' => lang('Links and attached files'), 'links_attachments' => lang('Links and attached files'),
'links/[appname]' => lang('Links to specified application. Example: {{links/addressbook}}'),
'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'),