00001 <?php 00002 00015 import('controllers.grid.files.fileList.FileListGridHandler'); 00016 00017 class ReviewerReviewAttachmentsGridHandler extends FileListGridHandler { 00021 function ReviewerReviewAttachmentsGridHandler() { 00022 import('controllers.grid.files.attachment.ReviewerReviewAttachmentGridDataProvider'); 00023 // Pass in null stageId to be set in initialize from request var. 00024 parent::FileListGridHandler( 00025 new ReviewerReviewAttachmentGridDataProvider(MONOGRAPH_FILE_REVIEW_ATTACHMENT), 00026 null, 00027 FILE_GRID_ADD|FILE_GRID_DELETE 00028 ); 00029 00030 $this->addRoleAssignment( 00031 array(ROLE_ID_PRESS_MANAGER, ROLE_ID_SERIES_EDITOR, ROLE_ID_REVIEWER), 00032 array( 00033 'fetchGrid', 'fetchRow' 00034 ) 00035 ); 00036 00037 // Set the grid title. 00038 $this->setTitle('reviewer.monograph.reviewerFiles'); 00039 00040 } 00041 00045 function initialize($request) { 00046 // Watch for flag from including template to warn about the 00047 // review already being complete. If so, remove some capabilities. 00048 if ($request->getUserVar('reviewIsComplete')) { 00049 $this->setCanAdd(false); 00050 $this->setCanDelete(false); 00051 } 00052 00053 parent::initialize($request); 00054 } 00055 } 00056 00057 ?>
1.7.1