/**
  * Get cell actions associated with this row/column combination
  * @param $row GridRow
  * @param $column GridColumn
  * @return array an array of LinkAction instances
  */
 function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT)
 {
     if ($column->getId() == 'title') {
         $submission = $row->getData();
         $router = $request->getRouter();
         $dispatcher = $router->getDispatcher();
         $title = $submission->getLocalizedTitle();
         if (empty($title)) {
             $title = __('common.untitled');
         }
         $contextId = $submission->getContextId();
         $contextDao = Application::getContextDAO();
         $context = $contextDao->getById($contextId);
         if ($submission->getSubmissionProgress() > 0) {
             $url = $dispatcher->url($request, ROUTE_PAGE, $context->getPath(), 'submission', 'wizard', $submission->getSubmissionProgress(), array('submissionId' => $submission->getId()));
         } else {
             list($page, $operation) = SubmissionsListGridCellProvider::getPageAndOperationByUserRoles($request, $submission);
             $url = $dispatcher->url($request, ROUTE_PAGE, $context->getPath(), $page, $operation, $submission->getId());
         }
         import('lib.pkp.classes.linkAction.request.RedirectAction');
         $action = new LinkAction('itemWorkflow', new RedirectAction($url), $title);
         return array($action);
     }
     return parent::getCellActions($request, $row, $column, $position);
 }
 /**
  * Get cell actions associated with this row/column combination
  * @param $row GridRow
  * @param $column GridColumn
  * @return array an array of LegacyLinkAction instances
  */
 function getCellActions(&$request, &$row, &$column, $position = GRID_ACTION_POSITION_DEFAULT)
 {
     if ($column->getId() == 'title') {
         $monograph =& $row->getData();
         $router =& $request->getRouter();
         $dispatcher =& $router->getDispatcher();
         $title = $monograph->getLocalizedTitle();
         if (empty($title)) {
             $title = Locale::translate('common.untitled');
         }
         $pressId = $monograph->getPressId();
         $pressDao = DAORegistry::getDAO('PressDAO');
         $press = $pressDao->getPress($pressId);
         $action = new LegacyLinkAction('details', LINK_ACTION_MODE_LINK, LINK_ACTION_TYPE_NOTHING, $dispatcher->url($request, ROUTE_PAGE, $press->getPath(), 'authorDashboard', null, $monograph->getId()), null, $title);
         return array($action);
     }
     return parent::getCellActions($request, $row, $column, $position);
 }
 /**
  * Get cell actions associated with this row/column combination
  * @param $row GridRow
  * @param $column GridColumn
  * @return array an array of LegacyLinkAction instances
  */
 function getCellActions(&$request, &$row, &$column, $position = GRID_ACTION_POSITION_DEFAULT)
 {
     if ($column->getId() == 'title') {
         $monograph =& $row->getData();
         $router =& $request->getRouter();
         $dispatcher =& $router->getDispatcher();
         $title = $monograph->getLocalizedTitle();
         if (empty($title)) {
             $title = Locale::translate('common.untitled');
         }
         $pressId = $monograph->getPressId();
         $pressDao = DAORegistry::getDAO('PressDAO');
         $press = $pressDao->getPress($pressId);
         $stageId = $monograph->getCurrentStageId();
         $monographId = $monograph->getId();
         $user =& $request->getUser();
         switch ($stageId) {
             case WORKFLOW_STAGE_ID_SUBMISSION:
             default:
                 $url = $dispatcher->url($request, ROUTE_PAGE, $press->getPath(), 'workflow', 'submission', $monographId);
                 break;
             case WORKFLOW_STAGE_ID_INTERNAL_REVIEW:
             case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:
                 // If user is reviewer for submission, send to review wizard; Else they are an editor in the review stage
                 $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
                 $reviewAssignment =& $reviewAssignmentDao->getReviewAssignment($monographId, $user->getId(), $monograph->getCurrentRound(), $stageId == WORKFLOW_STAGE_ID_INTERNAL_REVIEW ? REVIEW_TYPE_INTERNAL : REVIEW_TYPE_EXTERNAL);
                 if (isset($reviewAssignment)) {
                     $url = $dispatcher->url($request, ROUTE_PAGE, null, 'reviewer', 'submission', null, array('monographId' => $monographId, 'reviewId' => $reviewAssignment->getId()));
                 } else {
                     $url = $dispatcher->url($request, ROUTE_PAGE, $press->getPath(), 'workflow', 'review', array($monographId));
                 }
                 break;
             case WORKFLOW_STAGE_ID_EDITING:
                 $url = $dispatcher->url($request, ROUTE_PAGE, $press->getPath(), 'workflow', 'copyediting', $monograph->getId());
                 break;
             case WORKFLOW_STAGE_ID_PRODUCTION:
                 $url = $dispatcher->url($request, ROUTE_PAGE, $press->getPath(), 'workflow', 'production', $monograph->getId());
                 break;
         }
         $action = new LegacyLinkAction('details', LINK_ACTION_MODE_LINK, LINK_ACTION_TYPE_NOTHING, $url, null, $title);
         return array($action);
     }
     return parent::getCellActions($request, $row, $column, $position);
 }