diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index 3e9f932f2..4cf844910 100755 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -60,7 +60,6 @@ class Home extends Controller $this->setVar('skin', $skin); $this->setView("home/$template"); - $this->render(); } @@ -167,8 +166,7 @@ class Home extends Controller $_SESSION['APPLICATION'] = $lastApp['APP_UID']; $_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'); @@ -184,35 +182,44 @@ class Home extends Controller $this->render(); } - public function appList($httpData) - { - // setting default list applications types [default: todo] - $httpData->t = isset($httpData->t)? $httpData->t : 'todo'; + public function appList($httpData) + { + // setting default list applications types [default: todo] + $httpData->t = isset($httpData->t)? $httpData->t : 'todo'; - // setting main list title - switch ($httpData->t) { - case 'todo' : $title = 'My Inbox'; break; - case 'draft' : $title = 'My Drafts'; break; - default: $title = ucwords($httpData->t); + // setting main list title + switch ($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 + $cases = $this->getAppsData($httpData->t); + + // settings html template + $this->setView('home/appList'); + + // settings vars and rendering + $this->setVar('cases', $cases['data']); + $this->setVar('cases_count', $cases['totalCount']); + $this->setVar('title', $title); + $this->setVar('appListStart', $this->appListLimit); + $this->setVar('appListLimit', 10); + $this->setVar('listType', $httpData->t); + + $this->render(); } - // getting apps data - $cases = $this->getAppsData($httpData->t); - - // settings html template - $this->setView('home/appList'); - - // settings vars and rendering - $this->setVar('cases', $cases['data']); - $this->setVar('cases_count', $cases['totalCount']); - $this->setVar('title', $title); - $this->setVar('appListStart', $this->appListLimit); - $this->setVar('appListLimit', 10); - $this->setVar('listType', $httpData->t); - - $this->render(); - } - public function getApps($httpData) { $cases = $this->getAppsData($httpData->t, $httpData->start, $httpData->limit); diff --git a/workflow/engine/menus/simplified.php b/workflow/engine/menus/simplified.php index 6b7e47297..46fa1a806 100644 --- a/workflow/engine/menus/simplified.php +++ b/workflow/engine/menus/simplified.php @@ -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); } + diff --git a/workflow/engine/methods/cases/cases_CatchExecute.php b/workflow/engine/methods/cases/cases_CatchExecute.php index 2553c59f7..6458b1e4d 100755 --- a/workflow/engine/methods/cases/cases_CatchExecute.php +++ b/workflow/engine/methods/cases/cases_CatchExecute.php @@ -27,47 +27,56 @@ /* Permissions */ switch ($RBAC->userCanAccess('PM_CASES')) { - case -2: - G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels'); - G::header('location: ../login/login'); - die; - break; - case -1: - G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); - G::header('location: ../login/login'); - die; - break; + case -2: + G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels'); + G::header('location: ../login/login'); + die; + break; + case -1: + G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); + G::header('location: ../login/login'); + die; + break; } - 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); - - //if there are no user in the delegation row, this case is still in selfservice - if ( $aDelegation['USR_UID'] == "" ) { +$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'] == "" ) { $oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] ); - } - else { +} else { G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error'); - } +} - die(''); + } else { + window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . + $_SESSION['INDEX'] . '&action=unassigned"; + } + ' +); + diff --git a/workflow/public_html/images/simplified/folder-grey3.png b/workflow/public_html/images/simplified/folder-grey3.png new file mode 100644 index 000000000..185f70c42 Binary files /dev/null and b/workflow/public_html/images/simplified/folder-grey3.png differ