* InfoLog: add converting into a Tracker ticket to actions selectbox of edit popup

This commit is contained in:
Ralf Becker 2013-10-25 08:18:59 +00:00
parent f62028444d
commit 57f45fe5f0
3 changed files with 14 additions and 5 deletions

View File

@ -1107,6 +1107,7 @@ class infolog_ui
$actions['tracker'] = array( $actions['tracker'] = array(
'icon' => 'tracker/navbar', 'icon' => 'tracker/navbar',
'caption' => 'Tracker', 'caption' => 'Tracker',
'hint' => 'Convert to a ticket',
'group' => $group, 'group' => $group,
'url' => 'menuaction=tracker.tracker_ui.edit&'. 'url' => 'menuaction=tracker.tracker_ui.edit&'.
egw_link::get_registry('tracker', 'add_app') . '[]=infolog&'.egw_link::get_registry('tracker','add_id').'[]=$id', egw_link::get_registry('tracker', 'add_app') . '[]=infolog&'.egw_link::get_registry('tracker','add_id').'[]=$id',
@ -1538,7 +1539,6 @@ class infolog_ui
$action_id = $content['action_id']; unset($content['action_id']); $action_id = $content['action_id']; unset($content['action_id']);
$referer = $content['referer']; unset($content['referer']); $referer = $content['referer']; unset($content['referer']);
$no_popup = $content['no_popup']; unset($content['no_popup']); $no_popup = $content['no_popup']; unset($content['no_popup']);
$caller = $content['caller']; unset($content['caller']);
// convert custom from to 0 or 1, it's unset if not checked, which starts the detection // convert custom from to 0 or 1, it's unset if not checked, which starts the detection
$content['info_custom_from'] = (int)$content['info_custom_from']; $content['info_custom_from'] = (int)$content['info_custom_from'];
@ -1548,7 +1548,7 @@ class infolog_ui
if ($button) if ($button)
{ {
// Copy or schedule Infolog // Copy or schedule Infolog
if (in_array($button,array('copy','schedule','ical'))) if (in_array($button,array('copy','schedule','ical','tracker')))
{ {
$action = $button; $action = $button;
if (!$info_id || $this->bo->check_access($info_id,EGW_ACL_EDIT)) if (!$info_id || $this->bo->check_access($info_id,EGW_ACL_EDIT))
@ -1805,7 +1805,7 @@ class infolog_ui
); );
} }
// new call via GET or some actions handled here, as they can happen both ways ($_GET[action] or button/action in GUI) // new call via GET or some actions handled here, as they can happen both ways ($_GET[action] or button/action in GUI)
if (!$submit || in_array($action,array('sp','copy','schedule','ical'))) if (!$submit || in_array($action,array('sp','copy','schedule','ical','tracker')))
{ {
switch ($action) switch ($action)
{ {
@ -1819,7 +1819,7 @@ class infolog_ui
case 'ical': case 'ical':
$boical = new infolog_ical(); $boical = new infolog_ical();
$result = $boical->exportVTODO($content,'2.0','PUBLISH',false); $result = $boical->exportVTODO($content,'2.0','PUBLISH',false);
ExecMethod2('phpgwapi.browser.content_header','todo.ics','text/calendar'); html::content_header('todo.ics', 'text/calendar');
echo $result; echo $result;
common::egw_exit(); common::egw_exit();
case 'sp': case 'sp':
@ -1833,7 +1833,13 @@ class infolog_ui
} }
unset($action); // it get stored in $content and will cause an other copy after [apply] unset($action); // it get stored in $content and will cause an other copy after [apply]
break; break;
case 'tracker':
egw::redirect_link('/index.php',array(
'menuaction' => 'tracker.tracker_ui.edit',
egw_link::get_registry('tracker', 'add_app').'[]' => 'infolog',
egw_link::get_registry('tracker','add_id').'[]' => $info_id,
));
break;
case 'projectmanager': case 'projectmanager':
$pm_links = array($action_id); $pm_links = array($action_id);
default: // to allow other apps to participate default: // to allow other apps to participate
@ -2030,6 +2036,7 @@ class infolog_ui
'sp' => 'Sub-entry', 'sp' => 'Sub-entry',
'print' => array('label' => 'Print', 'title' => 'Print this Infolog'), 'print' => array('label' => 'Print', 'title' => 'Print this Infolog'),
'ical' => array('label' => 'Export iCal', 'title' => 'Export iCal'), 'ical' => array('label' => 'Export iCal', 'title' => 'Export iCal'),
'tracker' => array('label' => 'Tracker', 'title' => 'Convert to a ticket'),
), ),
); );
if ($GLOBALS['egw_info']['user']['apps']['calendar']) if ($GLOBALS['egw_info']['user']['apps']['calendar'])

View File

@ -99,6 +99,7 @@ contact infolog de Kontakt
contact cf infolog de Kontakt CF contact cf infolog de Kontakt CF
contact fields infolog de Kontaktfelder contact fields infolog de Kontaktfelder
contactfield infolog de Kontaktfelder contactfield infolog de Kontaktfelder
convert to a ticket infolog de In ein Ticket umwandeln
copy of: infolog de Kopie von: copy of: infolog de Kopie von:
copy your changes to the clipboard, %1reload the entry%2 and merge them. infolog de Kopieren Sie ihre Änderungen in die Zwischenablage, %1laden den Eintrag neu%2 und fügen diese wieder ein. copy your changes to the clipboard, %1reload the entry%2 and merge them. infolog de Kopieren Sie ihre Änderungen in die Zwischenablage, %1laden den Eintrag neu%2 und fügen diese wieder ein.
create new links infolog de Neue Verknüpfung erzeugen create new links infolog de Neue Verknüpfung erzeugen

View File

@ -99,6 +99,7 @@ contact infolog en Contact
contact cf infolog en Contact CF contact cf infolog en Contact CF
contact fields infolog en Contact fields contact fields infolog en Contact fields
contactfield infolog en Contact field contactfield infolog en Contact field
convert to a ticket infolog en Convert to a ticket
copy of: infolog en Copy of: copy of: infolog en Copy of:
copy your changes to the clipboard, %1reload the entry%2 and merge them. infolog en Copy your changes to the clipboard, %1reload the entry%2 and merge them. copy your changes to the clipboard, %1reload the entry%2 and merge them. infolog en Copy your changes to the clipboard, %1reload the entry%2 and merge them.
create new links infolog en Create new links create new links infolog en Create new links