PM-321 Hacer funcionar el administrador del Cases List Builder SOLVED
- It don't have the functionality - PM-322 Hacer funcionar el Cases List Builder. - Files are added for cases list.
This commit is contained in:
@@ -33,7 +33,7 @@ try {
|
||||
$confReassignList = getReassignList();
|
||||
|
||||
// evaluates an action and the configuration for the list that will be rendered
|
||||
$config = getAdditionalFields( $action, (class_exists( 'enterprisePlugin' ) ? $confCasesList : array ()) );
|
||||
$config = getAdditionalFields( $action, $confCasesList );
|
||||
$columns = $config['caseColumns'];
|
||||
$readerFields = $config['caseReaderFields'];
|
||||
$reassignColumns = $confReassignList['caseColumns'];
|
||||
|
||||
19
workflow/engine/methods/cases/casesListSetup.php
Normal file
19
workflow/engine/methods/cases/casesListSetup.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
global $RBAC;
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") != 1 || $RBAC->userCanAccess("PM_SETUP_ADVANCE") != 1) {
|
||||
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$availableFields = array();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesListSetup', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesListSetup' ); //adding a html file .html.
|
||||
$oHeadPublisher->assignNumber("pageSize", 20); //sending the page size
|
||||
$oHeadPublisher->assignNumber("availableFields", G::json_encode($availableFields));
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
758
workflow/engine/methods/cases/proxyPMTablesFieldList.php
Normal file
758
workflow/engine/methods/cases/proxyPMTablesFieldList.php
Normal file
File diff suppressed because it is too large
Load Diff
65
workflow/engine/methods/cases/proxyPMTablesList.php
Normal file
65
workflow/engine/methods/cases/proxyPMTablesList.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
$callback = isset($_POST['callback']) ? $_POST['callback'] : 'stcCallback1001';
|
||||
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'DESC';
|
||||
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
|
||||
$query = isset($_POST['query']) ? $_POST['query'] : '';
|
||||
$option = '';
|
||||
|
||||
if ( isset($_GET['t'] ) ) {
|
||||
$option = $_GET['t'];
|
||||
}
|
||||
|
||||
try {
|
||||
G::LoadClass("BasePeer" );
|
||||
require_once ( "classes/model/AdditionalTables.php" );
|
||||
require_once ( "classes/model/Fields.php" );
|
||||
|
||||
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->clearSelectColumns ( );
|
||||
$oCriteria->setDistinct();
|
||||
$oCriteria->addSelectColumn ( AdditionalTablesPeer::ADD_TAB_UID );
|
||||
$oCriteria->addSelectColumn ( AdditionalTablesPeer::ADD_TAB_NAME );
|
||||
$oCriteria->addSelectColumn ( FieldsPeer::FLD_NAME );
|
||||
if ( $query != '' ) {
|
||||
$oCriteria->add (AdditionalTablesPeer::ADD_TAB_NAME, $query . '%', Criteria::LIKE);
|
||||
}
|
||||
$oCriteria->addJoin(AdditionalTablesPeer::ADD_TAB_UID, FieldsPeer::ADD_TAB_UID);
|
||||
$oCriteria->add (AdditionalTablesPeer::DBS_UID, 'workflow', CRITERIA::EQUAL );
|
||||
$oCriteria->add (FieldsPeer::FLD_NAME, 'APP_UID', CRITERIA::EQUAL );
|
||||
|
||||
if (isset($limit)) {
|
||||
$oCriteria->setLimit($limit);
|
||||
}
|
||||
|
||||
if (isset($start)) {
|
||||
$oCriteria->setOffset($start);
|
||||
}
|
||||
|
||||
if ($sort != '') {
|
||||
if ($dir == 'DESC') {
|
||||
$oCriteria->addDescendingOrderByColumn( $sort );
|
||||
} else {
|
||||
$oCriteria->addAscendingOrderByColumn( $sort );
|
||||
}
|
||||
}
|
||||
|
||||
$oDataset = AdditionalTablesPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$result = array();
|
||||
$rows = array();
|
||||
$index = isset($start) ? $start : 0;
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aRow['index'] = ++$index;
|
||||
$rows[] = $aRow;
|
||||
$oDataset->next();
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print G::json_encode( $result );
|
||||
} catch (Exception $e) {
|
||||
print G::json_encode ($e->getMessage());
|
||||
}
|
||||
|
||||
162
workflow/engine/methods/cases/proxyPMTablesSaveFields.php
Normal file
162
workflow/engine/methods/cases/proxyPMTablesSaveFields.php
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
$callback = isset($_POST['callback']) ? $_POST['callback'] : 'stcCallback1001';
|
||||
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'DESC';
|
||||
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
|
||||
$query = isset($_POST['query']) ? $_POST['query'] : '';
|
||||
$tabUid = isset($_POST['table']) ? $_POST['table'] : '';
|
||||
$action = isset($_POST['action']) ? $_POST['action'] : 'todo';
|
||||
|
||||
try {
|
||||
G::LoadClass("BasePeer" );
|
||||
require_once ( "classes/model/Fields.php" );
|
||||
//$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->setDistinct();
|
||||
$oCriteria->addSelectColumn (FieldsPeer::FLD_NAME);
|
||||
$oCriteria->addSelectColumn (FieldsPeer::FLD_UID);
|
||||
$oCriteria->addSelectColumn (FieldsPeer::FLD_INDEX);
|
||||
|
||||
if ($query != '') {
|
||||
$oCriteria->add (FieldsPeer::FLD_NAME, $query . '%', Criteria::LIKE);
|
||||
}
|
||||
//$oCriteria->addJoin(AdditionalTablesPeer::ADD_TAB_UID, FieldsPeer::ADD_TAB_UID);
|
||||
$oCriteria->add (FieldsPeer::ADD_TAB_UID, $tabUid , CRITERIA::EQUAL );
|
||||
$oCriteria->add (FieldsPeer::FLD_NAME, 'APP_UID' , CRITERIA::NOT_EQUAL );
|
||||
//$oCriteria->add (AppCacheViewPeer::APP_STATUS, "TO_DO" , CRITERIA::EQUAL );
|
||||
//$oCriteria->add (AppCacheViewPeer::USR_UID, $sUIDUserLogged);
|
||||
//$totalCount = AppCacheViewPeer::doCount( $Criteria );
|
||||
//if ( isset($limit) ) $oCriteria->setLimit ( $limit );
|
||||
//if ( isset($start) ) $oCriteria->setOffset ( $start );
|
||||
if ($sort != '') {
|
||||
if ($dir == 'DESC') {
|
||||
$oCriteria->addDescendingOrderByColumn( $sort );
|
||||
} else {
|
||||
$oCriteria->addAscendingOrderByColumn( $sort );
|
||||
} //else {
|
||||
// $oCriteria->addDescendingOrderByColumn('FLD_INDEX');
|
||||
//}
|
||||
$oDataset = FieldsPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
$result = array();
|
||||
$rows = array();
|
||||
switch ($action) {
|
||||
case 'todo':
|
||||
// #, Case, task, process, sent by, due date, Last Modify, Priority
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '5', 'column2' => '5' );
|
||||
$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '7', 'column2' => '7' );
|
||||
$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '9', 'column2' => '9' );
|
||||
$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'draft':
|
||||
//#, Case, task, process, due date, Last Modify, Priority },
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '5', 'column2' => '5' );
|
||||
$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '9', 'column2' => '9' );
|
||||
$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'sent':
|
||||
// #, Case, task, process, current user, sent by, Last Modify, Status
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
$rows[] = array( 'name' => 'APP_STATUS', 'gridIndex' => '2', 'column2' => '2' );
|
||||
$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '5', 'column2' => '5' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '7', 'column2' => '7' );
|
||||
$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '9', 'column2' => '9' );
|
||||
$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'unassigned':
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
//$rows[] = array( 'name' => 'APP_STATUS', 'gridIndex' => '2', 'column2' => '2' );
|
||||
//$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '2', 'column2' => '2' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '5', 'column2' => '5' );
|
||||
//$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
//$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'paused':
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
//$rows[] = array( 'name' => 'APP_STATUS', 'gridIndex' => '2', 'column2' => '2' );
|
||||
//$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '2', 'column2' => '2' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '5', 'column2' => '5' );
|
||||
//$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
//$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '9', 'column2' => '9' );
|
||||
//$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'completed':
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
//$rows[] = array( 'name' => 'APP_STATUS', 'gridIndex' => '2', 'column2' => '2' );
|
||||
//$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '2', 'column2' => '2' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '5', 'column2' => '5' );
|
||||
//$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '8', 'column2' => '8' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
//$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '10', 'column2' =>'10' );
|
||||
break;
|
||||
case 'cancelled':
|
||||
$rows[] = array( 'name' => 'APP_UID', 'gridIndex' => '0', 'column2' => '0' );
|
||||
$rows[] = array( 'name' => 'APP_NUMBER', 'gridIndex' => '1', 'column2' => '1' );
|
||||
//$rows[] = array( 'name' => 'APP_STATUS', 'gridIndex' => '2', 'column2' => '2' );
|
||||
//$rows[] = array( 'name' => 'DEL_INDEX', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TITLE', 'gridIndex' => '2', 'column2' => '2' );
|
||||
$rows[] = array( 'name' => 'APP_PRO_TITLE', 'gridIndex' => '3', 'column2' => '3' );
|
||||
$rows[] = array( 'name' => 'APP_TAS_TITLE', 'gridIndex' => '4', 'column2' => '4' );
|
||||
//$rows[] = array( 'name' => 'APP_DEL_PREVIOUS_USER', 'gridIndex' => '7', 'column2' => '7' );
|
||||
$rows[] = array( 'name' => 'DEL_TASK_DUE_DATE', 'gridIndex' => '5', 'column2' => '5' );
|
||||
$rows[] = array( 'name' => 'APP_UPDATE_DATE', 'gridIndex' => '6', 'column2' => '6' );
|
||||
$rows[] = array( 'name' => 'DEL_PRIORITY', 'gridIndex' => '7', 'column2' =>'7' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
$index = count($rows);
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aRow['index'] = ++$index;
|
||||
$aTempRow['name'] = $aRow['FLD_NAME'];
|
||||
$aTempRow['gridIndex'] = $aRow['index'];
|
||||
$aTempRow['column2'] = $aTempRow['gridIndex'];
|
||||
$rows[] = $aTempRow;
|
||||
$oDataset->next();
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
//$jsonResult['records'] = $result;
|
||||
print G::json_encode( $result ) ;
|
||||
} catch (Exception $e) {
|
||||
print G::json_encode ($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ if (class_exists("pmLicenseManager")) {
|
||||
$licStatusMsg = " <font color=\"red\">(" . $licenseStatusInfo["message"] . ")</font>";
|
||||
}
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", "Enterprise Plugins Manager" . $licStatusMsg, "", "", "plugins");
|
||||
$G_TMP_MENU->AddIdRawOption("PMENTERPRISE", "../enterprise/addonsStore", G::LoadTranslation('ID_MENU_NAME') . $licStatusMsg, "", "", "plugins");
|
||||
|
||||
if (isset($pmLicenseManagerO->result) && ($pmLicenseManagerO->result == "OK")) {
|
||||
if (file_exists(PATH_HOME . "engine" . PATH_SEP . "methods" . PATH_SEP . "cases" . PATH_SEP . "casesListExtJs.php")) {
|
||||
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../enterprise/advancedTools/casesListSetup", "Cases Lists", "", "", "settings");
|
||||
$G_TMP_MENU->AddIdRawOption("CASES_LIST_SETUP", "../cases/casesListSetup", G::LoadTranslation('ID_CASES_LIST'), "", "", "settings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,9 +591,7 @@ Ext.onReady ( function() {
|
||||
if( c.dataIndex == 'APP_DEL_PREVIOUS_USER') c.renderer = previous_full_name;
|
||||
if( c.dataIndex == 'APP_CURRENT_USER') c.renderer = full_name;
|
||||
}
|
||||
if (enableEnterprise) {
|
||||
c.header = __('enterprise', _(c.header));
|
||||
}
|
||||
c.header = _(c.header);
|
||||
}
|
||||
|
||||
//adding the hidden field DEL_INIT_DATE
|
||||
|
||||
2
workflow/engine/templates/cases/casesListSetup.html
Normal file
2
workflow/engine/templates/cases/casesListSetup.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<div id="panel"></div>
|
||||
<div id="alt-panel"></div>
|
||||
674
workflow/engine/templates/cases/casesListSetup.js
Normal file
674
workflow/engine/templates/cases/casesListSetup.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user