fixes in advanced search list to open case

This commit is contained in:
erik
2011-03-18 19:34:14 -04:00
parent 8c441fe1e7
commit 047eec3996
3 changed files with 39 additions and 2 deletions

View File

@@ -92,6 +92,38 @@ try {
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
exit;
}
/**
* these routine is to verify if the case was acceded from advaced search list
*/
if( $_action == 'search' ) {
//verify if the case is with teh current user
$c = new Criteria('workflow');
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
$c->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
$oDataset = AppDelegationPeer::doSelectRs($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aData = $oDataset->getRow();
if ( $aData['USR_UID'] != $_SESSION['USER_LOGGED'] &&
$aData['USR_UID'] != "" //distinct "" for selfservice
) {
//so we show just the resume
$_SESSION['alreadyDerivated'] = true;
//the case is paused show only the resume
$_SESSION['APPLICATION'] = $sAppUid;
$_SESSION['INDEX'] = $iDelIndex;
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = -1;
$_SESSION['STEP_POSITION'] = 0;
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
exit;
}
}
//proceed and try to open the case
$oAppDelegation = new AppDelegation();

View File

@@ -83,7 +83,12 @@
/* Render page */
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, $actions)");
if( isset($_SESSION['alreadyDerivated']) && $_SESSION['alreadyDerivated'] == true )
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, true)");
else
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, $actions)");
$oHeadPublisher->addScriptCode('
var Cse = {};
Cse.panels = {};

View File

@@ -160,7 +160,7 @@
}
#end trigger debug session.......
$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
//$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
//Save data - Start
$oCase->updateCase ( $_SESSION['APPLICATION'], $Fields );