We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 3922 | Differences between
and this patch

Collapse All | Expand All

(-)classes/article/Article.inc.php (+68 lines)
 Lines 423-428    Link Here 
423
		);
423
		);
424
		return $commentsStatusOptions;
424
		return $commentsStatusOptions;
425
	}
425
	}
426
	
427
	/**
428
	 * Get an array of user IDs associated with this article
429
	 * @param $authors boolean
430
	 * @param $reviewers boolean
431
	 * @param $editors boolean
432
	 * @param $proofreaders boolean
433
	 * @param $copyeditors boolean
434
	 * @param $layoutEditors boolean
435
	 * @return array User IDs
436
	 */
437
	function getAssociatedUserIds($authors = true, $reviewers = true, $editors = true, $proofreaders = true, $copyeditors = true, $layoutEditors = true) {
438
		$articleId = $this->getArticleId();
439
		
440
		$userIds = array();
441
442
		if($authors) {
443
			$authorDao = &DAORegistry::getDAO('AuthorDAO');
444
			$authors = $authorDao->getAuthorsByArticle($articleId);
445
			foreach ($authors as $author) {
446
				$userIds[] = array('id' => $author->getAuthorId(), 'role' => 'author');
447
			}
448
		}
449
		
450
		if($editors) {
451
			$editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
452
			$editAssignments =& $editAssignmentDao->getEditorAssignmentsByArticleId($articleId);
453
			while ($editAssignment =& $editAssignments->next()) {
454
				$userIds[] = array('id' => $editAssignment->getEditorId(), 'role' => 'editor');
455
				unset($editAssignment);
456
			}
457
		}
458
		
459
		if($copyeditors) {
460
			$copyAssignmentDao = &DAORegistry::getDAO('CopyAssignmentDAO');
461
			$copyAssignment =& $copyAssignmentDao->getCopyAssignmentByArticleId($articleId);
462
			if ($copyAssignment != null && $copyAssignment->getCopyeditorId() > 0) {
463
				$userIds[] =array('id' =>  $copyAssignment->getCopyeditorId(), 'role' => 'copyeditor');
464
			}
465
		}
466
		
467
		if($layoutEditors) {
468
			$layoutAssignmentDao = &DAORegistry::getDAO('LayoutAssignmentDAO');
469
			$layoutEditorId = $layoutAssignmentDao->getLayoutEditorIdByArticleId($articleId);
470
			if ($layoutEditorId != null && $layoutEditorId > 0) {
471
				$userIds[] = array('id' => $layoutEditorId, 'role' => 'layoutEditor');
472
			}
473
		}	
474
		
475
		if($proofreaders) {
476
			$proofAssignmentDao = &DAORegistry::getDAO('ProofAssignmentDAO');
477
			$proofAssignment =& $proofAssignmentDao->getProofAssignmentByArticleId($articleId);
478
			if ($proofAssignment != null && $proofAssignment->getProofreaderId() > 0) {
479
				$userIds[] = array('id' => $proofAssignment->getProofreaderId(), 'role' => 'proofreader');
480
			}
481
		}
482
		
483
		if($reviewers) {
484
			$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
485
			$reviewAssignments =& $reviewAssignmentDao->getReviewAssignmentsByArticleId($articleId);
486
			foreach ($reviewAssignments as $reviewAssignment) {
487
				$userIds[] = array('id' => $reviewAssignment->getReviewerId(), 'role' => 'reviewer');
488
				unset($reviewAssignment);
489
			}
490
		}
491
				
492
		return $userIds;
493
	}
426
}
494
}
427
495
428
?>
496
?>
(-)classes/core/OJSApplication.inc.php (-1 lines)
 Lines 145-151    Link Here 
145
			'JournalStatisticsDAO' => 'journal.JournalStatisticsDAO',
145
			'JournalStatisticsDAO' => 'journal.JournalStatisticsDAO',
146
			'LayoutAssignmentDAO' => 'submission.layoutAssignment.LayoutAssignmentDAO',
146
			'LayoutAssignmentDAO' => 'submission.layoutAssignment.LayoutAssignmentDAO',
147
			'LayoutEditorSubmissionDAO' => 'submission.layoutEditor.LayoutEditorSubmissionDAO',
147
			'LayoutEditorSubmissionDAO' => 'submission.layoutEditor.LayoutEditorSubmissionDAO',
148
			'NotificationStatusDAO' => 'journal.NotificationStatusDAO',
149
			'OAIDAO' => 'oai.ojs.OAIDAO',
148
			'OAIDAO' => 'oai.ojs.OAIDAO',
150
			'OJSCompletedPaymentDAO' => 'payment.ojs.OJSCompletedPaymentDAO',
149
			'OJSCompletedPaymentDAO' => 'payment.ojs.OJSCompletedPaymentDAO',
151
			'PluginSettingsDAO' => 'plugins.PluginSettingsDAO',
150
			'PluginSettingsDAO' => 'plugins.PluginSettingsDAO',
(-)classes/install/Upgrade.inc.php (-1 / +1 lines)
 Lines 463-469    Link Here 
463
		$tables = array(
463
		$tables = array(
464
			'versions', 'site', 'site_settings', 'scheduled_tasks',
464
			'versions', 'site', 'site_settings', 'scheduled_tasks',
465
			'sessions', 'journal_settings',
465
			'sessions', 'journal_settings',
466
			'plugin_settings', 'roles', 'notification_status', 
466
			'plugin_settings', 'roles', 
467
			'section_settings', 'section_editors', 'issue_settings',
467
			'section_settings', 'section_editors', 'issue_settings',
468
			'custom_issue_orders', 'custom_section_orders',
468
			'custom_issue_orders', 'custom_section_orders',
469
			'article_settings', 'article_author_settings',
469
			'article_settings', 'article_author_settings',
(-)classes/journal/Journal.inc.php (+8 lines)
 Lines 175-180    Link Here 
175
	function getJournalId() {
175
	function getJournalId() {
176
		return $this->getData('journalId');
176
		return $this->getData('journalId');
177
	}
177
	}
178
	
179
	/**
180
	 * Get ID of journal (for generic calls in PKP WAL).
181
	 * @return int
182
	 */
183
	function getId() {
184
		return $this->getData('journalId');
185
	}
178
186
179
	/**
187
	/**
180
	 * Set ID of journal.
188
	 * Set ID of journal.
(-)classes/journal/JournalDAO.inc.php (-3 lines)
 Lines 142-150    Link Here 
142
		$issueDao = &DAORegistry::getDAO('IssueDAO');
142
		$issueDao = &DAORegistry::getDAO('IssueDAO');
143
		$issueDao->deleteIssuesByJournal($journalId);
143
		$issueDao->deleteIssuesByJournal($journalId);
144
144
145
		$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');
146
		$notificationStatusDao->deleteNotificationStatusByJournal($journalId);
147
148
		$emailTemplateDao = &DAORegistry::getDAO('EmailTemplateDAO');
145
		$emailTemplateDao = &DAORegistry::getDAO('EmailTemplateDAO');
149
		$emailTemplateDao->deleteEmailTemplatesByJournal($journalId);
146
		$emailTemplateDao->deleteEmailTemplatesByJournal($journalId);
150
147
(-)classes/manager/form/AnnouncementForm.inc.php (-1 / +21 lines)
 Lines 129-134    Link Here 
129
	function execute() {
129
	function execute() {
130
		$announcementDao = &DAORegistry::getDAO('AnnouncementDAO');
130
		$announcementDao = &DAORegistry::getDAO('AnnouncementDAO');
131
		$journal = &Request::getJournal();
131
		$journal = &Request::getJournal();
132
		$journalId = $journal->getJournalId();
132
133
133
		if (isset($this->announcementId)) {
134
		if (isset($this->announcementId)) {
134
			$announcement = &$announcementDao->getAnnouncement($this->announcementId);
135
			$announcement = &$announcementDao->getAnnouncement($this->announcementId);
 Lines 138-144    Link Here 
138
			$announcement = new Announcement();
139
			$announcement = new Announcement();
139
		}
140
		}
140
141
141
		$announcement->setJournalId($journal->getJournalId());
142
		$announcement->setJournalId($journalId);
142
		$announcement->setTitle($this->getData('title'), null); // Localized
143
		$announcement->setTitle($this->getData('title'), null); // Localized
143
		$announcement->setDescriptionShort($this->getData('descriptionShort'), null); // Localized
144
		$announcement->setDescriptionShort($this->getData('descriptionShort'), null); // Localized
144
		$announcement->setDescription($this->getData('description'), null); // Localized
145
		$announcement->setDescription($this->getData('description'), null); // Localized
 Lines 162-167    Link Here 
162
			$announcement->setDatetimePosted(Core::getCurrentDate());
163
			$announcement->setDatetimePosted(Core::getCurrentDate());
163
			$announcementDao->insertAnnouncement($announcement);
164
			$announcementDao->insertAnnouncement($announcement);
164
		}
165
		}
166
		
167
		// Send a notification to associated users
168
		import('notification.Notification');
169
		$roleDao = &DAORegistry::getDAO('RoleDAO');
170
		$notificationUsers = array();
171
		$allUsers = $roleDao->getUsersByJournalId($journalId);
172
		while (!$allUsers->eof()) {
173
			$user = &$allUsers->next();
174
			$notificationUsers[] = array('id' => $user->getUserId());
175
			unset($user);
176
		}
177
		$url = Request::url(null, 'announcement', 'view', array(1));
178
		foreach ($notificationUsers as $user) {
179
			Notification::createNotification($user['id'], "notification.type.newAnnouncement",
180
				null, $url, 1, NOTIFICATION_TYPE_NEW_ANNOUNCEMENT);
181
		}
182
		$notificationDao = &DAORegistry::getDAO('NotificationDAO');
183
		$notificationDao->sendToMailingList(Notification::createNotification(0, "notification.type.newAnnouncement",
184
				null, $url, 1, NOTIFICATION_TYPE_NEW_ANNOUNCEMENT));
165
	}
185
	}
166
}
186
}
167
187
(-)classes/notification/Notification.inc.php (+137 lines)
Added Link Here 
1
<?php
2
3
/**
4
 * @file classes/notification/Notification.inc.php
5
 *
6
 * Copyright (c) 2003-2008 John Willinsky
7
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
8
 *
9
 * @class OJSNotification
10
 * @ingroup notification
11
 * @see NotificationDAO
12
 * @brief OJS subclass for Notifications (defines OJS-specific types and icons).
13
 */
14
15
// $Id: Notification.inc.php,v 1.10 2008/07/01 01:16:09 asmecher Exp $
16
17
18
/** Notification associative types. */
19
define('NOTIFICATION_TYPE_ARTICLE_SUBMITTED', 		0x1000001);
20
define('NOTIFICATION_TYPE_METADATA_MODIFIED', 		0x1000002);
21
define('NOTIFICATION_TYPE_SUPP_FILE_ADDED', 			0x1000003);
22
define('NOTIFICATION_TYPE_SUPP_FILE_MODIFIED', 		0x1000004);
23
define('NOTIFICATION_TYPE_GALLEY_ADDED', 				0x1000005);
24
define('NOTIFICATION_TYPE_GALLEY_MODIFIED', 			0x1000006);
25
define('NOTIFICATION_TYPE_SUBMISSION_COMMENT', 		0x1000007);
26
define('NOTIFICATION_TYPE_LAYOUT_COMMENT', 			0x1000008);
27
define('NOTIFICATION_TYPE_COPYEDIT_COMMENT', 			0x1000009);
28
define('NOTIFICATION_TYPE_PROOFREAD_COMMENT', 		0x1000010);
29
define('NOTIFICATION_TYPE_REVIEWER_COMMENT', 			0x1000011);
30
define('NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT', 	0x1000012);
31
define('NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT', 	0x1000013);
32
define('NOTIFICATION_TYPE_USER_COMMENT', 				0x10000014);
33
define('NOTIFICATION_TYPE_PUBLISHED_ISSUE', 			0x10000015);
34
define('NOTIFICATION_TYPE_NEW_ANNOUNCEMENT', 			0x10000016);
35
36
import('notification.PKPNotification');
37
import('notification.NotificationDAO');
38
39
class Notification extends PKPNotification {
40
41
	/**
42
	 * Constructor.
43
	 */
44
	function Notification() {
45
		parent::PKPNotification();
46
	}
47
	
48
	/**
49
	 * return the path to the icon for this type
50
	 * @return string
51
	 */
52
	function getIconLocation() {
53
		$baseUrl = Request::getBaseUrl() . '/lib/pkp/templates/images/icons/';
54
		switch ($this->getAssocType()) {
55
			case NOTIFICATION_TYPE_ARTICLE_SUBMITTED:
56
			case NOTIFICATION_TYPE_GALLEY_ADDED:
57
			case NOTIFICATION_TYPE_SUPP_FILE_ADDED:
58
				return $baseUrl . 'page_new.gif';
59
				break;
60
			case NOTIFICATION_TYPE_SUPP_FILE_MODIFIED:
61
			case NOTIFICATION_TYPE_SUPP_FILE_ADDED:
62
				return $baseUrl . 'page_attachment.gif';
63
				break;
64
			
65
			case NOTIFICATION_TYPE_METADATA_MODIFIED:
66
			case NOTIFICATION_TYPE_GALLEY_MODIFIED:
67
				return $baseUrl . 'edit.gif';
68
				break;
69
			case NOTIFICATION_TYPE_SUBMISSION_COMMENT:
70
			case NOTIFICATION_TYPE_LAYOUT_COMMENT:
71
			case NOTIFICATION_TYPE_COPYEDIT_COMMENT:
72
			case NOTIFICATION_TYPE_PROOFREAD_COMMENT:
73
			case NOTIFICATION_TYPE_REVIEWER_COMMENT:
74
			case NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT:
75
			case NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT:
76
			case NOTIFICATION_TYPE_USER_COMMENT:
77
				return $baseUrl . 'comment_new.gif';
78
				break;
79
			case NOTIFICATION_TYPE_PUBLISHED_ISSUE:
80
				return $baseUrl . 'list_world.gif';
81
				break;
82
			case NOTIFICATION_TYPE_NEW_ANNOUNCEMENT:
83
				return $baseUrl . 'note_new.gif';
84
				break;
85
			default:
86
				return $baseUrl . 'page_alert.gif';
87
		}
88
	}
89
	
90
	/**
91
	 * Static function to send an email to a mailing list user regarding signup or a lost password
92
	 * @param $email string
93
	 * @param $password string the user's password
94
	 * @param $template string The mail template to use
95
	 */
96
	function sendMailingListEmail($email, $password, $template) {
97
		import('mail.MailTemplate');
98
		$journal = Request::getJournal();
99
		$site = Request::getSite();
100
		
101
		$params = array(
102
			'password' => $password,
103
			'siteTitle' => $journal->getJournalTitle(),
104
			'unsubscribeLink' => Request::url(null, 'notification', 'unsubscribeMailList')
105
		);
106
		
107
		if ($template == 'NOTIFICATION_MAILLIST_WELCOME') {
108
			$keyHash = md5($password);
109
			$confirmLink = Request::url(null, 'notification', 'confirmMailListSubscription', array($keyHash, $email));
110
			$params["confirmLink"] = $confirmLink;
111
		}
112
		
113
		$mail = new MailTemplate($template);
114
		$mail->setFrom($site->getSiteContactEmail(), $site->getSiteContactName());
115
		$mail->assignParams($params);
116
		$mail->addRecipient($email);
117
		$mail->send();
118
	}
119
	
120
	/**
121
	 * Returns an array of information on the journal's subscription settings
122
	 * @return array
123
	 */
124
	function getSubscriptionSettings() {
125
		$journal = Request::getJournal();
126
		import('payment.ojs.OJSPaymentManager');
127
		$paymentManager =& OJSPaymentManager::getManager();
128
		
129
		$settings = array('subscriptionsEnabled' => $paymentManager->acceptSubscriptionPayments(),
130
				'allowRegReviewer' => $journal->getSetting('allowRegReviewer'),
131
				'allowRegAuthor' => $journal->getSetting('allowRegAuthor'));
132
		
133
		return $settings;
134
	}
135
 }
136
137
?>
(-)classes/notification/form/NotificationSettingsForm.inc.php (+152 lines)
Added Link Here 
1
<?php
2
/**
3
 * @defgroup notification_form
4
 */
5
6
/**
7
 * @file classes/notification/form/NotificationSettingsForm.inc.php
8
 *
9
 * Copyright (c) 2000-2008 John Willinsky
10
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
11
 *
12
 * @class NotificationSettingsForm
13
 * @ingroup notification_form
14
 *
15
 * @brief Form to edit notification settings.
16
 */
17
18
// $Id: NotificationSettingsForm.inc.php,v 1.5 2008/11/05 00:45:13 mcrider Exp $
19
20
21
import('notification.form.PKPNotificationSettingsForm');
22
23
class NotificationSettingsForm extends PKPNotificationSettingsForm {
24
	/**
25
	 * Constructor.
26
	 */
27
	function NotificationSettingsForm() {
28
		parent::PKPNotificationSettingsForm();
29
	}
30
31
	/**
32
	 * Assign form data to user-submitted data.
33
	 */
34
	function readInputData() {
35
		$this->readUserVars(
36
			array('notificationArticleSubmitted',
37
				'notificationMetadataModified',
38
				'notificationSuppFileAdded',
39
				'notificationSuppFileModified',
40
				'notificationGalleyAdded',
41
				'notificationGalleyModified',
42
				'notificationSubmissionComment',
43
				'notificationLayoutComment',
44
				'notificationCopyeditComment',
45
				'notificationProofreadComment',
46
				'notificationReviewerComment',
47
				'notificationReviewerFormComment',
48
				'notificationEditorDecisionComment',
49
				'notificationPublishedIssue',
50
				'notificationUserComment',
51
				'notificationNewAnnouncement',
52
				'emailNotificationArticleSubmitted',
53
				'emailNotificationMetadataModified',
54
				'emailNotificationSuppFileAdded',
55
				'emailNotificationSuppFileModified',
56
				'emailNotificationGalleyAdded',
57
				'emailNotificationGalleyModified',
58
				'emailNotificationSubmissionComment',
59
				'emailNotificationLayoutComment',
60
				'emailNotificationCopyeditComment',
61
				'emailNotificationProofreadComment',
62
				'emailNotificationReviewerComment',
63
				'emailNotificationReviewerFormComment',
64
				'emailNotificationEditorDecisionComment', 
65
				'emailNotificationPublishedIssue',
66
				'emailNotificationUserComment',
67
				'emailNotificationNewAnnouncement')
68
		);
69
	}
70
	
71
	/**
72
	 * Display the form.
73
	 */
74
	function display() {
75
		$journalDao = &DAORegistry::getDAO('JournalDAO');
76
		$journals = &$journalDao->getJournalTitles();
77
		
78
		$canOnlyRead = true;
79
		$canOnlyReview = false;
80
		
81
		if (Validation::isReviewer()) {
82
			$canOnlyRead = false;
83
			$canOnlyReview = true;
84
		}
85
		if (Validation::isSiteAdmin() || Validation::isJournalManager() || Validation::isEditor() || 
86
			Validation::isSectionEditor() || Validation::isLayoutEditor() || Validation::isCopyeditor() || Validation::isProofreader()) {
87
			$canOnlyRead = false;
88
			$canOnlyReview = false;
89
		}
90
91
		$templateMgr = &TemplateManager::getManager();
92
		$templateMgr->assign('canOnlyRead', $canOnlyRead);
93
		$templateMgr->assign('canOnlyReview', $canOnlyReview);
94
		return parent::display();
95
	}
96
97
	/**
98
	 * Save site settings.
99
	 */
100
	function execute() {		
101
		$user = Request::getUser();
102
		$userId = $user->getUserId();
103
		
104
		// Notification settings
105
		$settings = array();
106
		if(!$this->getData('notificationArticleSubmitted')) $settings[] = NOTIFICATION_TYPE_ARTICLE_SUBMITTED;
107
		if(!$this->getData('notificationMetadataModified')) $settings[] = NOTIFICATION_TYPE_METADATA_MODIFIED;
108
		if(!$this->getData('notificationSuppFileAdded')) $settings[] = NOTIFICATION_TYPE_SUPP_FILE_ADDED;
109
		if(!$this->getData('notificationSuppFileModified')) $settings[] = NOTIFICATION_TYPE_SUPP_FILE_MODIFIED;
110
		if(!$this->getData('notificationGalleyAdded')) $settings[] = NOTIFICATION_TYPE_GALLEY_ADDED;
111
		if(!$this->getData('notificationGalleyModified')) $settings[] = NOTIFICATION_TYPE_GALLEY_MODIFIED;
112
		if(!$this->getData('notificationSubmissionComment')) $settings[] = NOTIFICATION_TYPE_SUBMISSION_COMMENT;
113
		if(!$this->getData('notificationLayoutComment')) $settings[] = NOTIFICATION_TYPE_LAYOUT_COMMENT;
114
		if(!$this->getData('notificationCopyeditComment')) $settings[] = NOTIFICATION_TYPE_COPYEDIT_COMMENT;
115
		if(!$this->getData('notificationProofreadComment')) $settings[] = NOTIFICATION_TYPE_PROOFREAD_COMMENT;
116
		if(!$this->getData('notificationReviewerComment')) $settings[] = NOTIFICATION_TYPE_REVIEWER_COMMENT;
117
		if(!$this->getData('notificationReviewerFormComment')) $settings[] = NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT;
118
		if(!$this->getData('notificationEditorDecisionComment')) $settings[] = NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT; 
119
		if(!$this->getData('notificationPublishedIssue')) $settings[] = NOTIFICATION_TYPE_PUBLISHED_ISSUE;
120
		if(!$this->getData('notificationUserComment')) $settings[] = NOTIFICATION_TYPE_USER_COMMENT;
121
		if(!$this->getData('notificationNewAnnouncement')) $settings[] = NOTIFICATION_TYPE_NEW_ANNOUNCEMENT;
122
		
123
		// Email settings
124
		$emailSettings = array();
125
		if($this->getData('emailNotificationArticleSubmitted')) $emailSettings[] = NOTIFICATION_TYPE_ARTICLE_SUBMITTED;
126
		if($this->getData('emailNotificationMetadataModified')) $emailSettings[] = NOTIFICATION_TYPE_METADATA_MODIFIED;
127
		if($this->getData('emailNotificationSuppFileAdded')) $emailSettings[] = NOTIFICATION_TYPE_SUPP_FILE_ADDED;
128
		if($this->getData('emailNotificationSuppFileModified')) $emailSettings[] = NOTIFICATION_TYPE_SUPP_FILE_MODIFIED;
129
		if($this->getData('emailNotificationGalleyAdded')) $emailSettings[] = NOTIFICATION_TYPE_GALLEY_ADDED;
130
		if($this->getData('emailNotificationGalleyModified')) $emailSettings[] = NOTIFICATION_TYPE_GALLEY_MODIFIED;
131
		if($this->getData('emailNotificationSubmissionComment')) $emailSettings[] = NOTIFICATION_TYPE_SUBMISSION_COMMENT;
132
		if($this->getData('emailNotificationLayoutComment')) $emailSettings[] = NOTIFICATION_TYPE_LAYOUT_COMMENT;
133
		if($this->getData('emailNotificationCopyeditComment')) $emailSettings[] = NOTIFICATION_TYPE_COPYEDIT_COMMENT;
134
		if($this->getData('emailNotificationProofreadComment')) $emailSettings[] = NOTIFICATION_TYPE_PROOFREAD_COMMENT;
135
		if($this->getData('emailNotificationReviewerComment')) $emailSettings[] = NOTIFICATION_TYPE_REVIEWER_COMMENT;
136
		if($this->getData('emailNotificationReviewerFormComment')) $emailSettings[] = NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT;
137
		if($this->getData('emailNotificationEditorDecisionComment')) $emailSettings[] = NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT; 
138
		if($this->getData('emailNotificationPublishedIssue')) $emailSettings[] = NOTIFICATION_TYPE_PUBLISHED_ISSUE;
139
		if($this->getData('emailNotificationUserComment')) $emailSettings[] = NOTIFICATION_TYPE_USER_COMMENT;
140
		if($this->getData('emailNotificationNewAnnouncement')) $emailSettings[] = NOTIFICATION_TYPE_NEW_ANNOUNCEMENT;
141
		
142
		$notificationSettingsDao =& DAORegistry::getDAO('NotificationSettingsDAO');
143
		$notificationSettingsDao->updateNotificationSettings($settings, $userId);
144
		$notificationSettingsDao->updateNotificationEmailSettings($emailSettings, $userId);
145
		
146
		return true;
147
	}
148
149
150
}
151
152
?>
(-)classes/site/ImportOJS1.inc.php (-9 lines)
 Lines 555-561    Link Here 
555
555
556
		$userDao = &DAORegistry::getDAO('UserDAO');
556
		$userDao = &DAORegistry::getDAO('UserDAO');
557
		$roleDao = &DAORegistry::getDAO('RoleDAO');
557
		$roleDao = &DAORegistry::getDAO('RoleDAO');
558
		$notifyDao = &DAORegistry::getDAO('NotificationStatusDAO');
559
558
560
		$result = &$this->importDao->retrieve('SELECT *, DECODE(chPassword, ?) AS chPassword FROM tblusers ORDER BY nUserID', $this->journalConfigInfo['chPasswordSalt']);
559
		$result = &$this->importDao->retrieve('SELECT *, DECODE(chPassword, ?) AS chPassword FROM tblusers ORDER BY nUserID', $this->journalConfigInfo['chPasswordSalt']);
561
		while (!$result->EOF) {
560
		while (!$result->EOF) {
 Lines 625-638    Link Here 
625
			}
624
			}
626
			$userId = $user->getUserId();
625
			$userId = $user->getUserId();
627
626
628
			if ($row['bNotify']) {
629
				if ($existingUser) {
630
					// Just in case
631
					$notifyDao->setJournalNotifications($this->journalId, $userId, 0);
632
				}
633
				$notifyDao->setJournalNotifications($this->journalId, $userId, 1);
634
			}
635
636
			if ($row['fkEditorID']) {
627
			if ($row['fkEditorID']) {
637
				$role = new Role();
628
				$role = new Role();
638
				$role->setJournalId($this->journalId);
629
				$role->setJournalId($this->journalId);
(-)classes/submission/author/AuthorAction.inc.php (+27 lines)
 Lines 277-282    Link Here 
277
			if ($commentForm->validate()) {
277
			if ($commentForm->validate()) {
278
				$commentForm->execute();
278
				$commentForm->execute();
279
279
280
				// Send a notification to associated users
281
				import('notification.Notification');
282
				$notificationUsers = $article->getAssociatedUserIds(true, false);
283
				foreach ($notificationUsers as $user) {
284
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
285
					Notification::createNotification($user['id'], "notification.type.layoutComment",
286
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT);
287
				}
288
				
280
				if ($emailComment) {
289
				if ($emailComment) {
281
					$commentForm->email();
290
					$commentForm->email();
282
				}
291
				}
 Lines 389-394    Link Here 
389
			if ($commentForm->validate()) {
398
			if ($commentForm->validate()) {
390
				$commentForm->execute();
399
				$commentForm->execute();
391
400
401
				// Send a notification to associated users
402
				import('notification.Notification');
403
				$notificationUsers = $article->getAssociatedUserIds(true, false);
404
				foreach ($notificationUsers as $user) {
405
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'copyedit');
406
					Notification::createNotification($user['id'], "notification.type.copyeditComment",
407
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_COPYEDIT_COMMENT);
408
				}
409
				
392
				if ($emailComment) {
410
				if ($emailComment) {
393
					$commentForm->email();
411
					$commentForm->email();
394
				}
412
				}
 Lines 432-437    Link Here 
432
			if ($commentForm->validate()) {
450
			if ($commentForm->validate()) {
433
				$commentForm->execute();
451
				$commentForm->execute();
434
452
453
				// Send a notification to associated users
454
				import('notification.Notification');
455
				$notificationUsers = $article->getAssociatedUserIds(true, false);
456
				foreach ($notificationUsers as $user) {
457
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'proofread');
458
					Notification::createNotification($user['id'], "notification.type.proofreadComment",
459
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT);
460
				}
461
				
435
				if ($emailComment) {
462
				if ($emailComment) {
436
					$commentForm->email();
463
					$commentForm->email();
437
				}
464
				}
(-)classes/submission/common/Action.inc.php (-1 / +19 lines)
 Lines 149-155    Link Here 
149
149
150
			} else {
150
			} else {
151
				$metadataForm->execute();
151
				$metadataForm->execute();
152
152
				
153
				// Send a notification to associated users
154
				import('notification.Notification');
155
				$notificationUsers = $article->getAssociatedUserIds();
156
				foreach ($notificationUsers as $user) {
157
					$url = Request::url(null, $user['role'], 'submission', $article->getArticleId(), null, 'metadata');
158
					Notification::createNotification($user['id'], "notification.type.metadataModified",
159
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_METADATA_MODIFIED);
160
				}
161
		
153
				// Add log entry
162
				// Add log entry
154
				$user = &Request::getUser();
163
				$user = &Request::getUser();
155
				import('article.log.ArticleLog');
164
				import('article.log.ArticleLog');
 Lines 257-262    Link Here 
257
			if ($commentForm->validate()) {
266
			if ($commentForm->validate()) {
258
				$commentForm->execute();
267
				$commentForm->execute();
259
268
269
				// Send a notification to associated users
270
				import('notification.Notification');
271
				$notificationUsers = $article->getAssociatedUserIds(true, false);
272
				foreach ($notificationUsers as $user) {
273
					$url = Request::url(null, $user['role'], 'submissionReview', $article->getArticleId(), null, 'editorDecision');
274
					Notification::createNotification($user['id'], "notification.type.submissionComment",
275
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUBMISSION_COMMENT);
276
				}
277
				
260
				if ($emailComment) {
278
				if ($emailComment) {
261
					$commentForm->email($commentForm->emailHelper());
279
					$commentForm->email($commentForm->emailHelper());
262
				}
280
				}
(-)classes/submission/copyeditor/CopyeditorAction.inc.php (+18 lines)
 Lines 286-291    Link Here 
286
			if ($commentForm->validate()) {
286
			if ($commentForm->validate()) {
287
				$commentForm->execute();
287
				$commentForm->execute();
288
288
289
				// Send a notification to associated users
290
				import('notification.Notification');
291
				$notificationUsers = $article->getAssociatedUserIds(true, false);
292
				foreach ($notificationUsers as $user) {
293
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
294
					Notification::createNotification($user['id'], "notification.type.layoutComment",
295
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT);
296
				}
297
				
289
				if ($emailComment) {
298
				if ($emailComment) {
290
					$commentForm->email();
299
					$commentForm->email();
291
				}
300
				}
 Lines 328-333    Link Here 
328
			if ($commentForm->validate()) {
337
			if ($commentForm->validate()) {
329
				$commentForm->execute();
338
				$commentForm->execute();
330
339
340
				// Send a notification to associated users
341
				import('notification.Notification');
342
				$notificationUsers = $article->getAssociatedUserIds(true, false);
343
				foreach ($notificationUsers as $user) {
344
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'coypedit');
345
					Notification::createNotification($user['id'], "notification.type.copyeditComment",
346
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_COPYEDIT_COMMENT);
347
				}
348
				
331
				if ($emailComment) {
349
				if ($emailComment) {
332
					$commentForm->email();
350
					$commentForm->email();
333
				}
351
				}
(-)classes/submission/layoutEditor/LayoutEditorAction.inc.php (-2 / +20 lines)
 Lines 252-258    Link Here 
252
252
253
			if ($commentForm->validate()) {
253
			if ($commentForm->validate()) {
254
				$commentForm->execute();
254
				$commentForm->execute();
255
255
				
256
				// Send a notification to associated users
257
				import('notification.Notification');
258
				$notificationUsers = $article->getAssociatedUserIds(true, false);
259
				foreach ($notificationUsers as $user) {
260
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
261
					Notification::createNotification($user['id'], "notification.type.layoutComment",
262
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT);
263
				}
264
				
256
				if ($emailComment) {
265
				if ($emailComment) {
257
					$commentForm->email();
266
					$commentForm->email();
258
				}
267
				}
 Lines 294-300    Link Here 
294
303
295
			if ($commentForm->validate()) {
304
			if ($commentForm->validate()) {
296
				$commentForm->execute();
305
				$commentForm->execute();
297
306
				
307
				// Send a notification to associated users
308
				import('notification.Notification');
309
				$notificationUsers = $article->getAssociatedUserIds(true, false);
310
				foreach ($notificationUsers as $user) {
311
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'proofread');
312
					Notification::createNotification($user['id'], "notification.type.proofreadComment",
313
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT);
314
				}
315
				
298
				if ($emailComment) {
316
				if ($emailComment) {
299
					$commentForm->email();
317
					$commentForm->email();
300
				}
318
				}
(-)classes/submission/proofreader/ProofreaderAction.inc.php (-1 / +19 lines)
 Lines 474-479    Link Here 
474
			if ($commentForm->validate()) {
474
			if ($commentForm->validate()) {
475
				$commentForm->execute();
475
				$commentForm->execute();
476
476
477
				// Send a notification to associated users
478
				import('notification.Notification');
479
				$notificationUsers = $article->getAssociatedUserIds(true, false);
480
				foreach ($notificationUsers as $user) {
481
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'proofread');
482
					Notification::createNotification($user['id'], "notification.type.proofreadComment",
483
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT);
484
				}
485
				
477
				if ($emailComment) {
486
				if ($emailComment) {
478
					$commentForm->email();
487
					$commentForm->email();
479
				}
488
				}
 Lines 516-522    Link Here 
516
525
517
			if ($commentForm->validate()) {
526
			if ($commentForm->validate()) {
518
				$commentForm->execute();
527
				$commentForm->execute();
519
528
								
529
				// Send a notification to associated users
530
				import('notification.Notification');
531
				$notificationUsers = $article->getAssociatedUserIds(true, false);
532
				foreach ($notificationUsers as $user) {
533
					$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
534
					Notification::createNotification($user['id'], "notification.type.layoutComment",
535
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT);
536
				}
537
				
520
				if ($emailComment) {
538
				if ($emailComment) {
521
					$commentForm->email();
539
					$commentForm->email();
522
				}
540
				}
(-)classes/submission/reviewer/ReviewerAction.inc.php (+24 lines)
 Lines 305-310    Link Here 
305
			if ($commentForm->validate()) {
305
			if ($commentForm->validate()) {
306
				$commentForm->execute();
306
				$commentForm->execute();
307
307
308
				// Send a notification to associated users
309
				import('notification.Notification');
310
				$notificationUsers = $article->getAssociatedUserIds();
311
				foreach ($notificationUsers as $user) {
312
					$url = Request::url(null, $user['role'], 'submissionReview', $article->getArticleId(), null, 'peerReview');
313
					Notification::createNotification($user['id'], "notification.type.reviewerComment",
314
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_REVIEWER_COMMENT);
315
				}
316
				
308
				if ($emailComment) {
317
				if ($emailComment) {
309
					$commentForm->email();
318
					$commentForm->email();
310
				}
319
				}
 Lines 347-352    Link Here 
347
			$reviewForm->readInputData();
356
			$reviewForm->readInputData();
348
			if ($reviewForm->validate()) {
357
			if ($reviewForm->validate()) {
349
				$reviewForm->execute();
358
				$reviewForm->execute();
359
360
				// Send a notification to associated users
361
				import('notification.Notification');
362
				$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
363
				$reviewAssignment = $reviewAssignmentDao->getReviewAssignmentById($reviewId);
364
				$articleId = $reviewAssignment->getArticleId();
365
				$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
366
				$article =& $articleDao->getArticle($articleId);
367
				$notificationUsers = $article->getAssociatedUserIds();
368
				foreach ($notificationUsers as $user) {
369
					$url = Request::url(null, $user['role'], 'submissionReview', $article->getArticleId(), null, 'peerReview');
370
					Notification::createNotification($user['id'], "notification.type.reviewerFormComment",
371
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT);
372
				}
373
				
350
			} else {
374
			} else {
351
				$reviewForm->display();
375
				$reviewForm->display();
352
				return false;
376
				return false;
(-)classes/submission/sectionEditor/SectionEditorAction.inc.php (+45 lines)
 Lines 1758-1763    Link Here 
1758
		if ($commentForm->validate()) {
1758
		if ($commentForm->validate()) {
1759
			$commentForm->execute();
1759
			$commentForm->execute();
1760
1760
1761
			// Send a notification to associated users
1762
			import('notification.Notification');
1763
			$notificationUsers = $article->getAssociatedUserIds();
1764
			foreach ($notificationUsers as $user) {
1765
				$url = Request::url(null, $user['role'], 'submissionReview', $article->getArticleId(), null, 'peerReview');
1766
				Notification::createNotification($user['id'], "notification.type.reviewerComment",
1767
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_REVIEWER_COMMENT);
1768
			}
1769
				
1761
			if ($emailComment) {
1770
			if ($emailComment) {
1762
				$commentForm->email();
1771
				$commentForm->email();
1763
			}
1772
			}
 Lines 1801-1806    Link Here 
1801
		if ($commentForm->validate()) {
1810
		if ($commentForm->validate()) {
1802
			$commentForm->execute();
1811
			$commentForm->execute();
1803
1812
1813
			// Send a notification to associated users
1814
			import('notification.Notification');
1815
			$notificationUsers = $article->getAssociatedUserIds(true, false);
1816
			foreach ($notificationUsers as $user) {
1817
				$url = Request::url(null, $user['role'], 'submissionReview', $article->getArticleId(), null, 'editorDecision');
1818
				Notification::createNotification($user['id'], "notification.type.editorDecisionComment",
1819
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT);
1820
			}
1821
				
1804
			if ($emailComment) {
1822
			if ($emailComment) {
1805
				$commentForm->email();
1823
				$commentForm->email();
1806
			}
1824
			}
 Lines 2044-2049    Link Here 
2044
		if ($commentForm->validate()) {
2062
		if ($commentForm->validate()) {
2045
			$commentForm->execute();
2063
			$commentForm->execute();
2046
2064
2065
			// Send a notification to associated users
2066
			import('notification.Notification');
2067
			$notificationUsers = $article->getAssociatedUserIds(true, false);
2068
			foreach ($notificationUsers as $user) {
2069
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'copyedit');
2070
				Notification::createNotification($user['id'], "notification.type.copyeditComment",
2071
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_COPYEDIT_COMMENT);
2072
			}
2073
2047
			if ($emailComment) {
2074
			if ($emailComment) {
2048
				$commentForm->email();
2075
				$commentForm->email();
2049
			}
2076
			}
 Lines 2087-2092    Link Here 
2087
		if ($commentForm->validate()) {
2114
		if ($commentForm->validate()) {
2088
			$commentForm->execute();
2115
			$commentForm->execute();
2089
2116
2117
			// Send a notification to associated users
2118
			import('notification.Notification');
2119
			$notificationUsers = $article->getAssociatedUserIds(true, false);
2120
			foreach ($notificationUsers as $user) {
2121
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
2122
				Notification::createNotification($user['id'], "notification.type.layoutComment",
2123
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT);
2124
			}
2125
				
2090
			if ($emailComment) {
2126
			if ($emailComment) {
2091
				$commentForm->email();
2127
				$commentForm->email();
2092
			}
2128
			}
 Lines 2130-2135    Link Here 
2130
		if ($commentForm->validate()) {
2166
		if ($commentForm->validate()) {
2131
			$commentForm->execute();
2167
			$commentForm->execute();
2132
2168
2169
			// Send a notification to associated users
2170
			import('notification.Notification');
2171
			$notificationUsers = $article->getAssociatedUserIds(true, false);
2172
			foreach ($notificationUsers as $user) {
2173
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'proofread');
2174
				Notification::createNotification($user['id'], "notification.type.proofreadComment",
2175
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT);
2176
			}	
2177
			
2133
			if ($emailComment) {
2178
			if ($emailComment) {
2134
				$commentForm->email();
2179
				$commentForm->email();
2135
			}
2180
			}
(-)classes/user/form/ProfileForm.inc.php (-18 lines)
 Lines 108-114    Link Here 
108
108
109
		$roleDao = &DAORegistry::getDAO('RoleDAO');
109
		$roleDao = &DAORegistry::getDAO('RoleDAO');
110
		$journalDao = &DAORegistry::getDAO('JournalDAO');
110
		$journalDao = &DAORegistry::getDAO('JournalDAO');
111
		$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');
112
		$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
111
		$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
113
112
114
		$journals = &$journalDao->getJournals();
113
		$journals = &$journalDao->getJournals();
 Lines 124-130    Link Here 
124
123
125
		$journals = &$journalDao->getJournals();
124
		$journals = &$journalDao->getJournals();
126
		$journals = &$journals->toArray();
125
		$journals = &$journals->toArray();
127
		$journalNotifications = &$notificationStatusDao->getJournalNotifications($user->getUserId());
128
126
129
		$countryDao =& DAORegistry::getDAO('CountryDAO');
127
		$countryDao =& DAORegistry::getDAO('CountryDAO');
130
		$countries =& $countryDao->getCountries();
128
		$countries =& $countryDao->getCountries();
 Lines 257-263    Link Here 
257
255
258
		$roleDao = &DAORegistry::getDAO('RoleDAO');
256
		$roleDao = &DAORegistry::getDAO('RoleDAO');
259
		$journalDao = &DAORegistry::getDAO('JournalDAO');
257
		$journalDao = &DAORegistry::getDAO('JournalDAO');
260
		$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');
261
258
262
		// Roles
259
		// Roles
263
		$journal =& Request::getJournal();
260
		$journal =& Request::getJournal();
 Lines 288-308    Link Here 
288
			}
285
			}
289
		}
286
		}
290
287
291
		$journals = &$journalDao->getJournals();
292
		$journals = &$journals->toArray();
293
		$journalNotifications = $notificationStatusDao->getJournalNotifications($user->getUserId());
294
295
		$readerNotify = Request::getUserVar('journalNotify');
296
297
		foreach ($journals as $thisJournal) {
298
			$thisJournalId = $thisJournal->getJournalId();
299
			$currentlyReceives = !empty($journalNotifications[$thisJournalId]);
300
			$shouldReceive = !empty($readerNotify) && in_array($thisJournal->getJournalId(), $readerNotify);
301
			if ($currentlyReceives != $shouldReceive) {
302
				$notificationStatusDao->setJournalNotifications($thisJournalId, $user->getUserId(), $shouldReceive);
303
			}
304
		}
305
306
		$openAccessNotify = Request::getUserVar('openAccessNotify');
288
		$openAccessNotify = Request::getUserVar('openAccessNotify');
307
289
308
		$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
290
		$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
(-)classes/user/form/RegistrationForm.inc.php (-10 lines)
 Lines 320-335    Link Here 
320
			}
320
			}
321
		}
321
		}
322
322
323
		// By default, self-registering readers will receive
324
		// journal updates. (The double set is here to prevent a
325
		// duplicate insert error msg if there was a notification entry
326
		// left over from a previous role.)
327
		if (isset($allowedRoles['reader']) && $this->getData($allowedRoles['reader'])) {
328
			$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');
329
			$notificationStatusDao->setJournalNotifications($journal->getJournalId(), $userId, false);
330
			$notificationStatusDao->setJournalNotifications($journal->getJournalId(), $userId, true);
331
		}
332
333
		if (isset($allowedRoles['reader']) && $this->getData('openAccessNotification')) {
323
		if (isset($allowedRoles['reader']) && $this->getData('openAccessNotification')) {
334
			$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
324
			$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');
335
			$userSettingsDao->updateSetting($userId, 'openAccessNotification', true, 'bool', $journal->getJournalId());
325
			$userSettingsDao->updateSetting($userId, 'openAccessNotification', true, 'bool', $journal->getJournalId());
(-)dbscripts/xml/ojs_schema.xml (-16 lines)
 Lines 306-327    Link Here 
306
			<UNIQUE />
306
			<UNIQUE />
307
		</index>
307
		</index>
308
	</table>
308
	</table>
309
310
	<table name="notification_status">
311
		<field name="journal_id" type="I8">
312
			<NOTNULL />
313
		</field>
314
		<field name="user_id" type="I8">
315
			<NOTNULL />
316
		</field>
317
		<descr>User "mail notifications to my account" flags</descr>
318
		<index name="notification_status_pkey">
319
			<col>journal_id</col>
320
			<col>user_id</col>
321
			<UNIQUE />
322
		</index>
323
	</table>
324
325
	<!--
309
	<!--
326
	  *
310
	  *
327
	  * TABLE sections
311
	  * TABLE sections
(-)dbscripts/xml/data/email_templates.xml (+15 lines)
 Lines 21-26    Link Here 
21
		  *
21
		  *
22
		  -->
22
		  -->
23
		<row>
23
		<row>
24
			<field name="email_key">NOTIFICATION</field>
25
			<field name="can_edit">1</field>
26
			<field name="can_disable">0</field>
27
		</row>
28
		<row>
29
			<field name="email_key">NOTIFICATION_MAILLIST</field>
30
			<field name="can_edit">1</field>
31
			<field name="can_disable">0</field>
32
		</row>
33
		<row>
34
			<field name="email_key">NOTIFICATION_MAILLIST_PASSWORD</field>
35
			<field name="can_edit">1</field>
36
			<field name="can_disable">0</field>
37
		</row>
38
		<row>
24
			<field name="email_key">PASSWORD_RESET_CONFIRM</field>
39
			<field name="email_key">PASSWORD_RESET_CONFIRM</field>
25
			<field name="can_edit">1</field>
40
			<field name="can_edit">1</field>
26
			<field name="can_disable">0</field>
41
			<field name="can_disable">0</field>
(-)dbscripts/xml/data/locale/en_US/email_templates_data.xml (+51 lines)
 Lines 22-27    Link Here 
22
		  *
22
		  *
23
		  -->
23
		  -->
24
		<row>
24
		<row>
25
			<field name="email_key">NOTIFICATION</field>
26
			<field name="subject">New notification from {$siteTitle}</field>
27
			<field name="body">You have a new notification from {$siteTitle}:
28
29
{$notificationContents}
30
31
Link: {$url}
32
33
{$principalContactSignature}</field>
34
			<field name="description">The email is sent to registered users that have selected to have this type of notification emailed to them.</field>
35
		</row>
36
		<row>
37
			<field name="email_key">NOTIFICATION_MAILLIST</field>
38
			<field name="subject">New notification from {$siteTitle}</field>
39
			<field name="body">You have a new notification from {$siteTitle}:
40
--
41
{$notificationContents}
42
43
Link: {$url}
44
--
45
46
If you wish to stop receiving notification emails, please go to {$unsubscribeLink} and enter your email address and password.
47
48
{$principalContactSignature}</field>
49
			<field name="description">This email is sent to unregistered users on the notification mailing list.</field>
50
		</row>
51
		<row>
52
			<field name="email_key">NOTIFICATION_MAILLIST_WELCOME</field>
53
			<field name="subject">Welcome to the the {$siteTitle} mailing list!</field>
54
			<field name="body">You have signed up to receive notifications from {$siteTitle}.
55
			
56
Please click on this link to confirm your request and add your email address to the mailing list: {$confirmLink}
57
58
If you wish to stop receiving notification emails, please go to {$unsubscribeLink} and enter your email address and password.
59
60
Your password for disabling notification emails is: {$password}
61
62
{$principalContactSignature}</field>
63
			<field name="description">This email is sent to an unregistered user who just registered with the notification mailing list.</field>
64
		</row>
65
		<row>
66
			<field name="email_key">NOTIFICATION_MAILLIST_PASSWORD</field>
67
			<field name="subject">Your notification mailing list information for {$siteTitle}</field>
68
			<field name="body">Your new password for disabling notification emails is: {$password}
69
70
If you wish to stop receiving notification emails, please go to {$unsubscribeLink} and enter your email address and password.
71
72
{$principalContactSignature}</field>
73
			<field name="description">This email is sent to an unregistered user on the notification mailing list when they indicate that they have forgotten their password or are unable to login. It provides a URL they can follow to reset their password.</field>
74
		</row>
75
		<row>
25
			<field name="email_key">PASSWORD_RESET_CONFIRM</field>
76
			<field name="email_key">PASSWORD_RESET_CONFIRM</field>
26
			<field name="subject">Password Reset Confirmation</field>
77
			<field name="subject">Password Reset Confirmation</field>
27
			<field name="body">We have received a request to reset your password for the {$siteTitle} web site.
78
			<field name="body">We have received a request to reset your password for the {$siteTitle} web site.
(-)dbscripts/xml/upgrade/2.3.0_update.xml (+4 lines)
 Lines 23-26    Link Here 
23
		<query>INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'EDITOR_DECISION_RESUBMIT', 'Editor Decision', '{$authorName}:\n\nWe have reached a decision regarding your submission to {$journalTitle}, \"{$articleTitle}\".\n\nOur decision is to:\n\n{$editorialContactSignature}\n', 'This email from the Editor or Section Editor to an Author notifies them of a final decision regarding their submission.')</query>
23
		<query>INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'EDITOR_DECISION_RESUBMIT', 'Editor Decision', '{$authorName}:\n\nWe have reached a decision regarding your submission to {$journalTitle}, \"{$articleTitle}\".\n\nOur decision is to:\n\n{$editorialContactSignature}\n', 'This email from the Editor or Section Editor to an Author notifies them of a final decision regarding their submission.')</query>
24
		<query>INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'EDITOR_DECISION_DECLINE', 'Editor Decision', '{$authorName}:\n\nWe have reached a decision regarding your submission to {$journalTitle}, \"{$articleTitle}\".\n\nOur decision is to:\n\n{$editorialContactSignature}\n', 'This email from the Editor or Section Editor to an Author notifies them of a final decision regarding their submission.')</query>
24
		<query>INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'EDITOR_DECISION_DECLINE', 'Editor Decision', '{$authorName}:\n\nWe have reached a decision regarding your submission to {$journalTitle}, \"{$articleTitle}\".\n\nOur decision is to:\n\n{$editorialContactSignature}\n', 'This email from the Editor or Section Editor to an Author notifies them of a final decision regarding their submission.')</query>
25
	</sql>
25
	</sql>
26
	<!-- Bug #3922# No need for the notification_status table (it is encapsulated by the notification table) -->
27
	<sql>
28
		<drop table="notification_status" />
29
	</sql>
26
</data>
30
</data>
(-)pages/about/AboutHandler.inc.php (-4 lines)
 Lines 556-565    Link Here 
556
			$templateMgr->assign('subscriptionStatistics', $subscriptionStatistics);
556
			$templateMgr->assign('subscriptionStatistics', $subscriptionStatistics);
557
		}
557
		}
558
558
559
		$notificationStatusDao =& DAORegistry::getDAO('NotificationStatusDAO');
560
		$notifiableUsers = $notificationStatusDao->getNotifiableUsersCount($journal->getJournalId());
561
		$templateMgr->assign('notifiableUsers', $notifiableUsers);
562
563
		$templateMgr->display('about/statistics.tpl');
559
		$templateMgr->display('about/statistics.tpl');
564
	}
560
	}
565
561
(-)pages/admin/AdminJournalHandler.inc.php (+1 lines)
 Lines 77-82    Link Here 
77
		if ($settingsForm->validate()) {
77
		if ($settingsForm->validate()) {
78
			PluginRegistry::loadCategory('blocks');
78
			PluginRegistry::loadCategory('blocks');
79
			$settingsForm->execute();
79
			$settingsForm->execute();
80
80
			Request::redirect(null, null, 'journals');
81
			Request::redirect(null, null, 'journals');
81
82
82
		} else {
83
		} else {
(-)pages/admin/AdminPeopleHandler.inc.php (-2 lines)
 Lines 125-132    Link Here 
125
			$subscriptionDao->deleteSubscriptionsByUserId($oldUserId);
125
			$subscriptionDao->deleteSubscriptionsByUserId($oldUserId);
126
			$temporaryFileDao =& DAORegistry::getDAO('TemporaryFileDAO');
126
			$temporaryFileDao =& DAORegistry::getDAO('TemporaryFileDAO');
127
			$temporaryFileDao->deleteTemporaryFilesByUserId($oldUserId);
127
			$temporaryFileDao->deleteTemporaryFilesByUserId($oldUserId);
128
			$notificationStatusDao =& DAORegistry::getDAO('NotificationStatusDAO');
129
			$notificationStatusDao->deleteNotificationStatusByUserId($oldUserId);
130
			$userSettingsDao =& DAORegistry::getDAO('UserSettingsDAO');
128
			$userSettingsDao =& DAORegistry::getDAO('UserSettingsDAO');
131
			$userSettingsDao->deleteSettings($oldUserId);
129
			$userSettingsDao->deleteSettings($oldUserId);
132
			$groupMembershipDao =& DAORegistry::getDAO('GroupMembershipDAO');
130
			$groupMembershipDao =& DAORegistry::getDAO('GroupMembershipDAO');
(-)pages/admin/AdminSettingsHandler.inc.php (-1 lines)
 Lines 77-83    Link Here 
77
			}
77
			}
78
		} elseif ($settingsForm->validate()) {
78
		} elseif ($settingsForm->validate()) {
79
			$settingsForm->execute();
79
			$settingsForm->execute();
80
81
			$templateMgr = &TemplateManager::getManager();
80
			$templateMgr = &TemplateManager::getManager();
82
			$templateMgr->assign(array(
81
			$templateMgr->assign(array(
83
				'currentUrl' => Request::url(null, null, 'settings'),
82
				'currentUrl' => Request::url(null, null, 'settings'),
(-)pages/author/SubmitHandler.inc.php (+19 lines)
 Lines 144-149    Link Here 
144
			$articleId = $submitForm->execute();
144
			$articleId = $submitForm->execute();
145
145
146
			if ($step == 5) {
146
			if ($step == 5) {
147
				// Send a notification to associated users
148
				import('notification.Notification');
149
				$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
150
				$article =& $articleDao->getArticle($articleId);
151
				$roleDao = &DAORegistry::getDAO('RoleDAO');
152
				$notificationUsers = array();
153
				$journalManagers = $roleDao->getUsersByRoleId(ROLE_ID_JOURNAL_MANAGER);
154
				$allUsers = $journalManagers->toArray();
155
				$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR);
156
				array_merge($allUsers, $editors->toArray());
157
				foreach ($allUsers as $user) {
158
					$notificationUsers[] = array('id' => $user->getUserId());
159
				}
160
				foreach ($notificationUsers as $user) {
161
					$url = Request::url(null, 'editor', 'submission', $articleId);
162
					Notification::createNotification($user['id'], "notification.type.articleSubmitted",
163
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_ARTICLE_SUBMITTED);
164
				}
165
				
147
				$journal = &Request::getJournal();
166
				$journal = &Request::getJournal();
148
				$templateMgr = &TemplateManager::getManager();
167
				$templateMgr = &TemplateManager::getManager();
149
				$templateMgr->assign_by_ref('journal', $journal);
168
				$templateMgr->assign_by_ref('journal', $journal);
(-)pages/comment/CommentHandler.inc.php (+12 lines)
 Lines 97-102    Link Here 
97
			$commentForm->readInputData();
97
			$commentForm->readInputData();
98
			if ($commentForm->validate()) {
98
			if ($commentForm->validate()) {
99
				$commentForm->execute();
99
				$commentForm->execute();
100
				
101
				// Send a notification to associated users
102
				import('notification.Notification');
103
				$articleDAO =& DAORegistry::getDAO('ArticleDAO');
104
				$article =& $articleDAO->getArticle($articleId);
105
				$notificationUsers = $article->getAssociatedUserIds();
106
				foreach ($notificationUsers as $user) {
107
					$url = Request::url(null, null, 'view', array($articleId, $galleyId, $parentId));
108
					Notification::createNotification($user['id'], "notification.type.userComment",
109
						$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_USER_COMMENT);
110
				}
111
				
100
				Request::redirect(null, null, 'view', array($articleId, $galleyId, $parentId), array('refresh' => 1));
112
				Request::redirect(null, null, 'view', array($articleId, $galleyId, $parentId), array('refresh' => 1));
101
			}
113
			}
102
		}
114
		}
(-)pages/editor/IssueManagementHandler.inc.php (-10 / +22 lines)
 Lines 94-100    Link Here 
94
				$issueDao->updateIssue($issue);
94
				$issueDao->updateIssue($issue);
95
			}
95
			}
96
		}
96
		}
97
98
		Request::redirect(null, null, 'backIssues');
97
		Request::redirect(null, null, 'backIssues');
99
	}
98
	}
100
99
 Lines 537-543    Link Here 
537
536
538
		$issueDao = &DAORegistry::getDAO('IssueDAO');
537
		$issueDao = &DAORegistry::getDAO('IssueDAO');
539
		$issueDao->updateCurrentIssue($journalId,$issue);
538
		$issueDao->updateCurrentIssue($journalId,$issue);
540
539
		
540
		// Send a notification to associated users
541
		import('notification.Notification');
542
		$roleDao = &DAORegistry::getDAO('RoleDAO');
543
		$notificationUsers = array();
544
		$allUsers = $roleDao->getUsersByJournalId($journalId);
545
		while (!$allUsers->eof()) {
546
			$user = &$allUsers->next();
547
			$notificationUsers[] = array('id' => $user->getUserId());
548
			unset($user);
549
		}
550
		$url = Request::url(null, 'issue', 'current');
551
		foreach ($notificationUsers as $user) {
552
			Notification::createNotification($user['id'], "notification.type.issuePublished",
553
				null, $url, 1, NOTIFICATION_TYPE_PUBLISHED_ISSUE);
554
		}
555
		$notificationDao = &DAORegistry::getDAO('NotificationDAO');
556
		$notificationDao->sendToMailingList(Notification::createNotification(0, "notification.type.issuePublished",
557
				null, $url, 1, NOTIFICATION_TYPE_PUBLISHED_ISSUE));
558
				
541
		Request::redirect(null, null, 'issueToc', $issue->getIssueId());
559
		Request::redirect(null, null, 'issueToc', $issue->getIssueId());
542
	}
560
	}
543
561
 Lines 550-556    Link Here 
550
568
551
		$userDao = &DAORegistry::getDAO('UserDAO');
569
		$userDao = &DAORegistry::getDAO('UserDAO');
552
		$issueDao = &DAORegistry::getDAO('IssueDAO');
570
		$issueDao = &DAORegistry::getDAO('IssueDAO');
553
		$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');
554
		$roleDao = &DAORegistry::getDAO('RoleDAO');
571
		$roleDao = &DAORegistry::getDAO('RoleDAO');
555
572
556
		$journal = &Request::getJournal();
573
		$journal = &Request::getJournal();
 Lines 563-573    Link Here 
563
		if (Request::getUserVar('send') && !$email->hasErrors()) {
580
		if (Request::getUserVar('send') && !$email->hasErrors()) {
564
			$email->addRecipient($user->getEmail(), $user->getFullName());
581
			$email->addRecipient($user->getEmail(), $user->getFullName());
565
582
566
			if (Request::getUserVar('whichUsers') == 'allUsers') {
583
			$recipients = $roleDao->getUsersByJournalId($journal->getJournalId());
567
				$recipients = $roleDao->getUsersByJournalId($journal->getJournalId());
584
568
			} else {
569
				$recipients = $notificationStatusDao->getNotifiableUsersByJournalId($journal->getJournalId());
570
			}
571
			while (!$recipients->eof()) {
585
			while (!$recipients->eof()) {
572
				$recipient = &$recipients->next();
586
				$recipient = &$recipients->next();
573
				$email->addRecipient($recipient->getEmail(), $recipient->getFullName());
587
				$email->addRecipient($recipient->getEmail(), $recipient->getFullName());
 Lines 610-616    Link Here 
610
					'editorialContactSignature' => $user->getContactSignature()
624
					'editorialContactSignature' => $user->getContactSignature()
611
				));
625
				));
612
			}
626
			}
613
			$notifiableCount = $notificationStatusDao->getNotifiableUsersCount($journal->getJournalId());
614
			$allUsersCount = $roleDao->getJournalUsersCount($journal->getJournalId());
627
			$allUsersCount = $roleDao->getJournalUsersCount($journal->getJournalId());
615
628
616
			$issuesIterator = &$issueDao->getIssues($journal->getJournalId());
629
			$issuesIterator = &$issueDao->getIssues($journal->getJournalId());
 Lines 621-627    Link Here 
621
				'editor/notifyUsers.tpl',
634
				'editor/notifyUsers.tpl',
622
				array(
635
				array(
623
					'issues' => $issuesIterator,
636
					'issues' => $issuesIterator,
624
					'notifiableCount' => $notifiableCount,
625
					'allUsersCount' => $allUsersCount
637
					'allUsersCount' => $allUsersCount
626
				)
638
				)
627
			);
639
			);
(-)pages/layoutEditor/SubmissionLayoutHandler.inc.php (+23 lines)
 Lines 184-189    Link Here 
184
		if ($submitForm->validate()) {
184
		if ($submitForm->validate()) {
185
			$submitForm->execute();
185
			$submitForm->execute();
186
186
187
			// Send a notification to associated users
188
			import('notification.Notification');
189
			$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
190
			$article =& $articleDao->getArticle($articleId);
191
			$notificationUsers = $article->getAssociatedUserIds(true, false);
192
			foreach ($notificationUsers as $user) {
193
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
194
				Notification::createNotification($user['id'], "notification.type.galleyModified",
195
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_GALLEY_MODIFIED);
196
			}
197
187
			if (Request::getUserVar('uploadImage')) {
198
			if (Request::getUserVar('uploadImage')) {
188
				$submitForm->uploadImage();
199
				$submitForm->uploadImage();
189
				Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
200
				Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
 Lines 368-373    Link Here 
368
379
369
		if ($submitForm->validate()) {
380
		if ($submitForm->validate()) {
370
			$submitForm->execute();
381
			$submitForm->execute();
382
383
			// Send a notification to associated users
384
			import('notification.Notification');
385
			$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
386
			$article =& $articleDao->getArticle($articleId);
387
			$notificationUsers = $article->getAssociatedUserIds(true, false);
388
			foreach ($notificationUsers as $user) {
389
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
390
				Notification::createNotification($user['id'], "notification.type.suppFileModified",
391
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED);
392
			}
393
			
371
			Request::redirect(null, null, 'submission', $articleId);
394
			Request::redirect(null, null, 'submission', $articleId);
372
395
373
		} else {
396
		} else {
(-)pages/manager/ManagerPaymentHandler.inc.php (-1 lines)
 Lines 152-158    Link Here 
152
152
153
		if ($settingsForm->validate()) {
153
		if ($settingsForm->validate()) {
154
			$settingsForm->execute();
154
			$settingsForm->execute();
155
156
			$templateMgr->assign(array(
155
			$templateMgr->assign(array(
157
				'currentUrl' => Request::url(null, null, 'payMethodSettings'),
156
				'currentUrl' => Request::url(null, null, 'payMethodSettings'),
158
				'pageTitle' => 'manager.payment.paymentMethods',
157
				'pageTitle' => 'manager.payment.paymentMethods',
(-)pages/manager/SubscriptionHandler.inc.php (-2 lines)
 Lines 230-236    Link Here 
230
230
231
			if ($subscriptionForm->validate()) {
231
			if ($subscriptionForm->validate()) {
232
				$subscriptionForm->execute();
232
				$subscriptionForm->execute();
233
234
				if (Request::getUserVar('createAnother')) {
233
				if (Request::getUserVar('createAnother')) {
235
					Request::redirect(null, null, 'selectSubscriber', null, array('subscriptionCreated', 1));
234
					Request::redirect(null, null, 'selectSubscriber', null, array('subscriptionCreated', 1));
236
				} else {
235
				} else {
 Lines 465-471    Link Here 
465
464
466
		if ($subscriptionPolicyForm->validate()) {
465
		if ($subscriptionPolicyForm->validate()) {
467
			$subscriptionPolicyForm->execute();
466
			$subscriptionPolicyForm->execute();
468
469
			SubscriptionHandler::setupTemplate(true);
467
			SubscriptionHandler::setupTemplate(true);
470
468
471
			$templateMgr = &TemplateManager::getManager();
469
			$templateMgr = &TemplateManager::getManager();
(-)pages/sectionEditor/SubmissionEditHandler.inc.php (-1 / +46 lines)
 Lines 1214-1219    Link Here 
1214
1214
1215
		if ($submitForm->validate()) {
1215
		if ($submitForm->validate()) {
1216
			$submitForm->execute();
1216
			$submitForm->execute();
1217
1218
			// Send a notification to associated users
1219
			import('notification.Notification');
1220
			$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
1221
			$article =& $articleDao->getArticle($articleId);
1222
			$notificationUsers = $article->getAssociatedUserIds(true, false);
1223
			foreach ($notificationUsers as $user) {
1224
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
1225
				Notification::createNotification($user['id'], "notification.type.suppFileModified",
1226
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED);
1227
			}
1228
			
1217
			Request::redirect(null, null, SubmissionEditHandler::getFrom(), $articleId);
1229
			Request::redirect(null, null, SubmissionEditHandler::getFrom(), $articleId);
1218
		} else {
1230
		} else {
1219
			parent::setupTemplate(true, $articleId, 'summary');
1231
			parent::setupTemplate(true, $articleId, 'summary');
 Lines 1463-1468    Link Here 
1463
		$galleyForm =& new ArticleGalleyForm($articleId);
1475
		$galleyForm =& new ArticleGalleyForm($articleId);
1464
		$galleyId = $galleyForm->execute($fileName);
1476
		$galleyId = $galleyForm->execute($fileName);
1465
1477
1478
		// Send a notification to associated users
1479
		import('notification.Notification');
1480
		$articleDao = &DAORegistry::getDAO('ArticleDAO'); 
1481
		$article = &$articleDao->getArticle($articleId);
1482
		$notificationUsers = $article->getAssociatedUserIds(true, false);
1483
		foreach ($notificationUsers as $user) {
1484
			$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
1485
			Notification::createNotification($user['id'], "notification.type.galleyAdded",
1486
				$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_GALLEY_ADDED);
1487
		}
1488
		
1466
		Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
1489
		Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
1467
	}
1490
	}
1468
1491
 Lines 1507-1513    Link Here 
1507
		$submitForm->readInputData();
1530
		$submitForm->readInputData();
1508
		if ($submitForm->validate()) {
1531
		if ($submitForm->validate()) {
1509
			$submitForm->execute();
1532
			$submitForm->execute();
1510
1533
			
1534
			// Send a notification to associated users
1535
			import('notification.Notification');
1536
			$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
1537
			$article =& $articleDao->getArticle($articleId);
1538
			$notificationUsers = $article->getAssociatedUserIds(true, false);
1539
			foreach ($notificationUsers as $user) {
1540
				$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
1541
				Notification::createNotification($user['id'], "notification.type.galleyModified",
1542
					$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_GALLEY_MODIFIED);
1543
			}
1544
			
1511
			if (Request::getUserVar('uploadImage')) {
1545
			if (Request::getUserVar('uploadImage')) {
1512
				$submitForm->uploadImage();
1546
				$submitForm->uploadImage();
1513
				Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
1547
				Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
 Lines 1626-1631    Link Here 
1626
		$suppFileForm->setData('title', Locale::translate('common.untitled'));
1660
		$suppFileForm->setData('title', Locale::translate('common.untitled'));
1627
		$suppFileId = $suppFileForm->execute($fileName);
1661
		$suppFileId = $suppFileForm->execute($fileName);
1628
1662
1663
		// Send a notification to associated users
1664
		import('notification.Notification');
1665
		$articleDao =& DAORegistry::getDAO('ArticleDAO'); 
1666
		$article =& $articleDao->getArticle($articleId);
1667
		$notificationUsers = $article->getAssociatedUserIds(true, false);
1668
		foreach ($notificationUsers as $user) {
1669
			$url = Request::url(null, $user['role'], 'submissionEditing', $article->getArticleId(), null, 'layout');
1670
			Notification::createNotification($user['id'], "notification.type.suppFileAdded",
1671
				$article->getArticleTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_ADDED);
1672
		}
1673
1629
		Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
1674
		Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
1630
	}
1675
	}
1631
1676
(-)plugins/blocks/fontSize/FontSizeBlockPlugin.inc.php (-1 / +1 lines)
 Lines 23-29    Link Here 
23
		if ($success) {
23
		if ($success) {
24
			$this->addLocaleData();
24
			$this->addLocaleData();
25
			$templateMgr =& TemplateManager::getManager();
25
			$templateMgr =& TemplateManager::getManager();
26
			$templateMgr->assign('fontIconPath', 'templates/images/icons');
26
			$templateMgr->assign('fontIconPath', 'lib/pkp/templates/images/icons');
27
			$additionalHeadData = $templateMgr->get_template_vars('additionalHeadData');
27
			$additionalHeadData = $templateMgr->get_template_vars('additionalHeadData');
28
28
29
			// Add font sizer js and css if not already in header
29
			// Add font sizer js and css if not already in header
(-)styles/common.css (-1 / +18 lines)
 Lines 651-657    Link Here 
651
	font-size: 1em;
651
	font-size: 1em;
652
}
652
}
653
653
654
ul.formErrorList a {
654
span.formSuccess {
655
	color: #090;
656
	font-weight: bold;
657
	font-size: 1em;
658
}
659
660
ul.formErrorList {
655
	color: #900;
661
	color: #900;
656
}
662
}
657
663
 Lines 742-744    Link Here 
742
	width: 505px;
748
	width: 505px;
743
	z-index:1;
749
	z-index:1;
744
}
750
}
751
752
td.notificationContent {
753
	padding-left: 5px;
754
	padding-right: 5px;
755
}
756
757
td.notificationFunction {
758
	padding-left: 5px;
759
	padding-right: 5px;
760
	text-align: right;
761
}
(-)templates/article/article.tpl (-12 / +12 lines)
 Lines 15-23    Link Here 
15
		<div id="topBar">
15
		<div id="topBar">
16
			<div id="articleFontSize">
16
			<div id="articleFontSize">
17
				{translate key="article.fontSize"}:&nbsp;
17
				{translate key="article.fontSize"}:&nbsp;
18
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.small.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_small"}</a>&nbsp;
18
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.small.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_small"}</a>&nbsp;
19
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.medium.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_medium"}</a>&nbsp;
19
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.medium.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_medium"}</a>&nbsp;
20
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.large.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_large"}</a>
20
				<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.large.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_large"}</a>
21
			</div>
21
			</div>
22
		</div>
22
		</div>
23
		{$galley->getHTMLContents()}
23
		{$galley->getHTMLContents()}
 Lines 27-35    Link Here 
27
		{assign var=galleys value=$article->getLocalizedGalleys()}
27
		{assign var=galleys value=$article->getLocalizedGalleys()}
28
		{if $galleys && $subscriptionRequired && $showGalleyLinks}
28
		{if $galleys && $subscriptionRequired && $showGalleyLinks}
29
			<div id="accessKey">
29
			<div id="accessKey">
30
				<img src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
30
				<img src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
31
				{translate key="reader.openAccess"}&nbsp;
31
				{translate key="reader.openAccess"}&nbsp;
32
				<img src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
32
				<img src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
33
				{if $purchaseArticleEnabled}
33
				{if $purchaseArticleEnabled}
34
					{translate key="reader.subscriptionOrFeeAccess"}
34
					{translate key="reader.subscriptionOrFeeAccess"}
35
				{else}
35
				{else}
 Lines 39-47    Link Here 
39
		{/if}
39
		{/if}
40
		<div id="articleFontSize">
40
		<div id="articleFontSize">
41
				{translate key="article.fontSize"}:&nbsp;
41
				{translate key="article.fontSize"}:&nbsp;
42
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.small.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_small"}</a>&nbsp;
42
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.small.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_small"}</a>&nbsp;
43
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.medium.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_medium"}</a>&nbsp;
43
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.medium.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_medium"}</a>&nbsp;
44
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.large.altText"}');" class="icon">{icon path="templates/images/icons/" name="font_large"}</a>
44
			<a href="#" onclick="setFontSize('{translate|escape:"jsparam" key="article.fontSize.large.altText"}');" class="icon">{icon path="lib/pkp/templates/images/icons/" name="font_large"}</a>
45
		</div>
45
		</div>
46
	</div>
46
	</div>
47
	{if $coverPagePath}
47
	{if $coverPagePath}
 Lines 71-87    Link Here 
71
				<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getBestGalleyId($currentJournal)}" class="file" target="_parent">{$galley->getGalleyLabel()|escape}</a>
71
				<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getBestGalleyId($currentJournal)}" class="file" target="_parent">{$galley->getGalleyLabel()|escape}</a>
72
				{if $subscriptionRequired && $showGalleyLinks && $restrictOnlyPdf}
72
				{if $subscriptionRequired && $showGalleyLinks && $restrictOnlyPdf}
73
					{if $article->getAccessStatus() || !$galley->isPdfGalley()}	
73
					{if $article->getAccessStatus() || !$galley->isPdfGalley()}	
74
						<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
74
						<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
75
					{else}
75
					{else}
76
						<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
76
						<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
77
					{/if}
77
					{/if}
78
				{/if}
78
				{/if}
79
			{/foreach}
79
			{/foreach}
80
			{if $subscriptionRequired && $showGalleyLinks && !$restrictOnlyPdf}
80
			{if $subscriptionRequired && $showGalleyLinks && !$restrictOnlyPdf}
81
				{if $article->getAccessStatus()}
81
				{if $article->getAccessStatus()}
82
					<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
82
					<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
83
				{else}
83
				{else}
84
					<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
84
					<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
85
				{/if}
85
				{/if}
86
			{/if}					
86
			{/if}					
87
		{else}
87
		{else}
(-)templates/editor/notifyUsers.tpl (-22 lines)
 Lines 41-68    Link Here 
41
	<br/>
41
	<br/>
42
{/if}
42
{/if}
43
43
44
<h3>{translate key="email.recipients"}</h3>
45
<table class="data" width="100%">
46
<tr valign="top">
47
	<td width="5%">
48
		<input checked type="radio" name="whichUsers" id="interestedUsers" value="interestedUsers"/>
49
	</td>
50
	<td width="75%" class="label">
51
		<label for="interestedUsers">{translate key="editor.notifyUsers.interestedUsers" count=$notifiableCount}</label>
52
	</td>
53
</tr>
54
<tr valign="top">
55
	<td width="5%">
56
		<input type="radio" id="allUsers" name="whichUsers" value="allUsers"/>
57
	</td>
58
	<td width="95%" class="label">
59
		<label for="allUsers">{translate key="editor.notifyUsers.allUsers" count=$allUsersCount}</label>
60
	</td>
61
</tr>
62
</table>
63
64
<br/>
65
66
<h3>{translate key="issue.issue"}</h3>
44
<h3>{translate key="issue.issue"}</h3>
67
<table class="data" width="100%">
45
<table class="data" width="100%">
68
<tr valign="top">
46
<tr valign="top">
(-)templates/issue/issue.tpl (-4 / +4 lines)
 Lines 44-60    Link Here 
44
				<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getBestGalleyId($currentJournal)}" class="file">{$galley->getGalleyLabel()|escape}</a>
44
				<a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$galley->getBestGalleyId($currentJournal)}" class="file">{$galley->getGalleyLabel()|escape}</a>
45
				{if $subscriptionRequired && $showGalleyLinks && $restrictOnlyPdf}
45
				{if $subscriptionRequired && $showGalleyLinks && $restrictOnlyPdf}
46
					{if $article->getAccessStatus() || !$galley->isPdfGalley()}	
46
					{if $article->getAccessStatus() || !$galley->isPdfGalley()}	
47
						<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
47
						<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
48
					{else}
48
					{else}
49
						<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
49
						<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
50
					{/if}
50
					{/if}
51
				{/if}
51
				{/if}
52
			{/foreach}
52
			{/foreach}
53
			{if $subscriptionRequired && $showGalleyLinks && !$restrictOnlyPdf}
53
			{if $subscriptionRequired && $showGalleyLinks && !$restrictOnlyPdf}
54
				{if $article->getAccessStatus()}
54
				{if $article->getAccessStatus()}
55
					<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
55
					<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
56
				{else}
56
				{else}
57
					<img class="accessLogo" src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
57
					<img class="accessLogo" src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
58
				{/if}
58
				{/if}
59
			{/if}				
59
			{/if}				
60
		{/if}
60
		{/if}
(-)templates/issue/view.tpl (-2 / +2 lines)
 Lines 11-19    Link Here 
11
 *}
11
 *}
12
{if $subscriptionRequired && $showGalleyLinks && $showToc}
12
{if $subscriptionRequired && $showGalleyLinks && $showToc}
13
	<div id="accessKey">
13
	<div id="accessKey">
14
		<img src="{$baseUrl}/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
14
		<img src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_open_medium.gif" alt="{translate key="article.accessLogoOpen.altText"}" />
15
		{translate key="reader.openAccess"}&nbsp;
15
		{translate key="reader.openAccess"}&nbsp;
16
		<img src="{$baseUrl}/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
16
		<img src="{$baseUrl}/lib/pkp/templates/images/icons/fulltext_restricted_medium.gif" alt="{translate key="article.accessLogoRestricted.altText"}" />
17
		{if $purchaseArticleEnabled}
17
		{if $purchaseArticleEnabled}
18
			{translate key="reader.subscriptionOrFeeAccess"}
18
			{translate key="reader.subscriptionOrFeeAccess"}
19
		{else}
19
		{else}
(-)templates/notification/maillist.tpl (+97 lines)
Added Link Here 
1
{**
2
 * index.tpl
3
 *
4
 * Copyright (c) 2000-2008 John Willinsky
5
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6
 *
7
 * Displays the notification settings page and unchecks  
8
 *
9
 *}
10
{strip}
11
{assign var="pageTitle" value="notification.mailList"}
12
{include file="common/header.tpl"}
13
{/strip}
14
15
{if $new}
16
	<p><span class="instruct">{translate key="notification.mailListDescription"}</span></p>
17
	<br />
18
19
	{if $error}
20
		<p><span class="formError">{translate key="$error"}</span></p>
21
	{/if}
22
	
23
	{if $success}
24
		<p><span class="formSuccess">{translate key="$success"}</span></p>
25
	{/if}
26
27
	<form id="notificationSettings" method="post" action="{url op="subscribeMailList"}">
28
	
29
	<table class="data" width="100%">
30
		<tr valign="top">
31
			<td class="label" width="5%">{translate key="email.email"}</td>
32
			<td class="value" width="45%"><input type="text" name="email" size="30" maxlength="90" class="textField" /></td>
33
		</tr>
34
		<tr valign="top">
35
			<td width="5%">&nbsp;</td>
36
			<td><p><input type="submit" value="{translate key="form.submit"}" class="button defaultButton" /></p></td>
37
		</tr>
38
	</table>
39
	</form>
40
	<h5 style="margin-left:10%">{translate key="notification.mailList.register"}</h5>
41
	<ul class="plain" style="margin-left:10%">
42
		{if $settings.allowRegReviewer}
43
			{url|assign:"url" page="user" op="register"}
44
			<li>&#187; {translate key="notification.mailList.review" reviewUrl=$url} </li>
45
		{/if}
46
		{if $settings.allowRegAuthor}
47
			{url|assign:"url" page="information" op="authors"}
48
			<li>&#187; {translate key="notification.mailList.submit" submitUrl=$url} </li>
49
		{/if}
50
		{if $settings.subscriptionsEnabled}
51
			{url|assign:"url" page="user" op="register"}
52
			<li>&#187; {translate key="notification.mailList.protectedContent" subscribeUrl=$url}
53
		{/if}
54
	<li>&#187; <a href="{url page="about" op="submissions" anchor="privacyStatement"}">{translate key="about.privacyStatement"}</a></li>
55
	<ul>
56
{elseif $remove}
57
	<p><span class="instruct">{translate key="notification.unsubscribeDescription"}</span></p>
58
	<br />
59
60
	{if $error}
61
		<p><span class="formError">{translate key="$error"}</span></p>
62
	{/if}
63
	
64
	{if $success}
65
		<p><span class="formSuccess">{translate key="$success"}</span></p>
66
	{/if}
67
	
68
	<form id="notificationSettings" method="post" action="{url op="unsubscribeMailList"}">
69
	<table class="data" width="100%">
70
		<tr valign="top">
71
			<td class="label" width="5%">{translate key="email.email"}</td>
72
			<td class="value" width="45%"><input type="text" name="email" size="30" maxlength="90" class="textField" /></td>
73
		</tr>
74
		<tr valign="top">
75
			<td class="label" width="5%">{translate key="user.password"}</td>
76
			<td class="value" width="45%"><input type="text" name="password" size="30" maxlength="90" class="textField" /></td>
77
		</tr>
78
		<tr valign="top">
79
			<td width="5%">&nbsp;</td>
80
			<td><p><input type="submit" value="{translate key="form.submit"}" class="button defaultButton" /></p></td>
81
		</tr>
82
	</table>
83
	
84
	</form>
85
{elseif $confirm}
86
	{if $error}
87
		<p><span class="formError">{translate key="$error"}</span></p>
88
	{/if}
89
	
90
	{if $success}
91
		<p><span class="formSuccess">{translate key="$success"}</span></p>
92
	{/if}
93
{/if}
94
95
</form>
96
97
{include file="common/footer.tpl"}
(-)templates/notification/settings.tpl (+272 lines)
Added Link Here 
1
{**
2
 * index.tpl
3
 *
4
 * Copyright (c) 2000-2008 John Willinsky
5
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6
 *
7
 * Displays the notification settings page and unchecks  
8
 *
9
 *}
10
{strip}
11
{assign var="pageTitle" value="notification.settings"}
12
{include file="common/header.tpl"}
13
{/strip}
14
15
<p>{translate key="notification.settingsDescription"}</p>
16
17
<form id="notificationSettings" method="post" action="{url op="saveSettings"}">
18
19
<!-- Submission events -->
20
{if !$canOnlyRead && !$canOnlyReview}
21
<h4>{translate key="notification.type.submissions"}</h4>
22
23
<ul>
24
	<li>{translate key="notification.type.articleSubmitted" param=$titleVar}</li>
25
	<ul class="plain">
26
		<li><span>
27
				<input type="checkbox" name="notificationArticleSubmitted"{if !$smarty.const.NOTIFICATION_TYPE_ARTICLE_SUBMITTED|in_array:$notificationSettings} checked="checked"{/if} />
28
				{translate key="notification.allow"}
29
			</span></li>
30
		<li><span>
31
				<input type="checkbox" name="emailNotificationArticleSubmitted"{if $smarty.const.NOTIFICATION_TYPE_ARTICLE_SUBMITTED|in_array:$emailSettings} checked="checked"{/if} />
32
				{translate key="notification.email"}
33
			</span></li>
34
	</ul>
35
</ul>
36
			
37
<ul>
38
	<li>{translate key="notification.type.metadataModified" param=$titleVar}</li>
39
	<ul class="plain">
40
		<li><span>
41
				<input type="checkbox" name="notificationMetadataModified"{if !$smarty.const.NOTIFICATION_TYPE_METADATA_MODIFIED|in_array:$notificationSettings} checked="checked"{/if} />
42
				{translate key="notification.allow"}
43
			</span></li>
44
		<li><span>
45
				<input type="checkbox" name="emailNotificationMetadataModified"{if $smarty.const.NOTIFICATION_TYPE_METADATA_MODIFIED|in_array:$emailSettings} checked="checked"{/if} />
46
				{translate key="notification.email"}
47
			</span></li>
48
	</ul>
49
</ul>	
50
51
<ul>
52
	<li>{translate key="notification.type.suppFileAdded" param=$titleVar}</li>
53
	<ul class="plain">
54
		<li><span>
55
				<input type="checkbox" name="notificationSuppFileAdded"{if !$smarty.const.NOTIFICATION_TYPE_SUPP_FILE_ADDED|in_array:$notificationSettings} checked="checked"{/if} />
56
				{translate key="notification.allow"}
57
			</span></li>
58
		<li><span>
59
				<input type="checkbox" name="emailNotificationSuppFileAdded"{if $smarty.const.NOTIFICATION_TYPE_SUPP_FILE_ADDED|in_array:$emailSettings} checked="checked"{/if} />
60
				{translate key="notification.email"}
61
			</span></li>
62
	</ul>
63
</ul>
64
65
<ul>
66
	<li>{translate key="notification.type.suppFileModified" param=$titleVar}</li>
67
	<ul class="plain">
68
		<li><span>
69
				<input type="checkbox" name="notificationSuppFileModified"{if !$smarty.const.NOTIFICATION_TYPE_SUPP_FILE_MODIFIED|in_array:$notificationSettings} checked="checked"{/if} />
70
				{translate key="notification.allow"}
71
			</span></li>
72
		<li><span>
73
				<input type="checkbox" name="emailNotificationSuppFileModified"{if $smarty.const.NOTIFICATION_TYPE_SUPP_FILE_MODIFIED|in_array:$emailSettings} checked="checked"{/if} />
74
				{translate key="notification.email"}
75
			</span></li>
76
	</ul>
77
</ul>
78
79
<br />
80
81
{if !$canOnlyRead}
82
<!-- Reviewing events -->
83
<h4>{translate key="notification.type.reviewing"}</h4>
84
85
86
<ul>
87
	<li>{translate key="notification.type.reviewerComment" param=$titleVar}</li>
88
	<ul class="plain">
89
		<li><span>
90
				<input type="checkbox" name="notificationReviewerComment"{if !$smarty.const.NOTIFICATION_TYPE_REVIEWER_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
91
				{translate key="notification.allow"}
92
			</span></li>
93
		<li><span>
94
				<input type="checkbox" name="emailNotificationReviewerComment"{if $smarty.const.NOTIFICATION_TYPE_REVIEWER_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
95
				{translate key="notification.email"}
96
			</span></li>
97
	</ul>
98
</ul>
99
100
<ul>
101
	<li>{translate key="notification.type.reviewerFormComment" param=$titleVar}</li>
102
	<ul class="plain">
103
		<li><span>
104
				<input type="checkbox" name="notificationReviewerFormComment"{if !$smarty.const.NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
105
				{translate key="notification.allow"}
106
			</span></li>
107
		<li><span>
108
				<input type="checkbox" name="emailNotificationReviewerFormComment"{if $smarty.const.NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
109
				{translate key="notification.email"}
110
			</span></li>
111
	</ul>
112
</ul>
113
114
<ul>
115
	<li>{translate key="notification.type.editorDecisionComment" param=$titleVar}</li>
116
	<ul class="plain">
117
		<li><span>
118
				<input type="checkbox" name="notificationEditorDecisionComment"{if !$smarty.const.NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
119
				{translate key="notification.allow"}
120
			</span></li>
121
		<li><span>
122
				<input type="checkbox" name="emailNotificationEditorDecisionComment"{if $smarty.const.NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
123
				{translate key="notification.email"}
124
			</span></li>
125
	</ul>
126
</ul>
127
	
128
<br />
129
{/if}
130
131
<!-- Editing events -->
132
<h4>{translate key="notification.type.editing"}</h4>
133
134
<ul>
135
	<li>{translate key="notification.type.galleyAdded" param=$titleVar}</li>
136
	<ul class="plain">
137
		<li><span>
138
				<input type="checkbox" name="notificationGalleyAdded"{if !$smarty.const.NOTIFICATION_TYPE_GALLEY_ADDED|in_array:$notificationSettings} checked="checked"{/if} />
139
				{translate key="notification.allow"}
140
			</span></li>
141
		<li><span>
142
				<input type="checkbox" name="emailNotificationGalleyAdded"{if $smarty.const.NOTIFICATION_TYPE_GALLEY_ADDED|in_array:$emailSettings} checked="checked"{/if} />
143
				{translate key="notification.email"}
144
			</span></li>
145
	</ul>
146
</ul>
147
148
<ul>
149
	<li>{translate key="notification.type.galleyModified" param=$titleVar}</li>
150
	<ul class="plain">
151
		<li><span>
152
				<input type="checkbox" name="notificationGalleyModified"{if !$smarty.const.NOTIFICATION_TYPE_GALLEY_MODIFIED|in_array:$notificationSettings} checked="checked"{/if} />
153
				{translate key="notification.allow"}
154
			</span></li>
155
		<li><span>
156
				<input type="checkbox" name="emailNotificationGalleyModified"{if $smarty.const.NOTIFICATION_TYPE_GALLEY_MODIFIED|in_array:$emailSettings} checked="checked"{/if} />
157
				{translate key="notification.email"}
158
			</span></li>
159
	</ul>
160
</ul>
161
162
<ul>
163
	<li>{translate key="notification.type.submissionComment" param=$titleVar}</li>
164
	<ul class="plain">
165
		<li><span>
166
				<input type="checkbox" name="notificationSubmissionComment"{if !$smarty.const.NOTIFICATION_TYPE_SUBMISSION_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
167
				{translate key="notification.allow"}
168
			</span></li>
169
		<li><span>
170
				<input type="checkbox" name="emailNotificationSubmissionComment"{if $smarty.const.NOTIFICATION_TYPE_SUBMISSION_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
171
				{translate key="notification.email"}
172
			</span></li>
173
	</ul>
174
</ul>
175
176
<ul>
177
	<li>{translate key="notification.type.layoutComment" param=$titleVar}</li>
178
	<ul class="plain">
179
		<li><span>
180
				<input type="checkbox" name="notificationLayoutComment"{if !$smarty.const.NOTIFICATION_TYPE_LAYOUT_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
181
				{translate key="notification.allow"}
182
			</span></li>
183
		<li><span>
184
				<input type="checkbox" name="emailNotificationLayoutComment"{if $smarty.const.NOTIFICATION_TYPE_LAYOUT_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
185
				{translate key="notification.email"}
186
			</span></li>
187
	</ul>
188
</ul>
189
190
<ul>
191
	<li>{translate key="notification.type.copyeditComment" param=$titleVar}</li>
192
	<ul class="plain">
193
		<li><span>
194
				<input type="checkbox" name="notificationCopyeditComment"{if !$smarty.const.NOTIFICATION_TYPE_COPYEDIT_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
195
				{translate key="notification.allow"}
196
			</span></li>
197
		<li><span>
198
				<input type="checkbox" name="emailNotificationCopyeditComment"{if $smarty.const.NOTIFICATION_TYPE_COPYEDIT_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
199
				{translate key="notification.email"}
200
			</span></li>
201
	</ul>
202
</ul>
203
204
<ul>
205
	<li>{translate key="notification.type.proofreadComment" param=$titleVar}</li>
206
	<ul class="plain">
207
		<li><span>
208
				<input type="checkbox" name="notificationProofreadComment"{if !$smarty.const.NOTIFICATION_TYPE_PROOFREAD_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
209
				{translate key="notification.allow"}
210
			</span></li>
211
		<li><span>
212
				<input type="checkbox" name="emailNotificationProofreadComment"{if $smarty.const.NOTIFICATION_TYPE_PROOFREAD_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
213
				{translate key="notification.email"}
214
			</span></li>
215
	</ul>
216
</ul>
217
218
<br />
219
{/if}
220
221
<!-- Site events -->
222
<h4>{translate key="notification.type.site"}</h4>
223
224
<ul>
225
	<li>{translate key="notification.type.userComment" param=$titleVar}</li>
226
	<ul class="plain">
227
		<li><span>
228
				<input type="checkbox" name="notificationUserComment"{if !$smarty.const.NOTIFICATION_TYPE_USER_COMMENT|in_array:$notificationSettings} checked="checked"{/if} />
229
				{translate key="notification.allow"}
230
			</span></li>
231
		<li><span>
232
				<input type="checkbox" name="emailNotificationUserComment"{if $smarty.const.NOTIFICATION_TYPE_USER_COMMENT|in_array:$emailSettings} checked="checked"{/if} />
233
				{translate key="notification.email"}
234
			</span></li>
235
	</ul>
236
</ul>
237
238
<ul>
239
	<li>{translate key="notification.type.issuePublished" param=$userVar}</li>
240
	<ul class="plain">
241
		<li><span>
242
				<input type="checkbox" name="notificationPublishedIssue"{if !$smarty.const.NOTIFICATION_TYPE_PUBLISHED_ISSUE|in_array:$notificationSettings} checked="checked"{/if} />
243
				{translate key="notification.allow"}
244
			</span></li>
245
		<li><span>
246
				<input type="checkbox" name="emailNotificationPublishedIssue"{if $smarty.const.NOTIFICATION_TYPE_PUBLISHED_ISSUE|in_array:$emailSettings} checked="checked"{/if} />
247
				{translate key="notification.email"}
248
			</span></li>
249
	</ul>
250
</ul>
251
252
<ul>
253
	<li>{translate key="notification.type.newAnnouncement"}</li>
254
	<ul class="plain">
255
		<li><span>
256
				<input type="checkbox" name="notificationNewAnnouncement"{if !$smarty.const.NOTIFICATION_TYPE_NEW_ANNOUNCEMENT|in_array:$notificationSettings} checked="checked"{/if} />
257
				{translate key="notification.allow"}
258
			</span></li>
259
		<li><span>
260
				<input type="checkbox" name="emailNotificationNewAnnouncement"{if $smarty.const.NOTIFICATION_TYPE_NEW_ANNOUNCEMENT|in_array:$emailSettings} checked="checked"{/if} />
261
				{translate key="notification.email"}
262
			</span></li>
263
	</ul>
264
</ul>
265
266
<br />
267
268
<p><input type="submit" value="{translate key="form.submit"}" class="button defaultButton" />  <input type="button" value="{translate key="common.cancel"}" class="button" onclick="document.location.href='{url op="notification" escape=false}'" /></p>
269
270
</form>
271
272
{include file="common/footer.tpl"}
(-)templates/user/profile.tpl (-18 lines)
 Lines 139-162    Link Here 
139
</tr>
139
</tr>
140
{/if}
140
{/if}
141
141
142
{foreach from=$journals name=journalNotifications key=thisJournalId item=thisJournal}
143
	{assign var=thisJournalId value=$thisJournal->getJournalId()}
144
	{assign var=notificationEnabled value=`$journalNotifications.$thisJournalId`}
145
	{if !$notFirstJournal}
146
		{assign var=notFirstJournal value=1}
147
		<tr valign="top">
148
			<td class="label">{translate key="user.profile.form.publishedNotifications"}</td>
149
			<td class="value">
150
	{/if}
151
152
			<input type="checkbox" name="journalNotify[]" {if $notificationEnabled}checked="checked" {/if}id="journalNotify-{$thisJournalId|escape}" value="{$thisJournalId|escape}" /> <label for="journalNotify-{$thisJournalId|escape}">{$thisJournal->getJournalTitle()|escape}</label><br/>
153
154
	{if $smarty.foreach.journalNotifications.last}
155
			</td>
156
		</tr>
157
	{/if}
158
{/foreach}
159
160
{if $displayOpenAccessNotification}
142
{if $displayOpenAccessNotification}
161
	{assign var=notFirstJournal value=0}
143
	{assign var=notFirstJournal value=0}
162
	{foreach from=$journals name=journalOpenAccessNotifications key=thisJournalId item=thisJournal}
144
	{foreach from=$journals name=journalOpenAccessNotifications key=thisJournalId item=thisJournal}

Return to bug 3922