• Main Page
  • Modules
  • Classes
  • Files
  • File List

controllers/grid/files/final/ManageFinalDraftFilesGridHandler.inc.php

00001 <?php
00002 
00015 import('controllers.grid.files.SelectableSubmissionFileListCategoryGridHandler');
00016 
00017 class ManageFinalDraftFilesGridHandler extends SelectableSubmissionFileListCategoryGridHandler {
00021    function ManageFinalDraftFilesGridHandler() {
00022       import('controllers.grid.files.SubmissionFilesCategoryGridDataProvider');
00023       parent::SelectableSubmissionFileListCategoryGridHandler(
00024          new SubmissionFilesCategoryGridDataProvider(MONOGRAPH_FILE_FINAL),
00025          WORKFLOW_STAGE_ID_EDITING,
00026          FILE_GRID_ADD|FILE_GRID_DELETE|FILE_GRID_VIEW_NOTES
00027       );
00028 
00029       $this->addRoleAssignment(
00030          array(
00031             ROLE_ID_SERIES_EDITOR,
00032             ROLE_ID_PRESS_MANAGER,
00033             ROLE_ID_PRESS_ASSISTANT
00034          ),
00035          array(
00036             'fetchGrid', 'fetchCategory', 'fetchRow',
00037             'addFile',
00038             'downloadFile',
00039             'deleteFile',
00040             'updateFinalDraftFiles'
00041          )
00042       );
00043 
00044       // Set the grid title.
00045       $this->setTitle('submission.finalDraft');
00046    }
00047 
00048 
00049    //
00050    // Public handler methods
00051    //
00058    function updateFinalDraftFiles($args, &$request) {
00059       $monograph =& $this->getMonograph();
00060 
00061       import('controllers.grid.files.final.form.ManageFinalDraftFilesForm');
00062       $manageFinalDraftFilesForm = new ManageFinalDraftFilesForm($monograph->getId());
00063       $manageFinalDraftFilesForm->readInputData();
00064 
00065       if ($manageFinalDraftFilesForm->validate()) {
00066          $dataProvider =& $this->getDataProvider();
00067          $manageFinalDraftFilesForm->execute($args, $request, $dataProvider->getCategoryData($this->getStageId()));
00068 
00069          // Let the calling grid reload itself
00070          return DAO::getDataChangedEvent();
00071       } else {
00072          $json = new JSONMessage(false);
00073          return $json->getString();
00074       }
00075    }
00076 }
00077 
00078 ?>

Generated on Mon Sep 17 2012 13:58:55 for Open Monograph Press by  doxygen 1.7.1