00001 <?php
00002
00015 import('lib.pkp.classes.controllers.grid.GridRow');
00016
00017 class StageParticipantGridRow extends GridRow {
00019 var $_monograph;
00020
00022 var $_stageId;
00023
00025 var $_canAdminister;
00026
00030 function StageParticipantGridRow(&$monograph, $stageId, $canAdminister = false) {
00031 $this->_monograph =& $monograph;
00032 $this->_stageId =& $stageId;
00033 $this->_canAdminister = $canAdminister;
00034
00035 parent::GridRow();
00036 }
00037
00038
00039
00040
00041
00046 function initialize(&$request) {
00047
00048 parent::initialize($request);
00049
00050
00051 $rowId = $this->getId();
00052 if (!empty($rowId) && is_numeric($rowId)) {
00053
00054 $router =& $request->getRouter();
00055
00056 import('lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal');
00057 if ($this->_canAdminister) $this->addAction(
00058 new LinkAction(
00059 'delete',
00060 new RemoteActionConfirmationModal(
00061 __('editor.monograph.removeStageParticipant.description'),
00062 __('editor.monograph.removeStageParticipant'),
00063 $router->url($request, null, null, 'deleteParticipant', null, $this->getRequestArgs()),
00064 'modal_delete'
00065 ),
00066 __('grid.action.remove'),
00067 'delete'
00068 )
00069 );
00070
00071 import('controllers.informationCenter.linkAction.NotifyLinkAction');
00072 $monograph =& $this->getMonograph();
00073 $stageId = $this->getStageId();
00074 $stageAssignment =& $this->getData();
00075 $userId = $stageAssignment->getUserId();
00076 $this->addAction(new NotifyLinkAction($request, $monograph, $stageId, $userId));
00077 }
00078 }
00079
00080
00081
00082
00087 function &getMonograph() {
00088 return $this->_monograph;
00089 }
00090
00095 function getStageId() {
00096 return $this->_stageId;
00097 }
00098
00104 function getRequestArgs() {
00105 return array(
00106 'monographId' => $this->getMonograph()->getId(),
00107 'stageId' => $this->_stageId,
00108 'assignmentId' => $this->getId()
00109 );
00110 }
00111 }
00112
00113 ?>