function initialize($request) { // Do the default initialization parent::initialize($request); // Is this a new row or an existing row? $footerCategoryId = $this->getId(); if (!empty($footerCategoryId) && is_numeric($footerCategoryId)) { $footerCategory = $this->getData(); $router = $request->getRouter(); $actionArgs = array('footerCategoryId' => $footerCategoryId); $this->addAction(new LinkAction('deleteFooterCategory', new RemoteActionConfirmationModal(__('grid.content.navigation.footer.deleteCategoryConfirm'), __('grid.content.navigation.footer.deleteCategory'), $router->url($request, null, null, 'deleteFooterCategory', null, $actionArgs), 'modal_delete'), null, 'delete'), GRID_ACTION_POSITION_ROW_LEFT); $this->addAction(new LinkAction('editFooterCategory', new AjaxModal($router->url($request, null, null, 'editFooterCategory', null, $actionArgs), __('grid.content.navigation.footer.editCategory'), 'modal_edit'), $footerCategory->getLocalizedTitle()), GRID_ACTION_POSITION_ROW_CLICK); } }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize($request) { // Do the default initialization parent::initialize($request); // Is this a new row or an existing row? $categoryId = $this->getId(); if (!empty($categoryId) && is_numeric($categoryId)) { $category = $this->getData(); // Only add row actions if this is an existing row import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal'); $router = $request->getRouter(); $this->addAction(new LinkAction('deleteCategory', new RemoteActionConfirmationModal(__('common.confirmDelete'), __('common.delete'), $router->url($request, null, null, 'deleteCategory', null, array('categoryId' => $categoryId)), 'modal_delete'), null, 'delete'), GRID_ACTION_POSITION_ROW_LEFT); $this->addAction(new LinkAction('editCategory', new AjaxModal($router->url($request, null, null, 'editCategory', null, array('categoryId' => $categoryId)), __('grid.category.edit'), 'modal_edit'), $category->getLocalizedTitle()), GRID_ACTION_POSITION_ROW_CLICK); } }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize(&$request) { // Do the default initialization parent::initialize($request); // Retrieve the monograph id from the request $monographId = $request->getUserVar('monographId'); assert(is_numeric($monographId)); // Is this a new row or an existing row? $chapterId = $this->getId(); if (!empty($chapterId) && is_numeric($chapterId)) { $chapter =& $this->getData(); // Only add row actions if this is an existing row $router =& $request->getRouter(); $actionArgs = array('monographId' => $monographId, 'chapterId' => $chapterId); $this->addAction(new LegacyLinkAction('editChapter', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_REPLACE, $router->url($request, null, null, 'editChapter', null, $actionArgs), null, $chapter->getLocalizedTitle())); } }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize(&$request) { // Do the default initialization parent::initialize($request); // Retrieve the monograph id from the request $monographId = $request->getUserVar('monographId'); assert(is_numeric($monographId)); // Is this a new row or an existing row? $fileId = $this->getId(); if (!empty($fileId) && is_numeric($fileId)) { $monographFile =& $this->getData(); // Only add row actions if this is an existing row $router =& $request->getRouter(); $actionArgs = array('monographId' => $monographId, 'fileId' => $fileId); $this->addAction(new LegacyLinkAction('downloadFile', LINK_ACTION_MODE_LINK, LINK_ACTION_TYPE_NOTHING, $router->url($request, null, null, 'downloadFile', null, $actionArgs), null, $monographFile->getLocalizedName())); } }
/** * @copydoc GridRow::initialize() */ function initialize($request, $template = null) { // Do the default initialization parent::initialize($request, $template); // Retrieve the submission from the request $submission = $this->getSubmission(); // Is this a new row or an existing row? $representation = $this->getData(); if ($representation && is_numeric($representation->getId())) { $router = $request->getRouter(); $actionArgs = array('submissionId' => $submission->getId(), 'representationId' => $representation->getId()); // Add row-level actions import('lib.pkp.classes.linkAction.request.AjaxModal'); $this->addAction(new LinkAction('editFormat', new AjaxModal($router->url($request, null, null, 'editFormat', null, $actionArgs), __('grid.action.edit'), 'modal_edit'), __('grid.action.edit'), 'edit')); import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal'); $this->addAction(new LinkAction('deleteFormat', new RemoteActionConfirmationModal($request->getSession(), __('common.confirmDelete'), __('common.delete'), $router->url($request, null, null, 'deleteFormat', null, $actionArgs), 'modal_delete'), __('grid.action.delete'), 'delete')); } }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize($request) { // Do the default initialization parent::initialize($request); // Is this a new row or an existing row? $fileId = $this->getId(); if (!empty($fileId) && is_numeric($fileId)) { $submissionFile = $this->getData(); // Add the row actions. $actionArgs = array('submissionId' => $submissionFile->getSubmissionId(), 'fileId' => $submissionFile->getFileId(), 'stageId' => $this->_stageId); $router = $request->getRouter(); $this->addAction(new LinkAction('history', new AjaxModal($router->url($request, null, 'informationCenter.FileInformationCenterHandler', 'viewHistory', null, $actionArgs), __('submission.history'), 'modal_information', true), __('submission.history'), 'more_info')); import('lib.pkp.controllers.api.file.linkAction.DeleteFileLinkAction'); $this->addAction(new DeleteFileLinkAction($request, $submissionFile, $this->_getStageId())); } // Set the no-row locale key $this->setEmptyCategoryRowText('editor.submission.noAuditRequested'); }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize($request) { // Do the default initialization parent::initialize($request); // Retrieve the monograph id from the request $monograph = $this->getMonograph(); // Is this a new row or an existing row? $chapterId = $this->getId(); if (!empty($chapterId) && is_numeric($chapterId)) { $chapter = $this->getData(); $this->_chapter = $chapter; // Only add row actions if this is an existing row and the grid is not 'read only' if (!$this->isReadOnly()) { $router = $request->getRouter(); $actionArgs = array('submissionId' => $monograph->getId(), 'chapterId' => $chapterId); $this->addAction(new LinkAction('deleteChapter', new RemoteActionConfirmationModal($request->getSession(), __('common.confirmDelete'), __('common.delete'), $router->url($request, null, null, 'deleteChapter', null, $actionArgs), 'modal_delete'), __('common.delete'), 'delete')); } } }
/** * @copydoc GridRow::initialize() */ function initialize($request, $template = null) { parent::initialize($request, $template); /* $submissionFileId = $this->getId(); if (!empty($submissionFileId)) { $router = $request->getRouter(); $this->addAction( new LinkAction( 'editSubmissionFile', new AjaxModal( $router->url($request, null, null, 'editSubmissionFile', null, array('submissionFileId' => $submissionFileId, 'submissionId' => $this->_submissionId)), __('grid.action.edit'), 'modal_edit', true), __('grid.action.edit'), 'edit' ) ); } */ }
/** * @copydoc GridCategoryRow::initialize() */ function initialize($request) { parent::initialize($request); $this->setId($this->getData()); }
/** * @see GridCategoryRow::initialize() * @param $request PKPRequest */ function initialize($request) { // Do the default initialization parent::initialize($request); $this->_configSection = $this->getData(); }