00001 <?php
00002
00015
00016 import('lib.pkp.classes.controllers.grid.GridRow');
00017
00018 class SubmissionFilesGridRow extends GridRow {
00019
00021 var $_canDelete;
00022
00024 var $_canViewNotes;
00025
00027 var $_stageId;
00028
00035 function SubmissionFilesGridRow($canDelete, $canViewNotes, $stageId = null) {
00036 $this->_canDelete = $canDelete;
00037 $this->_canViewNotes = $canViewNotes;
00038 $this->_stageId = $stageId;
00039 parent::GridRow();
00040 }
00041
00042
00043
00044
00045
00050 function canDelete() {
00051 return $this->_canDelete;
00052 }
00053
00058 function canViewNotes() {
00059 return $this->_canViewNotes;
00060 }
00061
00066 function getStageId() {
00067 return $this->_stageId;
00068 }
00069
00070
00071
00072
00076 function initialize(&$request, $template = 'controllers/grid/gridRow.tpl') {
00077 parent::initialize($request, $template);
00078
00079
00080 $submissionFileData =& $this->getData();
00081 assert(isset($submissionFileData['submissionFile']));
00082 $monographFile =& $submissionFileData['submissionFile'];
00083 assert(is_a($monographFile, 'MonographFile'));
00084
00085
00086
00087 if ($this->canDelete()) {
00088 import('controllers.api.file.linkAction.DeleteFileLinkAction');
00089 $this->addAction(new DeleteFileLinkAction($request, $monographFile, $this->getStageId()));
00090 }
00091
00092
00093 if ($this->canViewNotes()) {
00094 import('controllers.informationCenter.linkAction.FileInfoCenterLinkAction');
00095 $this->addAction(new FileInfoCenterLinkAction($request, $monographFile, $this->getStageId()));
00096 }
00097 }
00098 }
00099
00100 ?>