Merge branch '2.0' of git.colosa.net:processmaker into 2.0

This commit is contained in:
Carlos Pacha
2011-03-30 10:40:25 -04:00
15 changed files with 916 additions and 923 deletions

View File

@@ -395,7 +395,7 @@
$caseColumns[] = array( 'header' => 'PreUsrUid', 'dataIndex' => 'PREVIOUS_USR_UID', 'width' => 50, 'hidden'=> true, 'hideable'=> false);
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_PROCESS'), 'dataIndex' => 'APP_PRO_TITLE', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_TASK'), 'dataIndex' => 'APP_TAS_TITLE', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_CURRENT_USER'),'dataIndex' => 'APP_CURRENT_USER', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_LAST_MODIFY'), 'dataIndex' => 'APP_UPDATE_DATE', 'width' => 80 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_STATUS'), 'dataIndex' => 'APP_STATUS', 'width' => 50 );
@@ -430,7 +430,7 @@
$caseColumns[] = array( 'header' => 'PreUsrUid', 'dataIndex' => 'PREVIOUS_USR_UID', 'width' => 50 , 'hidden'=> true, 'hideable'=> false);
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_TASK'), 'dataIndex' => 'APP_TAS_TITLE', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_PROCESS'), 'dataIndex' => 'APP_PRO_TITLE', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_CURRENT_USER'), 'dataIndex' => 'APP_CURRENT_USER', 'width' => 120 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_LAST_MODIFY'), 'dataIndex' => 'APP_UPDATE_DATE', 'width' => 80 );
$caseColumns[] = array( 'header' => G::LoadTranslation('ID_DELEGATION_DATE'),'dataIndex' => 'DEL_DELEGATE_DATE', 'width' => 80 );

View File

@@ -216,6 +216,9 @@ function startCase() {
if (isset ( $_SESSION ['TASK'] )) unset ( $_SESSION ['TASK'] );
if (isset ( $_SESSION ['INDEX'] )) unset ( $_SESSION ['INDEX'] );
if (isset ( $_SESSION ['STEP_POSITION'] )) unset ( $_SESSION ['STEP_POSITION'] );
if (isset ( $_SESSION ['START_NEW_CASE'] )) unset ( $_SESSION ['START_NEW_CASE'] );
//echo 'Start new case<br />';
/* Process */
try {
@@ -224,6 +227,7 @@ function startCase() {
lookinginforContentProcess($_POST['processId']);
$aData = $oCase->startCase ( $_REQUEST ['taskId'], $_SESSION ['USER_LOGGED'] );
$_SESSION ['APPLICATION'] = $aData ['APPLICATION'];
$_SESSION ['INDEX'] = $aData ['INDEX'];
$_SESSION ['PROCESS'] = $aData ['PROCESS'];
@@ -240,6 +244,8 @@ function startCase() {
$_SESSION ['BREAKSTEP'] ['NEXT_STEP'] = $aNextStep;
$aData ['openCase'] = $aNextStep;
$aData ['NewDynaform'] = true; //Sets New Dynaform value
$aData ['status'] = 'success';
print (G::json_encode ( $aData )) ;
}

View File

@@ -42,6 +42,9 @@ if( $RBAC->userCanAccess('PM_CASES') != 1 ) {
require_once 'classes/model/AppDelay.php';
G::LoadClass('case');
//Clean NEW_CASE session variable if case isn't new.
if ($_GET['new']!='yes') $_SESSION['NEW_CASE'] = '';
$oCase = new Cases();
//cleaning the case session data

View File

@@ -46,6 +46,15 @@
if( isset($_GET['APP_UID']) && isset($_GET['DEL_INDEX'])) {
$case = $oCase->loadCase($_GET['APP_UID'], $_GET['DEL_INDEX']);
$appNum = $case['APP_TITLE'];
//Sets NEW_CASE session variable when we're starting a new case
if (isset($_GET['new'])){
if ($_GET['new']=='yes'){
$_SESSION['NEW_CASE'] = 'New';
}else{
$_SESSION['NEW_CASE'] = '';
}
}
}
if (!isset($_GET['to_revise'])){

View File

@@ -328,14 +328,14 @@
if( isset($aRow['DEL_PRIORITY']) ){
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
}
/* For participated cases, we want the last step in the case, not only
* the last step this user participated. To do that we get every case
* information again for the last step. (This could be solved by a subquery,
* but Propel might not support it and subqueries can be slower for larger
* datasets).
*/
if ($action == 'sent') {
if ($action == 'sent' || $action == 'search') {
$maxCriteria = new Criteria('workflow');
$maxCriteria->add(AppCacheViewPeer::APP_UID, $aRow['APP_UID'], Criteria::EQUAL);
$maxCriteria->addDescendingOrderByColumn(AppCacheViewPeer::DEL_INDEX);
@@ -354,6 +354,9 @@
$maxDataset->close();
}
if (!isset($aRow['APP_CURRENT_USER']))
$aRow['APP_CURRENT_USER'] = "[Unassigned]";
$rows[] = $aRow;
$oDataset->next();
}