function showMailRoutingRulePanelAction() { @($id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0)); @($group_id = DevblocksPlatform::importGPC($_REQUEST['group_id'], 'integer', 0)); $active_worker = CerberusApplication::getActiveWorker(); $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = $this->_TPL_PATH; $tpl->assign('path', $tpl_path); $tpl->assign('group_id', $group_id); if (null != ($rule = DAO_MailToGroupRule::get($id))) { $tpl->assign('rule', $rule); } // Make sure we're allowed to change this group's setup if (!$active_worker->isTeamManager($group_id) && !$active_worker->is_superuser) { return; } $groups = DAO_Group::getAll(); $tpl->assign('groups', $groups); $workers = DAO_Worker::getAll(); $tpl->assign('workers', $workers); // 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); // Custom Fields: Ticket $ticket_fields = DAO_CustomField::getBySource(ChCustomFieldSource_Ticket::ID); $tpl->assign('ticket_fields', $ticket_fields); $tpl->display('file:' . $tpl_path . 'configuration/tabs/mail/routing/peek.tpl'); }