diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index df9fbf66cf..5e24d64cd1 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -306,6 +306,14 @@ abstract class bo_merge $link_titles = array(); 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']); if(class_exists('stylite_links_stream_wrapper') && $link_info['app'] != egw_link::VFS_APPNAME) { diff --git a/etemplate/lang/egw_en.lang b/etemplate/lang/egw_en.lang index 86e98b0647..72ce484d1c 100644 --- a/etemplate/lang/egw_en.lang +++ b/etemplate/lang/egw_en.lang @@ -251,6 +251,7 @@ linkapps etemplate en Link apps linkentry etemplate en Link entry linklist etemplate en Link list 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 linkto etemplate en Link to list of files linked to the current record preferences en List of files linked to the current record diff --git a/infolog/inc/class.infolog_merge.inc.php b/infolog/inc/class.infolog_merge.inc.php index 21df7247b3..eec535228b 100644 --- a/infolog/inc/class.infolog_merge.inc.php +++ b/infolog/inc/class.infolog_merge.inc.php @@ -113,6 +113,11 @@ class infolog_merge extends bo_merge $array['links'] = $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); + // 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 $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'), 'attachments' => lang('List of files linked to the current record'), 'links_attachments' => lang('Links and attached files'), + 'links/[appname]' => lang('Links to specified application. Example: {{links/addressbook}}'), 'date' => lang('Date'), 'user/n_fn' => lang('Name of current user, all other contact fields are valid too'), 'user/account_lid' => lang('Username'),