Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ReviewerReviewAttachmentsGridHandler.inc.php
1 <?php
15 import('lib.pkp.controllers.grid.files.fileList.FileListGridHandler');
16 
22  import('lib.pkp.controllers.grid.files.attachment.ReviewerReviewAttachmentGridDataProvider');
23  // Pass in null stageId to be set in initialize from request var.
24  parent::FileListGridHandler(
25  new ReviewerReviewAttachmentGridDataProvider(SUBMISSION_FILE_REVIEW_ATTACHMENT),
26  null,
27  FILE_GRID_ADD|FILE_GRID_DELETE
28  );
29 
30  $this->addRoleAssignment(
31  array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_REVIEWER),
32  array(
33  'fetchGrid', 'fetchRow'
34  )
35  );
36 
37  // Set the grid title.
38  $this->setTitle('reviewer.submission.reviewerFiles');
39  }
40 
44  function initialize($request) {
45  // Watch for flag from including template to warn about the
46  // review already being complete. If so, remove some capabilities.
47  $capabilities = $this->getCapabilities();
48  if ($request->getUserVar('reviewIsComplete')) {
49  $capabilities->setCanAdd(false);
50  $capabilities->setCanDelete(false);
51  }
52 
53  AppLocale::requireComponents(LOCALE_COMPONENT_PKP_REVIEWER);
54 
55  parent::initialize($request);
56  }
57 }
58 
59 ?>
Provide the reviewers access to their own review attachments data for grids.
Base grid for simple file lists. This grid shows the file type in addition to the file name...
static requireComponents()
addRoleAssignment($roleIds, $operations)