BUG 0000 BUG 0000 User Inbox Simplified (th commit)
This commit is contained in:
@@ -68,14 +68,29 @@ class Home extends Controller
|
||||
|
||||
public function appList($httpData)
|
||||
{
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
$appNotes = new AppNotes();
|
||||
|
||||
$httpData->t = isset($httpData->t)? $httpData->t : 'in';
|
||||
$title = $httpData->t != 'draft' ? 'My Inbox' : 'My Drafts';
|
||||
$action = $httpData->t != 'draft' ? 'todo' : 'draft';
|
||||
|
||||
$notesStart = 0;
|
||||
$notesLimit = 4;
|
||||
|
||||
//$cases = self::getAppList($httpData->t, $this->appListStart, $this->appListLimit);
|
||||
|
||||
G::LoadClass('applications');
|
||||
$apps = new Applications();
|
||||
$cases = $apps->getAll($this->appListStart, $this->appListLimit, $action);
|
||||
|
||||
foreach ($cases['data'] as $i => $row) {
|
||||
$notes = $appNotes->getNotesList($row['APP_UID'], $this->userID, $notesStart, $notesLimit);
|
||||
$notes = $notes['array'];
|
||||
|
||||
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
|
||||
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
|
||||
}
|
||||
|
||||
// settings html template
|
||||
$this->setView('home/appList');
|
||||
@@ -85,7 +100,8 @@ class Home extends Controller
|
||||
$this->setVar('cases_count', $cases['totalCount']);
|
||||
$this->setVar('title', $title);
|
||||
$this->setVar('appListStart', $this->appListLimit);
|
||||
$this->setVar('appListLimit', 5);
|
||||
$this->setVar('appListLimit', 10);
|
||||
$this->setVar('listType', $httpData->t);
|
||||
|
||||
G::RenderPage('publish', 'mvc');
|
||||
}
|
||||
@@ -94,7 +110,24 @@ class Home extends Controller
|
||||
{
|
||||
G::LoadClass('applications');
|
||||
$apps = new Applications();
|
||||
$cases = $apps->getAll($httpData->start, $httpData->limit);
|
||||
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
$appNotes = new AppNotes();
|
||||
|
||||
$notesStart = 0;
|
||||
$notesLimit = 4;
|
||||
|
||||
$action = $httpData->t != 'draft' ? 'todo' : 'draft';
|
||||
|
||||
$cases = $apps->getAll($httpData->start, $httpData->limit, $action);
|
||||
|
||||
foreach ($cases['data'] as $i => $row) {
|
||||
$notes = $appNotes->getNotesList($row['APP_UID'], $this->userID, $notesStart, $notesLimit);
|
||||
$notes = $notes['array'];
|
||||
|
||||
$cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
|
||||
$cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
|
||||
}
|
||||
|
||||
$this->setView('home/applications');
|
||||
|
||||
|
||||
@@ -158,8 +158,8 @@
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 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);
|
||||
/*-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.6);*/
|
||||
/*-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.6);*/
|
||||
min-height: 20px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
$("#loadmorebutton").click(function (){
|
||||
$('#loadmorebutton').html('<img src="/images/ajax-loader.gif" />');
|
||||
$.ajax({
|
||||
url: "getApps?start="+appListStart+"&limit="+appListLimit,
|
||||
url: "getApps?t="+listType+"&start="+appListStart+"&limit="+appListLimit,
|
||||
success: function(html){
|
||||
appListStart += appListLimit;
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
|
||||
var appListLimit = {$appListLimit};
|
||||
var appListStart = {$appListStart};
|
||||
var listType = '{$listType}';
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
</span>
|
||||
|
||||
<span id="n_{$APP.APP_UID}" class="notes-link" style="display:{if $APP.NOTES_COUNT neq 0}block{else}none{/if}">
|
||||
<a href="#" onclick="showNt('{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey.png" height="20" width="20"></a>
|
||||
<a href="#" onclick="showNt('{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey.png" height="20" width="20" border="0"></a>
|
||||
</span>
|
||||
|
||||
<span class="notes-plus-link">
|
||||
<a href="#" onclick="addNt('{$APP.APP_UID}', '{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey-plus.png" height="21" width="21"></a>
|
||||
<a href="#" onclick="addNt('{$APP.APP_UID}', '{$APP.APP_UID}'); return false;"><img src="/images/simplified/messages-grey-plus.png" height="21" width="21" border="0"></a>
|
||||
</span>
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user