BUG 0000 User Inbox Simplified (first commit)

This commit is contained in:
Erik Amaru Ortiz
2012-01-20 12:01:02 -04:00
parent 236bdd2d9c
commit 0bade635c1
32 changed files with 15523 additions and 81 deletions

View File

@@ -0,0 +1,235 @@
<?php
/**
* Application controller
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
* @inherits Controller
* @access public
*/
class Home extends Controller
{
private $userID;
private $userName;
private $userFullName;
private $userRolName;
public function __construct()
{
if (isset($_SESSION['USER_LOGGED']) && !empty($_SESSION['USER_LOGGED'])) {
$this->userID = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : null;
$this->userName = isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '';
$this->userFullName = isset($_SESSION['USR_FULLNAME']) ? $_SESSION['USR_FULLNAME'] : '';
$this->userRolName = isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] : '';
}
}
/**
* getting default list
* @param string $httpData (opional)
*/
public function index($httpData)
{
G::LoadClass('process');
G::LoadClass('case');
$process = new Process();
$case = new Cases();
/**
* Getting the user's processes that can start
*/
if (!$case->canStartCase($_SESSION ['USER_LOGGED'])) {
//throw new Exception("User can not start a cases");
}
//Get ProcessStatistics Info
$start = 0;
$limit = '';
$proData = $process->getAllProcesses($start, $limit);
$processList = $case->getStartCasesPerType ( $_SESSION ['USER_LOGGED'], 'category' );
unset($processList[0]);
//$processList = array();
// foreach ( $processListInitial as $key => $procInfo ) {
// if (isset ( $procInfo ['pro_uid'] )) {
// if (trim ( $procInfo ['cat'] ) == "")
// $procInfo ['cat'] = "_OTHER_";
// $processList [$procInfo ['catname']] [$procInfo ['value']] = $procInfo;
// }
// }
//ksort($processList);
//g::pr($processList); die;
$this->setView('home/index');
$this->setVar('usrUid', $this->userID);
$this->setVar('userName', $this->userName);
$this->setVar('processList', $processList);
G::RenderPage('publish', 'mvc');
}
public function init($httpData)
{
require_once ( "classes/model/AppCacheView.php" );
require_once ( "classes/model/Application.php" );
require_once ( "classes/model/AppNotes.php" );
$appCache = new AppCacheView();
$appNotes = new AppNotes();
$start = 0;
$limit = 100;
$notesStart = 0;
$notesLimit = 4;
$httpData->t = isset($httpData->t)? $httpData->t : 'in';
/**
* Getting the user's applications list
*/
//TODO validate user id
// getting user's cases on inbox
switch ($httpData->t) {
case 'in':
$criteria = $appCache->getToDoListCriteria($this->userID);
$title = 'My Inbox';
break;
case 'draft':
default:
$criteria = $appCache->getDraftListCriteria($this->userID); //fast enough
$title = 'My Drafts';
break;
}
//$criteriac = $oAppCache->getToDoCountCriteria($this->userID);
//$criteria->setLimit($limit);
//$criteria->setOffset($start);
//$this->setView('home/index4');
$this->setView('home/index2');
$criteria->addDescendingOrderByColumn(AppCacheViewPeer::APP_NUMBER);
$dataset = AppCacheViewPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$cases = array();
//$data['totalCount'] = $totalCount;
$rows = array();
$priorities = array('1'=>'VL', '2'=>'L', '3'=>'N', '4'=>'H', '5'=>'VH');
$index = $start;
while ($dataset->next()) {
$row = $dataset->getRow();
if (is_numeric(str_replace('#', '', $row['APP_TITLE']))) {
$row['APP_TITLE'] = 'Case ' . str_replace('#', '', $row['APP_TITLE']);
}
// replacing the status data with their respective translation
if (isset($row['APP_STATUS'])) {
$row['APP_STATUS'] = G::LoadTranslation("ID_{$row['APP_STATUS']}");
}
// replacing the priority data with their respective translation
if (isset($row['DEL_PRIORITY'])) {
$row['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$priorities[$row['DEL_PRIORITY']]}");
}
$row['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy at h:i:s');
$notes = $appNotes->getNotesList($row['APP_UID'], $this->userID, $notesStart, $notesLimit);
$notes = $notes['array'];
$row['NOTES_COUNT'] = $notes['totalCount'];
$row['NOTES_LIST'] = $notes['notes'];
$cases[] = $row;
}
//g::pr($cases); die;
// settings vars and rendering
$this->setVar('cases', $cases);
$this->setVar('title', $title);
G::RenderPage('publish', 'mvc');
}
/**
* getting default list
* @param string $httpData (opional)
*/
public function start($httpData)
{
$this->setView('home/index5');
//$this->setVar('id', $httpData->a);
//$this->setVar('index', $httpData->i);
$this->setVar('action', 'todo');
G::RenderPage('publish', 'mvc');
}
public function iframe_3($httpData)
{
$this->setView('home/iframe_3');
//$this->setVar('id', $httpData->a);
//$this->setVar('index', $httpData->i);
$this->setVar('action', 'todo');
G::RenderPage('publish', 'mvc');
}
public function iframe_4($httpData)
{
$this->setView('home/iframe_4');
//$this->setVar('id', $httpData->a);
//$this->setVar('index', $httpData->i);
$this->setVar('action', 'todo');
G::RenderPage('publish', 'mvc');
}
/**
* Private functions
*/
public function startCase($httpData)
{
G::LoadClass('case');
$case = new Cases();
$aData = $case->startCase($httpData->id, $_SESSION['USER_LOGGED']);
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
$_SESSION['INDEX'] = $aData['INDEX'];
$_SESSION['PROCESS'] = $aData['PROCESS'];
$_SESSION['TASK'] = $httpData->id;
$_SESSION['STEP_POSITION'] = 0;
$_SESSION['CASES_REFRESH'] = true;
$oCase = new Cases();
$aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
//../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo
$aNextStep['PAGE'] = '../cases/cases_Open?APP_UID='.$aData['APPLICATION'].'&DEL_INDEX='.$aData['INDEX'].'&action=draft';
$_SESSION ['BREAKSTEP'] ['NEXT_STEP'] = $aNextStep;
G::header('Location: ' . $aNextStep['PAGE']);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<skinConfiguration>
<information>
<id>00000000000000000000000000000002</id>
<name>Symplified</name>
<description>Symplified skin</description>
<author>Erik Amaru Ortiz</author>
<version>1.0</version>
<createDate>2012-01-17</createDate>
<modifiedDate>2012-01-17</modifiedDate>
</information>
<cssFiles>
<skin>
<cssFile file="style.css" enabledBrowsers="ALL" disabledBrowsers=""></cssFile>
<cssFile file="topbar.css" enabledBrowsers="ALL" disabledBrowsers=""></cssFile>
</skin>
</cssFiles>
</skinConfiguration>

View File

@@ -0,0 +1,265 @@
/**
* Main simplified skin styles
* @author Erik Amaru Ortiz <erik@colosa.com>
*/
body {
margin : 0px;
color : #808080;
font : normal 8em sans-serif,Tahoma,MiscFixed;
background-color: #ECECEC;
}
* {
margin: 0;
padding: 0;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
color: #1F98C7;
font-weight: bold;
text-decoration: underline;
}
pre {
font: normal 12px Georgia, "Times New Roman", Times, serif;
}
.global-nav {
position : fixed;
left : 0px;
top : 0px;
width: 100%;
height: 40px;
background-color: #252525;
background-position: 0 0;
/* background-image: url("/images/twitter_web_sprite_bgs.png");
background-repeat: repeat-x;*/
/*background-color: #00A0D1;
background-image: -moz-linear-gradient(#00A0D1, #008DB8); */
bottom: 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 -1px 0 rgba(0, 0, 0, 0.1) inset;
z-index: 0;
}
.bar-nav {
width: 100%;
height: 41px;
}
.global-nav-table {
color: #fff;
/*padding: 5px 5px;*/
}
.global-nav-table-right {
text-align: right;
}
iframe {
overflow:auto;
}
iframe::-webkit-scrollbar {
display: auto;
}
.tooltip {
display:none;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.6);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.6);
box-shadow: 0 1px 2px rgba(0,0,0,0.6);
font-size:12px;
height:70px;
width:160px;
padding:25px;
color:red;
}
/* index2*/
/* number style */
#commentlist {
margin: 10px 0 40px;
padding: 5;
text-align: left;
}
#commentlist li {
padding: 10px 0 20px;
list-style: none;
border-top: solid 1px #ccc;
position: relative;
}
#commentlist cite {
font: bold 140%/110% Arial, Helvetica, sans-serif;
color: #666;
}
#commentlist .time {
color: #ccc;
margin: 0 0 10px;
}
#commentlist .commentnumber {
position: absolute;
right: 0;
top: 8px;
font: normal 200%/100% Georgia, "Times New Roman", Times, serif;
color: #ccc;
}
#commentlist .notes-link {
position: absolute;
right: 0;
top: 38px;
font: normal 200%/100% Georgia, "Times New Roman", Times, serif;
color: #ccc;
}
.list-highlight{
background-color: #e8edf3;
}
.content-header {
background-color: #FFFFFF;
border-bottom: 1px solid #E8E8E8;
border-radius: 5px 5px 0 0;
min-height: 20px;
padding: 12px;
}
.appMessages {
display: none;
background-color: #EBFFFF;
padding: 6px 6px 6px 6px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.appMessage {
border-top: 1px solid #DCDCDC;
border-radius: 2px 2px 2px 2px;
margin: 2px 2px 2px 2px;
padding: 5px 5px 5px 5px;
}
.appMessageDate {
font-size: 1p1x;
margin: 10px 0px 0px 0px;
}
/*
* Confirm ui popup window styles
*/
#confirmOverlay{
width:100%;
height:100%;
position:fixed;
top:0;
left:0;
background:url('/images/simplified/ie.png');
background: -moz-linear-gradient(rgba(11,11,11,0.1), rgba(11,11,11,0.6)) repeat-x rgba(11,11,11,0.2);
background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(11,11,11,0.1)), to(rgba(11,11,11,0.6))) repeat-x rgba(11,11,11,0.2);
z-index:100000;
}
#confirmBox{
background:url('/images/simplified/body_bg.jpg') repeat-x left bottom #e5e5e5;
width: 400px;
position:fixed;
left:50%;
top:50%;
margin:-130px 0 0 -230px;
border: 1px solid rgba(33, 33, 33, 0.6);
-moz-box-shadow: 0 0 2px rgba(255, 255, 255, 0.6) inset;
-webkit-box-shadow: 0 0 2px rgba(255, 255, 255, 0.6) inset;
box-shadow: 0 0 2px rgba(255, 255, 255, 0.6) inset;
}
#confirmBox h1,
#confirmBox p{
font: 20px/1 'Cuprum','Lucida Sans Unicode', 'Lucida Grande', sans-serif;
background:url('/images/simplified/header_bg.jpg') repeat-x left bottom #f5f5f5;
padding: 12px 15px;
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
color:#666;
}
#confirmBox h1{
letter-spacing:0.3px;
color:#888;
}
#confirmBox p{
background:none;
font-size:16px;
line-height:1.4;
padding-top: 10px;
}
#confirmButtons{
padding:15px 0 25px;
text-align:center;
}
#confirmBox .button{
display:inline-block;
background:url('/images/simplified/buttons.png') no-repeat;
color:white;
position:relative;
height: 33px;
font:17px/33px 'Cuprum','Lucida Sans Unicode', 'Lucida Grande', sans-serif;
margin-right: 15px;
padding: 0 35px 0 40px;
text-decoration:none;
border:none;
}
#confirmBox .button:last-child{ margin-right:0;}
#confirmBox .button span{
position:absolute;
top:0;
right:-5px;
background:url('buttons.png') no-repeat;
width:5px;
height:33px
}
#confirmBox .blue{ background-position:left top;text-shadow:1px 1px 0 #5889a2;}
#confirmBox .blue span{ background-position:-195px 0;}
#confirmBox .blue:hover{ background-position:left bottom;}
#confirmBox .blue:hover span{ background-position:-195px bottom;}
#confirmBox .gray{ background-position:-200px top;text-shadow:1px 1px 0 #707070;}
#confirmBox .gray span{ background-position:-395px 0;}
#confirmBox .gray:hover{ background-position:-200px bottom;}
#confirmBox .gray:hover span{ background-position:-395px bottom;}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{header}
<style>
#loading-mask{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
z-index:20000;
background-color:white;
}
#loading{
position:absolute;
left:40%;
top:37%;
padding:2px;
z-index:20001;
height:auto;
}
#loading a {
color:#225588;
}
#loading .loading-indicator{
background:white;
color:#444;
font:bold 13px tahoma,arial,helvetica;
padding:10px;
margin:0;
height:auto;
}
#loading-msg {
font: bold 11px arial,tahoma,sans-serif;
}
</style>
</head>
<body>
<div id="loading-mask" style=""></div>
<div id="loading">
<div class="loading-indicator">
<center>
<img src="/images/gears.gif"/><br />
<span id="loading-msg">Loading styles and images...</span><br />
<a href="http://www.processmaker.com">
<img src="/images/processmaker.logo.jpg" border="0"/>
</a>
</center>
</div>
</div>
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading Core API...';</script>
<script type='text/javascript' src='/js/ext/ext-base.js'></script>
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Extensions';</script>
<!--
<script type='text/javascript' src='/js/ext/wz_jsgraphics.js'></script>
<script type='text/javascript' src='/js/ext/mootools.js'></script>
<script type='text/javascript' src='/js/ext/moocanvas.js'></script>
!-->
<script type='text/javascript' src='/js/ext/draw2d.js'></script>
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
{styles}
{bodyTemplate}
</body>
</html>

View File

@@ -0,0 +1,24 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{$header}
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#999999" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" rightmargin="0">
<table width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="100%" valign="top">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '')
{
G::LoadTemplate($G_TEMPLATE);
}
{/php}
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{header}
</head>
<body>
{bodyTemplate}
</body>
</html>

View File

@@ -0,0 +1,16 @@
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<script type="text/javascript">
{$header}
</script>
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '')
{
G::LoadTemplate($G_TEMPLATE);
}
{/php}
</td>
</tr>
</table>

View File

@@ -0,0 +1,44 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{$header}
</head>
<body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
{if (count($subMenus)>0) }
<tr>
<td >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td width="100%" class="mainMenuBG">{include file= "$tpl_submenu"}</td></tr>
</table>
</td>
</tr>
{/if}
<tr><td id="pm_separator" class="pm_separator"></td></tr>
<tr>
<td width="100%" align="center">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
{/php}
</td>
</tr>
</table>
</td>
</tr>
<tr height="100%">
<td height="100%" valign="bottom">
<div class="Footer">
<div class="content">{$footer}</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,63 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{$header}
</head>
<body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="pm_header" valign="top">
<table width="100%" height="32" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="50%" rowspan="2" valign="top"><img src="{$logo_company}"></td>
<td width="50%" height="16" align="right" valign="top">
<div align="right" class="logout"><small>{php}if ((int)$_SESSION['CASE'] != 0) {{/php}<a href="../tracker/login" class="tableOption">{php}echo G::LoadTranslation('ID_LOGOUT');{/php}</a>{php}}{/php}</small> &nbsp; &nbsp;</div>
</td>
</tr>
<tr>
<td width="50%" height="16" valign="bottom" class="title">
<div align="right"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td width="100%" align="left" class="mainMenu" id="pm_menu">
<table width="70%" cellpadding="0" cellspacing="0" border="0">
<tr><td class="mainMenu">&nbsp;<td>{include file= "$tpl_menu"}</td></tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="left" class="subMenu" id="pm_submenu">
<table width="50%" cellpadding="0" cellspacing="0" border="0">
<tr><td>&nbsp;&nbsp;&nbsp;<td>{include file= "$tpl_submenu"}</td></tr>
</table>
</td>
</tr>
<tr><td id="pm_separator" class="pm_separator"></td></tr>
<tr>
<td width="100%" align="center">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
{/php}
</td>
</tr>
</table>
</td>
</tr>
<tr height="100%">
<td height="100%" valign="bottom">
<div class="Footer">
<div class="content">{$footer}</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,74 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
{$header}
</head>
<body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" id="pm_main_table">
<tr>
<td id="pm_header" valign="top">
<table width="100%" height="32" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="50%" rowspan="2" valign="center"><img src="{$logo_company}"/></td>
<td width="50%" height="16" align="right" valign="top">
<div align="right" class="logout">
<small>
{php}if ((int)$_SESSION['USER_LOGGED'] != 0) {{/php}
{$msgVer}<label class="textBlue">{$userfullname} <a href="../users/myInfo">{$user}</a> | </label>
<a href="{$linklogout}" class="tableOption">{$logout}</a>&nbsp;&nbsp;<br/>
<label class="textBlack"><b>{$rolename}</b> {$workspace_label} <b><u>{$workspace}</u></b> &nbsp; &nbsp; <br/>
{$udate}</label>&nbsp; &nbsp;
{php}}{/php}
</small>
</div>
</td>
</tr>
<tr>
<td width="50%" height="16" valign="bottom" class="title">
<div align="right"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td width="100%" class="mainMenuBG" style="height:25px">
{include file="$tpl_menu"}
</td>
</tr>
{if (count($subMenus)>0) }
<tr>
<td >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td width="100%" class="mainMenuBG">{include file= "$tpl_submenu"}</td></tr>
</table>
</td>
</tr>
{/if}
<tr>
<td width="100%" align="center">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
{/php}
</td>
</tr>
</table>
</td>
</tr>
<tr height="100%">
<td height="100%">
<div class="Footer">
<div class="content">{$footer}</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -3,25 +3,39 @@
global $G_SKIN;
global $G_SKIN_MAIN;
if((!isset($G_SKIN))||($G_SKIN=="")){
$G_SKIN="classic";
}
if($G_SKIN=="green-submenu") $G_SKIN = "submenu";
$skinVariants=array('blank','extjs','raw','tracker','submenu');
$forceTemplateCompile=true;
if(!(in_array(strtolower($G_SKIN), $skinVariants))){
//Only save in session the main SKIN
$forceTemplateCompile=true;
if((isset($_SESSION['currentSkin']))&&($_SESSION['currentSkin']!=$G_SKIN)){
$forceTemplateCompile=true;
}
$_SESSION['currentSkin']=$G_SKIN;
$forceTemplateCompile = true;
$skinVariants = array('blank','extjs','raw','tracker','submenu');
}else{
$_SESSION['currentSkinVariant']=$G_SKIN;
// setting default skin
if (!isset($G_SKIN) || $G_SKIN == "") {
$G_SKIN = "classic";
}
if(!(isset($_SESSION['currentSkin']))) $_SESSION['currentSkin'] = "classic";
$G_SKIN_MAIN=$_SESSION['currentSkin'];
// deprecated submenu type ""green-submenu"" now is mapped to "submenu"
if ($G_SKIN == "green-submenu") {
$G_SKIN = "submenu";
}
if (!(in_array(strtolower($G_SKIN), $skinVariants))) {
//Only save in session the main SKIN
$forceTemplateCompile = true;
if (isset($_SESSION['currentSkin']) && $_SESSION['currentSkin'] != $G_SKIN) {
$forceTemplateCompile = true;
}
$_SESSION['currentSkin']=$G_SKIN;
}
else {
$_SESSION['currentSkinVariant']=$G_SKIN;
}
// setting default skin
if (!isset($_SESSION['currentSkin'])){
$_SESSION['currentSkin'] = "classic";
}
$G_SKIN_MAIN = $_SESSION['currentSkin'];
//Set defaults "classic"
$configurationFile = G::ExpandPath( "skinEngine" ).'base'.PATH_SEP.'config.xml';
@@ -35,39 +49,41 @@ $layoutFileSubmenu = G::ExpandPath( "skinEngine" ).'base'.PATH_SEP.'layout
//Based on requested Skin look if there is any registered with that name
if(strtolower($G_SKIN_MAIN)!="classic"){
if((file_exists(PATH_CUSTOM_SKINS.$G_SKIN_MAIN))&&(is_dir(PATH_CUSTOM_SKINS.$G_SKIN_MAIN))){
//This should have an XML definition and a layout html
$skinObject=PATH_CUSTOM_SKINS.$G_SKIN_MAIN;
$sw_config=file_exists ($skinObject.PATH_SEP.'config.xml');
$sw_layout=file_exists ($skinObject.PATH_SEP.'layout.html');
if ($sw_config && $sw_layout ) {
$configurationFile = $skinObject.PATH_SEP.'config.xml';
$layoutFile = $skinObject.PATH_SEP.'layout.html';
if(file_exists ($skinObject.PATH_SEP.'layout-blank.html')){
$layoutFileBlank = $skinObject.PATH_SEP.'layout-blank.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-extjs.html')){
$layoutFileExtjs = $skinObject.PATH_SEP.'layout-extjs.html' ;
}
if(file_exists ($skinObject.PATH_SEP.'layout-raw.html')){
$layoutFileRaw = $skinObject.PATH_SEP.'layout-raw.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-tracker.html')){
$layoutFileTracker = $skinObject.PATH_SEP.'layout-tracker.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-submenu.html')){
$layoutFileSubmenu = $skinObject.PATH_SEP.'layout-submenu.html';
}
if((file_exists(PATH_CUSTOM_SKINS.$G_SKIN_MAIN))&&(is_dir(PATH_CUSTOM_SKINS.$G_SKIN_MAIN))){
//This should have an XML definition and a layout html
$skinObject=PATH_CUSTOM_SKINS.$G_SKIN_MAIN;
$sw_config=file_exists ($skinObject.PATH_SEP.'config.xml');
$sw_layout=file_exists ($skinObject.PATH_SEP.'layout.html');
if ($sw_config && $sw_layout ) {
$configurationFile = $skinObject.PATH_SEP.'config.xml';
$layoutFile = $skinObject.PATH_SEP.'layout.html';
if(file_exists ($skinObject.PATH_SEP.'layout-blank.html')){
$layoutFileBlank = $skinObject.PATH_SEP.'layout-blank.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-extjs.html')){
$layoutFileExtjs = $skinObject.PATH_SEP.'layout-extjs.html' ;
}
if(file_exists ($skinObject.PATH_SEP.'layout-raw.html')){
$layoutFileRaw = $skinObject.PATH_SEP.'layout-raw.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-tracker.html')){
$layoutFileTracker = $skinObject.PATH_SEP.'layout-tracker.html';
}
if(file_exists ($skinObject.PATH_SEP.'layout-submenu.html')){
$layoutFileSubmenu = $skinObject.PATH_SEP.'layout-submenu.html';
}
}else{
//define a error message.. but continue and show a smooth message
$G_SKIN_MAIN="classic";
}
}else{
//Skin doesn't exist
$G_SKIN_MAIN="classic";
}
else{
//define a error message.. but continue and show a smooth message
$G_SKIN_MAIN="classic";
}
}
else{
//Skin doesn't exist
$G_SKIN_MAIN="classic";
}
}
@@ -78,33 +94,31 @@ $layoutFileTracker = pathInfo($layoutFileTracker);
$layoutFileRaw = pathInfo($layoutFileRaw);
$layoutFileSubmenu = pathInfo($layoutFileSubmenu);
$cssFileName=$G_SKIN_MAIN;
if(($G_SKIN!=$G_SKIN_MAIN)&&(in_array(strtolower($G_SKIN), $skinVariants))){
$cssFileName.="-".$G_SKIN;
$cssFileName = $G_SKIN_MAIN;
if ($G_SKIN != $G_SKIN_MAIN && in_array(strtolower($G_SKIN), $skinVariants)) {
$cssFileName .= "-" . $G_SKIN;
}
if (isset($_GET['debug'])) {
//Render
print "Requested Skin: $G_SKIN<br />";
print "Main Skin: ".$G_SKIN_MAIN;
if(isset($_GET['debug'])){
//if(true){
//Render
print "Requested Skin: $G_SKIN<br />";
print "Main Skin: ".$G_SKIN_MAIN;
print "Rendering... <br />";
print "<b>Configuration file:</b> $configurationFile";
print "<br />";
print "<b>layout file:</b>"; G::pr($layoutFile);
print "<br />";
print "<b>layout Blank file:</b>"; G::pr($layoutFileBlank);
print "<br />";
print "<b>layout ExtJs file:</b>"; G::pr($layoutFileExtjs);
print "<br />";
print "<b>layout Raw file:</b>"; G::pr($layoutFileRaw);
print "<br />";
print "<b>layout Tracker file:</b>"; G::pr($layoutFileTracker);
print "<br />";
print "<b>layout submenu file:</b>"; G::pr($layoutFileSubmenu);
print "Rendering... <br />";
print "<b>Configuration file:</b> $configurationFile";
print "<br />";
print "<b>layout file:</b>"; G::pr($layoutFile);
print "<br />";
print "<b>layout Blank file:</b>"; G::pr($layoutFileBlank);
print "<br />";
print "<b>layout ExtJs file:</b>"; G::pr($layoutFileExtjs);
print "<br />";
print "<b>layout Raw file:</b>"; G::pr($layoutFileRaw);
print "<br />";
print "<b>layout Tracker file:</b>"; G::pr($layoutFileTracker);
print "<br />";
print "<b>layout submenu file:</b>"; G::pr($layoutFileSubmenu);
}
@@ -357,6 +371,37 @@ if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
$smarty->display($layoutFileTracker['basename']);
}
break;
case "mvc": // mvc
G::LoadClass('serverConfiguration');
$oServerConf =& serverConf::getSingleton();
$oHeadPublisher =& headPublisher::getSingleton();
require_once(PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = PATH_SKINS;
$smarty->compile_dir = PATH_SMARTY_C;
$smarty->cache_dir = PATH_SMARTY_CACHE;
$smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
$viewFile = $oHeadPublisher->getContent();
$viewVars = $oHeadPublisher->getVars();
if (strpos($viewFile, '.') === false) {
$viewFile .= '.html';
}
foreach ($viewVars as $key => $value) {
$smarty->assign($key, $value);
}
if (defined('DEBUG') && DEBUG ) {
$smarty->force_compile = true;
}
$smarty->display(PATH_TPL . $viewFile);
break;
default://Render a common page
if (! defined('DB_SYSTEM_INFORMATION'))
define('DB_SYSTEM_INFORMATION', 1);

View File

@@ -0,0 +1,165 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="/js/jquery/css/esmothness/jquery-ui-1.8.17.custom.css" type="text/css">
<link rel="stylesheet" href="/css/simplified.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.8.17.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.confirm.js"></script>
{literal}
<style>
body {
padding-top: 40px !important;
overflow:hidden;
}
</style>
<script>
function resize()
{
var h = $(window).height() - 42;
$('iframe').height(h)
}
function redirect(url)
{
var $iframe = $('#iframex');
$iframe.attr('src', url);
return false;
}
function appStart(id, title)
{
$.confirm({
'title' : 'Start Case Confirmation',
'message' : 'Do you wanna start a new case for:<br /> * <b>"'+title+'"</b>?',
'buttons' : {
'Yes' : {
'class' : 'blue',
'action': function(){
//elem.slideUp();
redirect('home/startCase?id='+id);
}
},
'No' : {
'class' : 'gray',
'action': function(){} // Nothing to do in this case. You can as well omit the action property.
}
}
});
}
</script>
{/literal}
</head>
<body onload="resize()" onresize="resize()" >
<div class="global-nav">
<!-- start topbar -->
<div class="topbar" id="corpBar">
<div class="topbar-bg"></div>
<div class="topbar-inner">
<div class="fixed-container clearfix">
<!-- <a href="" title="_title / Home" accesskey="1" id="logo">_title</a> -->
<ul class="nav primary-nav">
<li class="account">
<a class="menu user-actions" href="#" onclick="redirect('home/init?t=in')" title="My Inbox">
<img alt="A99679add21e8b0704ea5f0fb569572c_mini" src="/images/simplified/in-set-grey.png" />
<!-- <span class="menu-label screen-name">new cases</span> -->
</a>
</li>
<li class="account">
<a class="menu user-actions" href="#" onclick="redirect('home/init?t=draft')" title="My Drafts">
<img alt="A99679add21e8b0704ea5f0fb569572c_mini" src="/images/simplified/folder-grey.png" />
<!-- <span class="menu-label screen-name">new cases</span> -->
</a>
</li>
<li class="account">
<a class="menu user-actions" href="#">
<img alt="A99679add21e8b0704ea5f0fb569572c_mini" src="/images/simplified/plus-set-grey.png" title="Start a new Application"/>
<!-- <span class="menu-label screen-name">new cases</span> -->
</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" id="settings_link">{$proc.value}</a>
</li>
{/foreach}
</ul>
</li>
</ul>
<ul class="nav secondary-nav">
<li class="account">
<a class="menu user-photo" href="#">
<img alt="user_avatar_mini" height="24" src="users/users_ViewPhotoGrid?pUID={$usrUid}" width="24" />
<span class="menu-label screen-name">{$userName}</span>
</a>
<ul class="menu-dropdown">
<!--<li><a href="#" accesskey="s" id="settings_link">Settings</a></li>
<li><a href="#" accesskey="?" id="help_link">Help</a></li>-->
<li><a href="login/login" accesskey="l" id="sign_out_link">Sign out</a></li>
</ul>
</li>
</ul>
</div> <!-- /fixed-container -->
</div> <!-- /topbar-inner -->
</div>
<!-- end topbar -->
</div>
<iframe id="iframex" name="iframex" src="home/init" width="100%" height="200" scrolling="yes" frameborder="0"></iframe>
{literal}
<script type="text/javascript">
// Javascript to toggle the dropdowns
$(document).ready(function(){
// Dropdowns
$("body").bind("click", function(e) {
$("ul.menu-dropdown").hide();
$('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide();
});
$("a.menu").click(function() {
if ($(this).parent("li").hasClass("open")) {
$(this).parent("li").removeClass("open");
$(this).siblings("ul.menu-dropdown").hide();
} else {
$(this).parent("li").addClass("open");
$(this).siblings("ul.menu-dropdown").show();
}
$(this).parent("li").siblings("li").children("ul.menu-dropdown").hide();
$(this).parent("li").siblings("li").removeClass("open");
return false;
});
// To hide some actived menu clicking on inner iframe content
$('iframe').load(function(){
var iframeDoc = $('iframe').contents().get(0);
// Bind event to iframe document
$(iframeDoc).bind('click', function( event ) {
$("ul.menu-dropdown").hide();
$('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide();
});
})
});
</script>
{/literal}
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
<link rel="stylesheet" href="/css/simplified.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
{literal}
<style>
body {
/*width: 500px;*/
margin: 10px auto;
/*color: #999;*/
font: 90%/150% Arial, Helvetica, sans-serif;
/*margin : 0px;*/
color : #808080;
/*font : normal 8pt sans-serif,Tahoma,MiscFixed;*/
background-color:#ECECEC;
}
</style>
<script>
function resize()
{
var h = $(document.body).height() - 52;
var w = $(document.body).width();
if (w > 600) {
w = 600;
}
$('.content-header').width(w-50);
}
function showNt(appNum)
{
var d = $('#m_'+appNum);
if (d.css('display') == 'block') {
d.hide('slow');
}
else {
d.show('slow');
}
}
</script>
{/literal}
</head>
<body onload="resize()" onresize="resize()" >
<center>
<div class="content-header" style="text-align:left">
<h1 style="padding: 10px">{$title}</h1>
<ul id="commentlist">
{foreach from=$cases key=id item=APP}
<li>
<!-- <span class="messages-link"></span> -->
<span class="commentnumber">
#{$APP.APP_NUMBER}
</span>
{if $APP.NOTES_COUNT neq 0}
<span class="notes-link">
<a href="#" onclick="showNt('{$APP.APP_NUMBER}'); return false;"><img src="/images/simplified/messages-grey.png" height="20" width="20"></a>
</span>
{/if}
<p>
<cite>
<a href="../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo">{$APP.APP_TITLE}</a>
</cite>
</p>
<p class="time">{$APP.DEL_DELEGATE_DATE}<!-- February 8th, 2009 at 5:38 am --></p>
<p>{$APP.APP_PRO_TITLE}
<br/>{$APP.APP_TAS_TITLE}</p>
<div id="m_{$APP.APP_NUMBER}" class="appMessages">
{if $APP.NOTES_COUNT neq 0}
{foreach from=$APP.NOTES_LIST key=k item=NOTE}
<div class="appMessage">
<table border="0">
<tr>
<td width="50" valign="top">
<img border="0" src="../users/users_ViewPhotoGrid?pUID={$NOTE.USR_UID}" width="40" height="40"/>
</td>
<td>
<h3>{$NOTE.USR_FIRSTNAME} {$NOTE.USR_LASTNAME} ({$NOTE.USR_USERNAME})</h3>
<p><pre>{$NOTE.NOTE_CONTENT}</pre>
<div class="appMessageDate">Posted at {$NOTE.NOTE_DATE}</div>
</td>
</tr>
</table>
</div>
{/foreach}
{/if}
</div>
</li>
{/foreach}
</ul>
</div>
</center>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB