16 import(
'lib.pkp.classes.notification.NotificationManagerDelegate');
25 parent::__construct($notificationType);
32 assert($notification->getAssocType() == ASSOC_TYPE_SUBMISSION && is_numeric($notification->getAssocId()));
34 $submission = $submissionDao->getById($notification->getAssocId());
36 switch ($notification->getType()) {
37 case NOTIFICATION_TYPE_SUBMISSION_SUBMITTED:
38 return __(
'notification.type.submissionSubmitted', array(
'title' => $submission->getLocalizedTitle()));
39 case NOTIFICATION_TYPE_METADATA_MODIFIED:
40 return __(
'notification.type.metadataModified', array(
'title' => $submission->getLocalizedTitle()));
41 case NOTIFICATION_TYPE_SUBMISSION_NEW_VERSION:
42 return __(
'notification.type.submissionNewVersion');
43 case NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_REQUIRED:
44 return __(
'notification.type.editorAssignmentTask');
54 $router = $request->getRouter();
55 $dispatcher = $router->getDispatcher();
57 assert($notification->getAssocType() == ASSOC_TYPE_SUBMISSION && is_numeric($notification->getAssocId()));
58 switch ($notification->getType()) {
59 case NOTIFICATION_TYPE_SUBMISSION_SUBMITTED:
60 case NOTIFICATION_TYPE_METADATA_MODIFIED:
61 case NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_REQUIRED:
63 $context = $contextDao->getById($notification->getContextId());
65 return $dispatcher->url($request, ROUTE_PAGE, $context->getPath(),
'workflow',
'submission', $notification->getAssocId());
66 case NOTIFICATION_TYPE_SUBMISSION_NEW_VERSION:
68 $context = $contextDao->getById($notification->getContextId());
70 return $dispatcher->url($request, ROUTE_PAGE, $context->getPath(),
'workflow',
'production', $notification->getAssocId());
80 switch ($notification->getType()) {
81 case NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_REQUIRED:
82 return 'notifyIconPageAlert';
83 case NOTIFICATION_TYPE_SUBMISSION_SUBMITTED:
84 return 'notifyIconNewPage';
85 case NOTIFICATION_TYPE_METADATA_MODIFIED:
86 return 'notifyIconEdit';
96 switch ($notification->getType()) {
97 case NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_REQUIRED:
98 return NOTIFICATION_STYLE_CLASS_INFORMATION;
99 case NOTIFICATION_TYPE_SUBMISSION_SUBMITTED:
100 case NOTIFICATION_TYPE_METADATA_MODIFIED: