BUG 8853 Adding the cases from "unassigned Folder" to simplified... SOLVED

- No had this option.
- Was added the functionality Unassigned Inbox.
This commit is contained in:
Marco Antonio Nina
2012-07-25 10:44:00 -04:00
parent fbdf3b1eec
commit 0564efebbe
4 changed files with 52 additions and 33 deletions

View File

@@ -58,6 +58,8 @@ class Home extends Controller
$this->setVar('usr', $data['u']); $this->setVar('usr', $data['u']);
$this->setVar('pwd', $data['p']); $this->setVar('pwd', $data['p']);
$this->setVar('skin', $skin); $this->setVar('skin', $skin);
echo "<br><br>Este es el template<br><br>";
echo $template;
$this->setView("home/$template"); $this->setView("home/$template");
@@ -193,6 +195,7 @@ class Home extends Controller
switch ($httpData->t) { switch ($httpData->t) {
case 'todo' : $title = 'My Inbox'; break; case 'todo' : $title = 'My Inbox'; break;
case 'draft' : $title = 'My Drafts'; break; case 'draft' : $title = 'My Drafts'; break;
case 'unassigned' : $title = 'Unassigned Inbox'; break;
default: $title = ucwords($httpData->t); default: $title = ucwords($httpData->t);
} }
@@ -209,7 +212,7 @@ class Home extends Controller
$this->setVar('appListStart', $this->appListLimit); $this->setVar('appListStart', $this->appListLimit);
$this->setVar('appListLimit', 10); $this->setVar('appListLimit', 10);
$this->setVar('listType', $httpData->t); $this->setVar('listType', $httpData->t);
//print_r($this->render());
$this->render(); $this->render();
} }

View File

@@ -2,9 +2,15 @@
global $G_TMP_MENU; global $G_TMP_MENU;
global $RBAC; 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) { 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_DRAFT", "home/appList?t=draft", G::LoadTranslation("ID_DRAFT"),
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"), "/images/simplified/plus-set-grey.png", null, null, null); "/images/simplified/folder-grey.png", null, null, null);
$G_TMP_MENU->AddIdRawOption("S_DRAFT", "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

@@ -27,47 +27,57 @@
/* Permissions */ /* Permissions */
switch ($RBAC->userCanAccess('PM_CASES')) switch ($RBAC->userCanAccess('PM_CASES'))
{ {
case -2: case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels'); G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login'); G::header('location: ../login/login');
die; die;
break; break;
case -1: case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login'); G::header('location: ../login/login');
die; die;
break; break;
} }
if ( isset ( $_POST['form']['BTN_CANCEL'] ) ) { if (isset($_POST['form']['BTN_CANCEL'])) {
header ( "Location: ../cases/main"); header ( "Location: ../cases/main");
die; die;
} }
/* Includes */ /* Includes */
G::LoadClass('case'); G::LoadClass('case');
$oCase = new Cases(); $oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION']; $sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX']; $iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation(); $oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex); $aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
//if there are no user in the delegation row, this case is still in selfservice //if there are no user in the delegation row, this case is still in selfservice
if ( $aDelegation['USR_UID'] == "" ) { if ( $aDelegation['USR_UID'] == "" ) {
$oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] ); $oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] );
} } else {
else {
G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error'); 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) { 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 { else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned"; window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
} }
</script>'); } else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
}
</script>'
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB