function showOppNotesTabAction() { @($opp_id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer')); $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = dirname(dirname(__FILE__)) . '/templates/'; $tpl->assign('path', $tpl_path); $opp = DAO_CrmOpportunity::get($opp_id); $tpl->assign('opp', $opp); list($notes, $null) = DAO_Note::search(array(new DevblocksSearchCriteria(SearchFields_Note::SOURCE_EXT_ID, '=', CrmNotesSource_Opportunity::ID), new DevblocksSearchCriteria(SearchFields_Note::SOURCE_ID, '=', $opp->id)), 25, 0, DAO_Note::CREATED, false, false); $tpl->assign('notes', $notes); $active_workers = DAO_Worker::getAllActive(); $tpl->assign('active_workers', $active_workers); $workers = DAO_Worker::getAllWithDisabled(); $tpl->assign('workers', $workers); $tpl->display('file:' . $tpl_path . 'crm/opps/display/tabs/notes.tpl'); }
function showTaskNotesTabAction() { @($task_id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer')); $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = dirname(dirname(dirname(__FILE__))) . '/templates/'; $tpl->assign('path', $tpl_path); $visit = CerberusApplication::getVisit(); // $visit->set(self::SESSION_OPP_TAB, 'notes'); $task = DAO_Task::get($task_id); $tpl->assign('task', $task); list($notes, $null) = DAO_Note::search(array(new DevblocksSearchCriteria(SearchFields_Note::SOURCE_EXT_ID, '=', ChNotesSource_Task::ID), new DevblocksSearchCriteria(SearchFields_Note::SOURCE_ID, '=', $task->id)), 25, 0, SearchFields_Note::CREATED, false, false); $tpl->assign('notes', $notes); $active_workers = DAO_Worker::getAllActive(); $tpl->assign('active_workers', $active_workers); $workers = DAO_Worker::getAllWithDisabled(); $tpl->assign('workers', $workers); $tpl->display('file:' . $tpl_path . 'tasks/display/tabs/notes.tpl'); }
function showTabNotesAction() { $tpl = DevblocksPlatform::getTemplateService(); $tpl->assign('path', $this->_TPL_PATH); @($org_id = DevblocksPlatform::importGPC($_REQUEST['org'])); $org = DAO_ContactOrg::get($org_id); $tpl->assign('org', $org); list($notes, $null) = DAO_Note::search(array(new DevblocksSearchCriteria(SearchFields_Note::SOURCE_EXT_ID, '=', ChNotesSource_Org::ID), new DevblocksSearchCriteria(SearchFields_Note::SOURCE_ID, '=', $org->id)), 25, 0, SearchFields_Note::CREATED, false, false); $tpl->assign('notes', $notes); $active_workers = DAO_Worker::getAllActive(); $tpl->assign('active_workers', $active_workers); $workers = DAO_Worker::getAllWithDisabled(); $tpl->assign('workers', $workers); $tpl->display('file:' . $this->_TPL_PATH . 'contacts/orgs/tabs/notes.tpl'); }
function showTab() { $tpl = DevblocksPlatform::getTemplateService(); $response = DevblocksPlatform::getHttpResponse(); // are we displaying the main home page? $path = $response->path; array_shift($path); // iphone // array_shift($path); // activity array_shift($path); // opportunities $action = array_shift($path); // current action $id = array_shift($path); // opp id list($notes, $null) = DAO_Note::search(array(new DevblocksSearchCriteria(SearchFields_Note::SOURCE_EXT_ID, '=', CrmNotesSource_Opportunity::ID), new DevblocksSearchCriteria(SearchFields_Note::SOURCE_ID, '=', $id)), 25, 0, DAO_Note::CREATED, false, false); // var_dump($notes); $tpl->assign('notes', $notes); $tpl->display('file:' . $this->_TPL_PATH . 'display/notes.tpl'); }