Open Journal Systems  3.0.0
 All Classes Namespaces Functions Variables Groups Pages
ManageFinalDraftFilesGridHandler.inc.php
1 <?php
2 
16 import('lib.pkp.controllers.grid.files.SelectableSubmissionFileListCategoryGridHandler');
17 
23  import('lib.pkp.controllers.grid.files.SubmissionFilesCategoryGridDataProvider');
24  parent::SelectableSubmissionFileListCategoryGridHandler(
25  new SubmissionFilesCategoryGridDataProvider(SUBMISSION_FILE_FINAL),
26  WORKFLOW_STAGE_ID_EDITING,
27  FILE_GRID_ADD|FILE_GRID_DELETE|FILE_GRID_VIEW_NOTES
28  );
29 
30  $this->addRoleAssignment(
31  array(
32  ROLE_ID_SUB_EDITOR,
33  ROLE_ID_MANAGER,
34  ROLE_ID_ASSISTANT
35  ),
36  array(
37  'fetchGrid', 'fetchCategory', 'fetchRow',
38  'addFile',
39  'downloadFile',
40  'deleteFile',
41  'updateFinalDraftFiles'
42  )
43  );
44 
45  // Set the grid title.
46  $this->setTitle('submission.finalDraft');
47  }
48 
49 
50  //
51  // Public handler methods
52  //
59  function updateFinalDraftFiles($args, $request) {
60  $submission = $this->getSubmission();
61 
62  import('lib.pkp.controllers.grid.files.final.form.ManageFinalDraftFilesForm');
63  $manageFinalDraftFilesForm = new ManageFinalDraftFilesForm($submission->getId());
64  $manageFinalDraftFilesForm->readInputData();
65 
66  if ($manageFinalDraftFilesForm->validate()) {
67  $dataProvider = $this->getDataProvider();
68  $manageFinalDraftFilesForm->execute($args, $request, $dataProvider->getCategoryData($this->getStageId()));
69 
70  // Let the calling grid reload itself
71  return DAO::getDataChangedEvent();
72  } else {
73  $json = new JSONMessage(false);
74  return $json->getString();
75  }
76  }
77 }
78 
79 ?>
Handle selectable submission file list category grid requests.
addRoleAssignment($roleIds, $operations)
Class to represent a JSON (Javascript Object Notation) message.
Form to add files to the final draft files grid.
Handle the editor review file selection grid (selects which files to send to review or to next review...
static getDataChangedEvent($elementId=null, $parentElementId=null, $content= '')
Definition: DAO.inc.php:632