/** * Update the admin datagrid. * * @return string new grid html */ public function partial_datagrid() { try { $grid = DataGrid::resume($this->getNode()); $this->modifyDataGrid($grid, DataGrid::RESUME); } catch (Exception $e) { $grid = DataGrid::create($this->getNode()); $this->modifyDataGrid($grid, DataGrid::RESUME); } return $grid->render(); }
/** * Update the admin datagrid. * * @return string new grid html */ public function partial_datagrid() { try { $grid = DataGrid::resume($this->getNode()); $this->modifyDataGrid($grid, DataGrid::RESUME); } catch (Exception $e) { $grid = DataGrid::create($this->getNode()); $this->modifyDataGrid($grid, DataGrid::CREATE); } if ($this->redirectToSearchAction($grid)) { return ''; } return $grid->render(); }
/** * Updates the datagrid for the edit and display actions. * * @return string grid html */ public function partial_grid() { $this->createDestination(); $node = $this->getDestination(); try { $grid = DataGrid::resume($node); $this->modifyDataGrid($grid, DataGrid::RESUME); } catch (Exception $e) { $grid = DataGrid::create($node); $this->modifyDataGrid($grid, DataGrid::CREATE); } return $grid->render(); }
/** * This method returns an html page containing a recordlist to select * records from. The recordlist can be searched, sorted etc. like an * admin screen. * * @return string The html select page. */ public function multiSelectPage() { // add the postvars to the form global $g_stickyurl; $sm = SessionManager::getInstance(); $g_stickyurl[] = 'atktarget'; $g_stickyurl[] = 'atktargetvar'; $g_stickyurl[] = 'atktargetvartpl'; $GLOBALS['atktarget'] = $this->getNode()->m_postvars['atktarget']; $GLOBALS['atktargetvar'] = $this->getNode()->m_postvars['atktargetvar']; $GLOBALS['atktargetvartpl'] = $this->getNode()->m_postvars['atktargetvartpl']; $params['header'] = Tools::atktext('title_multiselect', $this->getNode()->m_module, $this->getNode()->m_type); $actions['actions'] = []; $actions['mra'][] = 'multiselect'; $grid = DataGrid::create($this->getNode(), 'multiselect'); /* * At first the changes below looked like the solution for the error * on the contact multiselect page. Except this is not the case, because * the MRA actions will not be shown, which is a must. */ if (is_array($actions['actions'])) { $grid->setDefaultActions($actions['actions']); } else { $grid->setDefaultActions($actions); } $grid->removeFlag(DataGrid::EXTENDED_SEARCH); $grid->addFlag(DataGrid::MULTI_RECORD_ACTIONS); $params['list'] = $grid->render(); if ($sm->atkLevel() > 0) { $backlinkurl = $sm->sessionUrl(Config::getGlobal('dispatcher') . '?atklevel=' . $sm->newLevel(SessionManager::SESSION_BACK)); $params['footer'] = '<br><div style="text-align: center"><input type="button" class="btn btn-default" onclick="window.location=\'' . $backlinkurl . '\';" value="' . Tools::atktext('cancel') . '"></div>'; } $output = $this->getUi()->renderList('multiselect', $params); return $this->getUi()->renderBox(array('title' => $this->getNode()->actionTitle('multiselect'), 'content' => $output)); }