00001 <?php
00002
00015 import('lib.pkp.classes.controllers.grid.CategoryGridHandler');
00016 import('lib.pkp.classes.controllers.grid.DataObjectGridCellProvider');
00017
00018 class AuthorProofingSignoffFilesGridHandler extends CategoryGridHandler {
00022 function AuthorProofingSignoffFilesGridHandler() {
00023 import("controllers.grid.files.proof.AuthorProofingSignoffFilesCategoryGridDataProvider");
00024 parent::CategoryGridHandler(new AuthorProofingSignoffFilesCategoryGridDataProvider());
00025
00026 $this->addRoleAssignment(
00027 array(ROLE_ID_AUTHOR),
00028 array('fetchGrid', 'fetchCategory', 'fetchRow')
00029 );
00030 }
00031
00035 function initialize($request, $args) {
00036 parent::initialize($request);
00037
00038 $dataProvider =& $this->getDataProvider();
00039 $user =& $request->getUser();
00040 $dataProvider->setUserId($user->getId());
00041
00042 AppLocale::requireComponents(
00043 LOCALE_COMPONENT_PKP_COMMON,
00044 LOCALE_COMPONENT_APPLICATION_COMMON,
00045 LOCALE_COMPONENT_PKP_SUBMISSION,
00046 LOCALE_COMPONENT_OMP_SUBMISSION
00047 );
00048
00049
00050 $addSignoffFileLinkAction = $dataProvider->getAddSignoffFile($request);
00051 if ($addSignoffFileLinkAction) {
00052 $this->addAction($addSignoffFileLinkAction);
00053 }
00054
00055
00056 import('controllers.grid.files.FileNameGridColumn');
00057 $this->addColumn(new FileNameGridColumn(true, WORKFLOW_STAGE_ID_PRODUCTION));
00058
00059 import('controllers.grid.files.fileSignoff.AuthorSignoffFilesGridCellProvider');
00060 $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
00061 $cellProvider = new AuthorSignoffFilesGridCellProvider($monograph, WORKFLOW_STAGE_ID_PRODUCTION);
00062
00063
00064 $this->addColumn(
00065 new GridColumn(
00066 'response',
00067 'submission.response',
00068 null,
00069 'controllers/grid/gridCell.tpl',
00070 $cellProvider)
00071 );
00072
00073
00074 $this->setTitle('monograph.pageProofs');
00075 }
00076
00080 function &getRowInstance() {
00081 import('controllers.grid.files.fileSignoff.AuthorSignoffFilesGridRow');
00082 $row = new AuthorSignoffFilesGridRow(WORKFLOW_STAGE_ID_PRODUCTION);
00083 return $row;
00084 }
00085
00089 function &getCategoryRowInstance() {
00090 import('controllers.grid.files.proof.AuthorProofingGridCategoryRow');
00091 $row = new AuthorProofingGridCategoryRow();
00092 return $row;
00093 }
00094 }
00095
00096 ?>