function initialize(&$request) { parent::initialize($request); // Basic configuration $this->setTitle('manager.setup.cataloguingMetadata'); $this->setSourceTitle('common.name'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT); // Free text input $this->setListTitle('manager.setup.currentFormats'); $this->loadList($request); $this->addColumn(new GridColumn('item', 'manager.setup.currentFormats')); }
/** * @copydoc GridHandler::getRowDataElement */ protected function getRowDataElement($request, &$rowId) { // fallback on the parent if a rowId is found if (!empty($rowId)) { return parent::getRowDataElement($request, $rowId); } // Otherwise return from the $newRowId $rowData = $this->getNewRowId($request); import('lib.pkp.controllers.grid.content.navigation.form.FooterCategoryForm'); $context = $request->getContext(); $footerCategoryForm = new FooterCategoryForm($context->getId()); return $footerCategoryForm->getFooterLinkFromRowData($request, $rowData); }
function initialize(&$request) { parent::initialize($request); // Basic configuration $this->setTitle('manager.setup.publicationFormats'); $this->setSourceTitle('common.name'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT); // Free text input $this->setListTitle('manager.setup.publicationFormats'); $this->setAttributeNames(array('common.designation')); $this->loadList($request); $this->addColumn(new GridColumn('item', 'common.name')); $this->addColumn(new GridColumn('attribute', 'common.designation')); }
/** * @copydoc GridHandler::getRowDataElement */ protected function getRowDataElement($request, &$rowId) { // Fallback on the parent if an existing rowId is found if (!empty($rowId)) { return parent::getRowDataElement($request, $rowId); } // If we're bouncing a row back upon a row edit $rowData = $this->getNewRowId($request); if ($rowData) { return array(array('content' => $rowData['possibleResponse'])); } // If we're generating an empty row to edit return array(array('content' => array())); }
function initialize(&$request) { parent::initialize($request); Locale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER)); // Basic configuration $this->setTitle('user.role.seriesEditors'); $this->setSourceTitle('common.user'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_BOUND); // Free text input $this->setListTitle('manager.groups.existingUsers'); $this->setSeriesId($request->getUserVar('seriesId')); $this->loadList($request); $this->addColumn(new GridColumn('item', 'common.name')); }
/** * Configure the grid * @param PKPRequest $request */ function initialize($request) { parent::initialize($request); AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_APP_MANAGER); // Basic configuration $this->setTitle('manager.setup.categories'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT); $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL); $this->setSaveFieldName('categories'); // Name column $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name'); import('controllers.listbuilder.settings.categories.CategoriesListbuilderGridCellProvider'); $nameColumn->setCellProvider(new CategoriesListbuilderGridCellProvider()); $this->addColumn($nameColumn); }
function initialize(&$request) { parent::initialize($request); $this->roleId = $request->getUserVar('roleId'); $this->stageId = $request->getUserVar('stageId'); // Basic configuration $this->setTitle($request->getUserVar('title')); $this->setSourceTitle('manager.setup.availableRoles'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT); //Select from drop-down list $this->setListTitle('manager.setup.currentRoles'); $this->loadPossibleItemList($request); $this->loadList($request); $this->addColumn(new GridColumn('item', 'common.name')); $this->addColumn(new GridColumn('attribute', 'common.designation')); }
/** * Configure the grid * @param PKPRequest $request */ function initialize($request) { parent::initialize($request); AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER); // Basic configuration $this->setTitle('user.role.subEditors'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_SELECT); $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL); $this->setSaveFieldName('subEditors'); $this->setSectionId($request->getUserVar('sectionId')); // Name column $nameColumn = new ListbuilderGridColumn($this, 'name', 'common.name'); // We can reuse the User cell provider because getFullName import('lib.pkp.controllers.listbuilder.users.UserListbuilderGridCellProvider'); $nameColumn->setCellProvider(new UserListbuilderGridCellProvider()); $this->addColumn($nameColumn); }
/** * @see Listbuilder::fetch() */ function fetch($args, &$request) { $router =& $request->getRouter(); $groupId = $request->getUserVar('groupId'); $additionalVars = array('addUrl' => $router->url($request, array(), null, 'addItem', null, array('roleId' => $this->getRoleId())), 'deleteUrl' => $router->url($request, array(), null, 'deleteItems', null, array('groupId' => $this->getRoleId()))); return parent::fetch($args, &$request, $additionalVars); }