_submission = $submission; $this->_isCurrentUserAssignedAuthor = $isCurrentUserAssignedAuthor; parent::__construct(); } // // Overridden methods from GridRow // /** * @copydoc GridRow::initialize() */ function initialize($request, $template = null) { parent::initialize($request, $template); $logEntry = $this->getData(); // a Category object assert($logEntry != null && (is_a($logEntry, 'EventLogEntry') || is_a($logEntry, 'EmailLogEntry'))); if (is_a($logEntry, 'EventLogEntry')) { $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); $params = $logEntry->getParams(); switch ($logEntry->getEventType()) { case SUBMISSION_LOG_FILE_REVISION_UPLOAD: case SUBMISSION_LOG_FILE_UPLOAD: $submissionFile = $submissionFileDao->getRevision($params['fileId'], $params['fileRevision']); if ($submissionFile) { $blindAuthor = false; $maybeBlindAuthor = $this->_isCurrentUserAssignedAuthor && $submissionFile->getFileStage() === SUBMISSION_FILE_REVIEW_ATTACHMENT; if ($maybeBlindAuthor && $submissionFile->getAssocType() === ASSOC_TYPE_REVIEW_ASSIGNMENT) { $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO'); $reviewAssignment = $reviewAssignmentDao->getById($submissionFile->getAssocId()); if ($reviewAssignment && in_array($reviewAssignment->getReviewMethod(), array(SUBMISSION_REVIEW_METHOD_BLIND, SUBMISSION_REVIEW_METHOD_DOUBLEBLIND))) { $blindAuthor = true; } } if (!$blindAuthor) { $this->addAction(new DownloadFileLinkAction($request, $submissionFile, null, __('common.download'))); } } break; } } elseif (is_a($logEntry, 'EmailLogEntry')) { $this->addAction( new EmailLinkAction( $request, __('submission.event.viewEmail'), array( 'submissionId' => $logEntry->getAssocId(), 'emailLogEntryId' => $logEntry->getId(), ) ) ); } } } ?>