function getWorkerAddressesAction() { @($worker_id = DevblocksPlatform::importGPC($_REQUEST['worker_id'], 'integer', 0)); $tpl = DevblocksPlatform::getTemplateService(); $tpl->assign('path', $this->_TPL_PATH); $addresses = DAO_AddressToWorker::getByWorker($worker_id); $tpl->assign('addresses', $addresses); $tpl->display('file:' . $this->_TPL_PATH . 'preferences/worker_addresses.tpl'); }
function showGeneralAction() { $date_service = DevblocksPlatform::getDateService(); $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = $this->_TPL_PATH; $tpl->assign('path', $tpl_path); $worker = CerberusApplication::getActiveWorker(); $tpl->assign('worker', $worker); $tour_enabled = intval(DAO_WorkerPref::get($worker->id, 'assist_mode', 1)); $tpl->assign('assist_mode', $tour_enabled); $keyboard_shortcuts = intval(DAO_WorkerPref::get($worker->id, 'keyboard_shortcuts', 1)); $tpl->assign('keyboard_shortcuts', $keyboard_shortcuts); $mail_inline_comments = DAO_WorkerPref::get($worker->id, 'mail_inline_comments', 1); $tpl->assign('mail_inline_comments', $mail_inline_comments); $mail_always_show_all = DAO_WorkerPref::get($worker->id, 'mail_always_show_all', 0); $tpl->assign('mail_always_show_all', $mail_always_show_all); $addresses = DAO_AddressToWorker::getByWorker($worker->id); $tpl->assign('addresses', $addresses); // Timezones $tpl->assign('timezones', $date_service->getTimezones()); @($server_timezone = date_default_timezone_get()); $tpl->assign('server_timezone', $server_timezone); // Languages $langs = DAO_Translation::getDefinedLangCodes(); $tpl->assign('langs', $langs); $tpl->assign('selected_language', DAO_WorkerPref::get($worker->id, 'locale', 'en_US')); $tpl->display('file:' . $tpl_path . 'preferences/modules/general.tpl'); }
function showTab() { $tpl = DevblocksPlatform::getTemplateService(); $tpl->assign('path', $this->tpl_path); $tpl->cache_lifetime = "0"; $worker = CerberusApplication::getActiveWorker(); $tpl->assign('worker', $worker); $groups = DAO_Group::getAll(); $tpl->assign('groups', $groups); $group_buckets = DAO_Bucket::getTeams(); $tpl->assign('group_buckets', $group_buckets); $memberships = $worker->getMemberships(); $tpl->assign('memberships', $memberships); $addresses = DAO_AddressToWorker::getByWorker($worker->id); $tpl->assign('addresses', $addresses); @($notifications = DAO_WorkerMailForward::getWhere(sprintf("%s = %d", DAO_WorkerMailForward::WORKER_ID, $worker->id))); $tpl->assign('notifications', $notifications); $assign_notify_email = DAO_WorkerPref::get($worker->id, ChWatchersPlugin::WORKER_PREF_ASSIGN_EMAIL, ''); $tpl->assign('assign_notify_email', $assign_notify_email); $tpl->display('file:' . $this->tpl_path . '/preferences/watchers.tpl'); }
function showWatcherPanelAction() { @($id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0)); $tpl = DevblocksPlatform::getTemplateService(); $tpl->cache_lifetime = "0"; $tpl->assign('path', $this->_TPL_PATH); $active_worker = CerberusApplication::getActiveWorker(); if (null != ($filter = DAO_WatcherMailFilter::get($id))) { $tpl->assign('filter', $filter); } $groups = DAO_Group::getAll(); $tpl->assign('groups', $groups); $buckets = DAO_Bucket::getAll(); $tpl->assign('buckets', $buckets); $group_buckets = DAO_Bucket::getTeams(); $tpl->assign('group_buckets', $group_buckets); $memberships = $active_worker->getMemberships(); $tpl->assign('memberships', $memberships); $addresses = DAO_AddressToWorker::getByWorker($active_worker->id); $tpl->assign('addresses', $addresses); $workers = DAO_Worker::getAllActive(); $tpl->assign('workers', $workers); // Custom Fields: Ticket $ticket_fields = DAO_CustomField::getBySource(ChCustomFieldSource_Ticket::ID); $tpl->assign('ticket_fields', $ticket_fields); // Custom Fields: Address $address_fields = DAO_CustomField::getBySource(ChCustomFieldSource_Address::ID); $tpl->assign('address_fields', $address_fields); // Custom Fields: Orgs $org_fields = DAO_CustomField::getBySource(ChCustomFieldSource_Org::ID); $tpl->assign('org_fields', $org_fields); $tpl->display('file:' . $this->_TPL_PATH . 'preferences/peek.tpl'); }