Merge remote branch 'upstream/master' into BUG-9191

This commit is contained in:
Hector Cortez
2012-07-06 17:40:51 -04:00
4 changed files with 133 additions and 120 deletions

View File

@@ -222,46 +222,49 @@ class Home extends Controller
$this->render();
}
public function getAppsData($type, $start=null, $limit=null)
{
require_once ( "classes/model/AppNotes.php" );
G::LoadClass('applications');
public function getAppsData($type, $start=null, $limit=null)
{
require_once ( "classes/model/AppNotes.php" );
G::LoadClass('applications');
$apps = new Applications();
$appNotes = new AppNotes();
$apps = new Applications();
$appNotes = new AppNotes();
$start = empty($start) ? $this->appListStart : $start;
$limit = empty($limit) ? $this->appListLimit : $limit;
$start = empty($start) ? $this->appListStart : $start;
$limit = empty($limit) ? $this->appListLimit : $limit;
$notesStart = 0;
$notesLimit = 4;
$notesStart = 0;
$notesLimit = 4;
$cases = $apps->getAll($this->userID, $start, $limit, $type);
//g::pr($cases['data']); die;
$cases = $apps->getAll($this->userID, $start, $limit, $type);
//g::pr($cases['data']); die;
// formating & complitting apps data with 'Notes'
foreach ($cases['data'] as $i => $row) {
// Formatting
$appTitle = str_replace('#', '', $row['APP_TITLE']);
// formating & complitting apps data with 'Notes'
foreach ($cases['data'] as $i => $row) {
// Formatting
$appTitle = str_replace('#', '', $row['APP_TITLE']);
if (is_numeric($appTitle)) {
$cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle;
}
if (is_numeric($appTitle)) {
$cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle;
}
$cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy - h:i:s');
$cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']);
// Completting with Notes
$notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
$notes = $notes['array'];
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
if (isset($row['DEL_DELEGATE_DATE'])) {
$cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'],
'M d, yyyy - h:i:s');
}
if (isset($row['APP_DEL_PREVIOUS_USER'])) {
$cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']);
}
// Completting with Notes
$notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
$notes = $notes['array'];
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
}
return $cases;
}
return $cases;
}
public function startCase($httpData)
{
G::LoadClass('case');
@@ -296,4 +299,4 @@ class Home extends Controller
$this->setView($tpl);
$this->render();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="Objectpm" width="100%" type="pagedtable" menu="">
<dynaForm name="Objectpm" menu="processes/processes_ListPublicMenu" width="100%" type="pagedtable">
<title type="text" colWidth="160">
<en>Title</en>
@@ -40,4 +40,4 @@
<en/>
</LINK>
</dynaForm>
</dynaForm>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu">
<BackList type="link" link="../processes/mainInit" colAlign="left" colWidth="100">
<en>Back</en>
</BackList>
<PAGE type="hidden" value="1"/>
<PAGED_TABLE_ID type="private"/>
</dynaForm>