BUG 9294 "Simplified experience plugins" SOLVED

- Request to enable and show the new submenus that have been created
  with plug-ins in the Simplified user experience.
- Code added for show the new submenus that have been created
  with plug-ins
This commit is contained in:
Victor Saisa Lopez
2012-06-14 16:03:30 -04:00
parent 1899262440
commit 7b5deb054b
3 changed files with 58 additions and 12 deletions

View File

@@ -86,7 +86,6 @@ class Home extends Controller
G::loadClass('system');
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
//Get ProcessStatistics Info
$start = 0;
$limit = '';
@@ -102,6 +101,33 @@ class Home extends Controller
unset($processList[0]);
//Get simplified options
global $G_TMP_MENU;
$mnu = new Menu();
$mnu->load('simplified');
$arrayMnuOption = array();
$mnuNewCase = array();
if (!empty($mnu->Options)) {
foreach ($mnu->Options as $index => $value) {
$option = array(
'id' => $mnu->Id[$index],
'url' => $mnu->Options[$index],
'label' => $mnu->Labels[$index],
'icon' => $mnu->Icons[$index],
'class' => $mnu->ElementClass[$index]
);
if ($mnu->Id[$index] != 'S_NEW_CASE') {
$arrayMnuOption[] = $option;
}
else {
$mnuNewCase = $option;
}
}
}
$this->setView('home/index');
$this->setVar('usrUid', $this->userID);
@@ -111,6 +137,8 @@ class Home extends Controller
$this->setVar('userUxType', $this->userUxType);
$this->setVar('clientBrowser', $this->clientBrowser['name']);
$this->setVar('switchLink', $switchLink);
$this->setVar('arrayMnuOption', $arrayMnuOption);
$this->setVar('mnuNewCase', $mnuNewCase);
$this->render();
}

View File

@@ -0,0 +1,10 @@
<?php
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);
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);
}

View File

@@ -86,29 +86,37 @@
<!-- <a href="" title="_title / Home" accesskey="1" id="logo">_title</a> -->
<ul class="nav primary-nav">
<!--
<li class="account">
<a class="menu user-actions active" href="#" onclick="redirect('home/appList?t=todo');" title="My Inbox">
<img alt="" src="/images/simplified/in-set-grey.png" id="inboxOp" />
-->
<!-- <span class="menu-label screen-name">new cases</span> -->
<!--
</a>
</li>
-->
{if $canStartCase neq false}
<li class="account">
<a class="menu user-actions" href="#" onclick="redirect('home/appList?t=draft');" title="My Drafts">
<img alt="" src="/images/simplified/folder-grey.png" />
</a>
</li>
{if count($arrayMnuOption) > 0}
{foreach from=$arrayMnuOption key=index item=option}
<li class="account">
<a class="menu user-actions" href="javascript:;" onclick="redirect('{$option.url}');" title="{$option.label}">
<img src="{$option.icon}" alt="" />
</a>
</li>
{/foreach}
{/if}
{if $canStartCase neq false && count($mnuNewCase) > 0}
<li class="account">
<a class="menu user-actions" href="#" title="New Case" id="_new">
<img alt="" src="/images/simplified/plus-set-grey.png"/>
<a class="menu user-actions" href="javascript:;" title="{$mnuNewCase.label}" id="_new">
<img src="{$mnuNewCase.icon}" alt="" />
</a>
<ul class="menu-dropdown" style="width: 360px">
{foreach from=$processList key=id item=proc}
<li>
<a href="#" onclick="appStart('{$proc.uid}', '{$proc.value}')" accesskey="s" title="" id="settings_link">{$proc.value}</a>
<a href="javascript:;" onclick="appStart('{$proc.uid}', '{$proc.value}')" accesskey="s" title="" id="settings_link">{$proc.value}</a>
</li>
{/foreach}
</ul>
@@ -118,7 +126,7 @@
<ul class="nav secondary-nav">
<li class="account">
<a class="menu user-photo" href="#">
<a class="menu user-photo" href="javascript:;">
<img alt="user_avatar_mini" height="24" src="users/users_ViewPhotoGrid?pUID={$usrUid}" width="24" />
<span class="menu-label screen-name">{$userName}</span>
</a>