示例#1
0
 private function displayResults()
 {
     $id_project = (int) Tools::getValue('id_project');
     $project = new TextMasterProject($id_project);
     $menu = Tools::getValue('menu', 'translation');
     if ($menu == 'proofreading') {
         $menu = $this->l('Proofreading projects');
     } elseif ($menu == 'copywriting') {
         $menu = $this->l('Copywriting projects');
     } else {
         $menu = $this->l('Translation projects');
     }
     /* menu and toolbar begin */
     /*required for new navigation (template)*/
     $this->context->smarty->assign(array('current_page_name' => $menu, 'current_inner_page_name' => $project->name));
     $this->displayNavigation();
     $statuses = array('in_creation' => $this->l('In creation'), 'waiting_assignment' => $this->l('Waiting assignment'), 'in_progress' => $this->l('In progress'), 'in_review' => $this->l('In review'), 'completed' => $this->l('Completed'), 'incomplete' => $this->l('Incomplete'), 'paused' => $this->l('Paused'), 'canceled' => $this->l('Cancelled'), 'copyscape' => $this->l('Copyscape'), 'counting_words' => $this->l('Counting_words'), 'quality_control' => $this->l('Quality control'));
     include_once _TEXTMASTER_CLASSES_DIR_ . 'project.view.php';
     $view = new TextMasterProjectView($this);
     //$helper = $view->initForm();
     $this->context->smarty->assign(array('project' => $project, 'documents' => TextMasterDocument::getDocuments($id_project, $project->id_project_api), 'view' => $view, 'statuses' => $statuses, 'module_url' => self::CURRENT_INDEX . Tools::getValue('token') . '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules') . "&menu=" . Tools::getValue('menu') . "&id_project=" . Tools::getValue('id_project') . "&viewproject", 'token' => sha1(_COOKIE_KEY_ . $this->name)));
     $this->_html .= $this->context->smarty->fetch(TEXTMASTER_TPL_DIR . 'admin/project/view.tpl');
 }