Merge pull request #392 from marcoAntonioNina/BUG-8853

BUG 8853 Adding the cases from "unassigned Folder" to simplified... SOLVED
This commit is contained in:
julceslauhub
2012-07-25 09:06:19 -07:00
4 changed files with 85 additions and 63 deletions

View File

@@ -60,7 +60,6 @@ class Home extends Controller
$this->setVar('skin', $skin);
$this->setView("home/$template");
$this->render();
}
@@ -168,7 +167,6 @@ class Home extends Controller
$_SESSION['PROCESS'] = $lastApp['PRO_UID'];
$_SESSION['TASK'] = $lastApp['TAS_UID'];
$steps = $apps->getSteps($lastApp['APP_UID'], $lastApp['DEL_INDEX'], $lastApp['TAS_UID'], $lastApp['PRO_UID']);
$lastStep = array_pop($steps);
$lastStep['title'] = G::LoadTranslation('ID_FINISH');
@@ -191,9 +189,18 @@ class Home extends Controller
// setting main list title
switch ($httpData->t) {
case 'todo' : $title = 'My Inbox'; break;
case 'draft' : $title = 'My Drafts'; break;
default: $title = ucwords($httpData->t);
case 'todo':
$title = 'My Inbox';
break;
case 'draft':
$title = 'My Drafts';
break;
case 'unassigned':
$title = 'Unassigned Inbox';
break;
default:
$title = ucwords($httpData->t);
break;
}
// getting apps data

View File

@@ -2,9 +2,15 @@
global $G_TMP_MENU;
global $RBAC;
$G_TMP_MENU->AddIdRawOption("S_HOME", "home/appList?t=todo", G::LoadTranslation("ID_HOME"), "/images/simplified/in-set-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_HOME", "home/appList?t=todo", G::LoadTranslation("ID_HOME"),
"/images/simplified/in-set-grey.png", null, null, null);
if ($RBAC->userCanAccess("PM_CASES") == 1) {
$G_TMP_MENU->AddIdRawOption("S_DRAFT", "home/appList?t=draft", G::LoadTranslation("ID_DRAFT"), "/images/simplified/folder-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"), "/images/simplified/plus-set-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_DRAFT", "home/appList?t=draft", G::LoadTranslation("ID_DRAFT"),
"/images/simplified/folder-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_UNASSIGNED", "home/appList?t=unassigned", G::LoadTranslation("ID_UNASSIGNED"),
"/images/simplified/folder-grey3.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"),
"/images/simplified/plus-set-grey.png", null, null, null);
}

View File

@@ -40,34 +40,43 @@ switch ($RBAC->userCanAccess('PM_CASES'))
}
if ( isset ( $_POST['form']['BTN_CANCEL'] ) ) {
if (isset($_POST['form']['BTN_CANCEL'])) {
header ( "Location: ../cases/main");
die;
}
}
/* Includes */
G::LoadClass('case');
/* Includes */
G::LoadClass('case');
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
//if there are no user in the delegation row, this case is still in selfservice
if ( $aDelegation['USR_UID'] == "" ) {
//if there are no user in the delegation row, this case is still in selfservice
if ( $aDelegation['USR_UID'] == "" ) {
$oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] );
}
else {
} else {
G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');
}
}
die('<script type="text/javascript">
$validation = (SYS_SKIN != 'uxs')? 'true' : 'false';
die('<script type="text/javascript">
if ('.$validation.') {
if (window.parent.frames.length != 0) {
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] .
'&action=unassigned";
} else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
}
else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
} else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
}
</script>');
</script>'
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB