public function processTemplate() { // call parent parent::processTemplate(); $current_context = $this->_environment->getCurrentContextItem(); $current_user = $this->_environment->getCurrentUser(); $translator = $this->_environment->getTranslationObject(); $session = $this->_environment->getSessionItem(); $index_action = $session->getValue('index_action'); if ($index_action['action'] == 'USER_EMAIL_SEND') { $user_manager = $this->_environment->getUserManager(); //$user = $user_manager->get $user_array = array(); foreach ($index_action['selected_ids'] as $item_id) { $temp_user = $user_manager->getItem($item_id); $temp_array['name'] = $temp_user->getFullName(); if ($temp_user->isEmailVisible()) { $temp_array['email'] = $temp_user->getEmail(); } else { $temp_array['email'] = $translator->getMessage('USER_EMAIL_HIDDEN2'); } $temp_array['item_id'] = $temp_user->{$item_id}; $user_array[] = $temp_array; } $this->assign('user', 'data', $user_array); $email_footer = $translator->getMessage('MAIL_BODY_CIAO_PR', $current_user->getFullName(), $current_context->getTitle()); $this->assign('email', 'footer', $email_footer); } }
protected function processTemplate() { // call parent parent::processTemplate(); // set list actions $this->assign('list', 'actions', $this->getListActions()); // set index actions $this->assign('index', 'actions', $this->getIndexActions()); /* // set paging information $paging = array( 'num_pages' => ceil($this->_num_entries / $this->_paging['limit']), 'actual_page' => floor($this->_paging['offset'] / $this->_paging['limit']) + 1, 'from' => $this->_paging['offset'] + 1, 'to' => $this->_paging['offset'] + $this->_paging['limit'] ); $this->assign('list', 'paging', $paging); $this->assign('list', 'num_entries', $this->_num_entries); */ }
protected function processTemplate() { // call parent parent::processTemplate(); }
public function processTemplate() { // call parent parent::processTemplate(); }
protected function processTemplate() { // call parent parent::processTemplate(); $this->assign('detail', 'actions', $this->getDetailActions()); /*******************/ // move this, when inline forms are handles via ajax if (isset($_GET["annotation_exception"]) && $_GET["annotation_exception"] == "mandatory") { $this->assign("detail", "exception", "annotation"); $session = $this->_environment->getSessionItem(); $sessionKey = 'cid' . $this->_environment->getCurrentContextID() . '_annotation_last_description'; if ($session->issetValue($sessionKey)) { $this->assign("detail", "annotation_description", $session->getValue($sessionKey)); $session->unsetValue($sessionKey); } } if (isset($_GET["step_exception"]) && $_GET["step_exception"] == "mandatory") { $this->assign("detail", "exception", "step"); $session = $this->_environment->getSessionItem(); $sessionKey = 'cid' . $this->_environment->getCurrentContextID() . '_step_last_description'; if ($session->issetValue($sessionKey)) { $this->assign("detail", "step_description", $session->getValue($sessionKey)); $session->unsetValue($sessionKey); } } if (isset($_GET["discarticle_exception"]) && $_GET["discarticle_exception"] == "mandatory") { $this->assign("detail", "exception", "discarticle"); $session = $this->_environment->getSessionItem(); $sessionKey = 'cid' . $this->_environment->getCurrentContextID() . '_discarticle_last_description'; if ($session->issetValue($sessionKey)) { $this->assign("detail", "discarticle_description", $session->getValue($sessionKey)); $session->unsetValue($sessionKey); } } /*******************/ // mark as read and noticed $this->markRead(); $this->markNoticed(); // set list actions //$this->assign('list', 'actions', $this->getListActions()); /* // set paging information $paging = array( 'num_pages' => ceil($this->_num_entries / $this->_paging['limit']), 'actual_page' => floor($this->_paging['offset'] / $this->_paging['limit']) + 1, 'from' => $this->_paging['offset'] + 1, 'to' => $this->_paging['offset'] + $this->_paging['limit'] ); $this->assign('list', 'paging', $paging); $this->assign('list', 'num_entries', $this->_num_entries); */ if (isset($this->_item)) { $tag_list = $this->_item->getTagList(); $tag_item = $tag_list->getFirst(); $tag_array = array(); while ($tag_item) { $tmp = array(); $tmp['item_id'] = $tag_item->getItemID(); $tmp['title'] = $tag_item->getTitle(); $tmp['level'] = '0'; $tag_array[] = $tmp; $tag_item = $tag_list->getNext(); $this->_linked_count++; } $this->assign('item', 'tags', $tag_array); $this->assign('item', 'linked_count', $this->_linked_count); } if (isset($this->_item)) { $global_changed = false; $changed = $this->_getItemAnnotationChangeStatus($this->_item); if ($changed['count_new']) { $global_changed = 'new'; } elseif ($changed['count_changed']) { $global_changed = 'changed'; } $annotations = $this->_item->getAnnotationList(); $this->markAnnotationsReadedAndNoticed($annotations); $this->assign('detail', 'annotations_changed', $global_changed); } $current_context = $this->_environment->getCurrentContextItem(); $this->assign('detail', 'is_action_bar_visible', $current_context->isActionBarVisibleAsDefault()); $this->assign('detail', 'is_details_bar_visible', $current_context->isDetailsBarVisibleAsDefault()); $this->assign('detail', 'is_annotations_bar_visible', $current_context->isAnnotationsBarVisibleAsDefault()); $this->assign('detail', 'is_reference_bar_visible', $current_context->isReferenceBarVisibleAsDefault()); //Wenn Printmode dann Variable an Smarty-Template senden (Cookie) if (isset($_COOKIE['hiddenDivs'])) { if ($this->_environment->getOutputMode() === 'print') { $this->assign('detail', 'printcookie', explode(',', $_COOKIE['hiddenDivs'])); } } else { //TODO: errorhandling $this->assign('detail', 'printcookie', array()); } }