2018-07-04 11:24:29 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* casechangelog short summary.
|
|
|
|
|
*
|
|
|
|
|
* casechangelog description.
|
|
|
|
|
*
|
|
|
|
|
* @version 1.0
|
|
|
|
|
* @author MoronO
|
|
|
|
|
*/
|
|
|
|
|
class PluginProcessmakerCasechangelog extends CommonDBTM {
|
|
|
|
|
|
2019-05-21 10:47:15 +02:00
|
|
|
static function displayTabContentForItem(CommonGLPI $case, $tabnum = 1, $withtemplate = 0) {
|
2018-07-04 11:24:29 +02:00
|
|
|
global $CFG_GLPI, $PM_SOAP;
|
|
|
|
|
|
|
|
|
|
$rand = rand();
|
2018-08-02 16:57:00 +02:00
|
|
|
|
|
|
|
|
$caseHistoryURL = $PM_SOAP->serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand";
|
2018-07-04 11:24:29 +02:00
|
|
|
|
2019-05-21 10:47:15 +02:00
|
|
|
$PM_SOAP->echoDomain();
|
2018-07-25 14:09:52 +02:00
|
|
|
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>"; //?rand=$rand'
|
2018-07-04 11:24:29 +02:00
|
|
|
|
2018-08-02 16:57:00 +02:00
|
|
|
$iframe = "<iframe
|
|
|
|
|
id='caseiframe-caseChangeLogHistory'
|
|
|
|
|
style='border: none;'
|
|
|
|
|
width='100%'
|
2018-07-25 14:09:52 +02:00
|
|
|
src='$caseHistoryURL'
|
|
|
|
|
onload=\"onOtherFrameLoad( 'caseChangeLogHistory', 'caseiframe-caseChangeLogHistory', 'body', 0 );\">
|
|
|
|
|
</iframe>";
|
2018-07-04 11:24:29 +02:00
|
|
|
|
2019-05-21 10:47:15 +02:00
|
|
|
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand);
|
2018-07-04 11:24:29 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-21 10:47:15 +02:00
|
|
|
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) {
|
2018-08-02 16:57:00 +02:00
|
|
|
return __('Change log', 'processmaker');
|
2018-07-04 11:24:29 +02:00
|
|
|
}
|
2019-05-21 10:47:15 +02:00
|
|
|
}
|