Ejemplo n.º 1
0
 function showGroupPanelAction()
 {
     @($group_id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0));
     @($view_id = DevblocksPlatform::importGPC($_REQUEST['view_id'], 'string', ''));
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = $this->_TPL_PATH;
     $tpl->assign('path', $tpl_path);
     $tpl->assign('view_id', $view_id);
     if (!empty($group_id) && null != ($group = DAO_Group::getTeam($group_id))) {
         $tpl->assign('group', $group);
     }
     $tpl->display('file:' . $tpl_path . 'groups/rpc/peek.tpl');
 }
Ejemplo n.º 2
0
 function getComposeSignatureAction()
 {
     @($group_id = DevblocksPlatform::importGPC($_REQUEST['group_id'], 'integer', 0));
     $settings = DevblocksPlatform::getPluginSettingsService();
     $group = DAO_Group::getTeam($group_id);
     $active_worker = CerberusApplication::getActiveWorker();
     $worker = DAO_Worker::getAgent($active_worker->id);
     // Use the most recent info (not session)
     $sig = $settings->get('cerberusweb.core', CerberusSettings::DEFAULT_SIGNATURE, '');
     if (!empty($group->signature)) {
         $sig = $group->signature;
     }
     /*
      * [TODO] This is the 3rd place this replace happens, we really need 
      * to move the signature translation into something like CerberusApplication
      */
     echo sprintf("\r\n%s\r\n", str_replace(array('#first_name#', '#last_name#', '#title#'), array($worker->first_name, $worker->last_name, $worker->title), $sig));
 }