17 import(
'lib.pkp.classes.controllers.grid.GridHandler');
20 import(
'lib.pkp.classes.linkAction.request.AjaxModal');
23 import(
'lib.pkp.controllers.grid.eventLog.EventLogGridRow');
24 import(
'lib.pkp.classes.controllers.grid.DateGridCellProvider');
25 import(
'lib.pkp.controllers.grid.eventLog.EventLogGridCellProvider');
38 parent::__construct();
40 array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR),
41 array(
'fetchGrid',
'fetchRow',
'viewEmail')
62 $this->_submission = $submission;
75 function authorize($request, &$args, $roleAssignments) {
76 import(
'lib.pkp.classes.security.authorization.SubmissionAccessPolicy');
79 import(
'lib.pkp.classes.security.authorization.internal.UserAccessibleWorkflowStageRequiredPolicy');
82 $success = parent::authorize($request, $args, $roleAssignments);
87 $this->_isCurrentUserAssignedAuthor =
false;
88 foreach ($userAssignedRoles as $stageId => $roles) {
89 if (in_array(ROLE_ID_AUTHOR, $roles)) {
90 $this->_isCurrentUserAssignedAuthor =
true;
102 parent::initialize($request, $args);
110 LOCALE_COMPONENT_APP_SUBMISSION,
111 LOCALE_COMPONENT_PKP_SUBMISSION,
112 LOCALE_COMPONENT_APP_EDITOR,
113 LOCALE_COMPONENT_PKP_EDITOR
126 \
Application::get()->getRequest()->getContext()->getLocalizedDateFormatShort()
172 'submissionId' => $submission->getId(),
179 protected function loadData($request, $filter =
null) {
185 $eventLogEntries = $submissionEventLogDao->getBySubmissionId($submission->getId());
186 $emailLogEntries = $submissionEmailLogDao->getBySubmissionId($submission->getId());
188 $entries = array_merge($eventLogEntries->toArray(), $emailLogEntries->toArray());
191 usort($entries,
function($a, $b) {
192 $aDate = is_a($a,
'EventLogEntry') ? $a->getDateLogged() : $a->getDateSent();
193 $bDate = is_a($b,
'EventLogEntry') ? $b->getDateLogged() : $b->getDateSent();
195 if ($aDate == $bDate)
return 0;
197 return $aDate < $bDate ? 1 : -1;
211 $emailLogEntry = $submissionEmailLogDao->getById((
int) $args[
'emailLogEntryId']);
221 assert(is_a($emailLogEntry,
'EmailLogEntry'));
224 $text[] = __(
'email.from') .
': ' . htmlspecialchars($emailLogEntry->getFrom());
225 $text[] = __(
'email.to') .
': ' . htmlspecialchars($emailLogEntry->getRecipients());
226 $text[] = __(
'email.subject') .
': ' . htmlspecialchars($emailLogEntry->getSubject());
227 $text[] = $emailLogEntry->getBody();