/** * Display the form. * @param $request Request */ function display($request) { $canOnlyRead = true; $canOnlyReview = false; if (Validation::isReviewer()) { $canOnlyRead = false; $canOnlyReview = true; } if (Validation::isSiteAdmin() || Validation::isJournalManager() || Validation::isEditor() || Validation::isSectionEditor()) { $canOnlyRead = false; $canOnlyReview = false; } $templateMgr =& TemplateManager::getManager(); // Remove the notification setting categories that the user will not be receiving (to simplify the form) $notificationSettingCategories = $this->_getNotificationSettingCategories(); if ($canOnlyRead || $canOnlyReview) { unset($notificationSettingCategories['submissions']); } if ($canOnlyRead) { unset($notificationSettingCategories['reviewing']); } $templateMgr->assign('notificationSettingCategories', $notificationSettingCategories); $templateMgr->assign('notificationSettings', $this->_getNotificationSettingsMap()); $templateMgr->assign('titleVar', __('common.title')); return parent::display($request); }
/** * Display the form. */ function display() { $canOnlyRead = true; $canOnlyReview = false; if (Validation::isReviewer()) { $canOnlyRead = false; $canOnlyReview = true; } if (Validation::isSiteAdmin() || Validation::isJournalManager() || Validation::isEditor() || Validation::isSectionEditor()) { $canOnlyRead = false; $canOnlyReview = false; } $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('canOnlyRead', $canOnlyRead); $templateMgr->assign('canOnlyReview', $canOnlyReview); return parent::display(); }
/** * Save profile settings. */ function execute($request) { $user = $request->getUser(); $journalDao = DAORegistry::getDAO('JournalDAO'); $openAccessNotify = $request->getUserVar('openAccessNotify'); $userSettingsDao = DAORegistry::getDAO('UserSettingsDAO'); $journals = $journalDao->getAll(true); while ($thisJournal = $journals->next()) { if ($thisJournal->getSetting('publishingMode') == PUBLISHING_MODE_SUBSCRIPTION && $thisJournal->getSetting('enableOpenAccessNotification')) { $currentlyReceives = $user->getSetting('openAccessNotification', $thisJournal->getId()); $shouldReceive = !empty($openAccessNotify) && in_array($thisJournal->getId(), $openAccessNotify); if ($currentlyReceives != $shouldReceive) { $userSettingsDao->updateSetting($user->getId(), 'openAccessNotification', $shouldReceive, 'bool', $thisJournal->getId()); } } } parent::execute($request); }
/** * Display the form. */ function display() { $conferenceDao =& DAORegistry::getDAO('ConferenceDAO'); $conferences =& $conferenceDao->getConferenceTitles(); $canOnlyRead = true; $canOnlyReview = false; if (Validation::isReviewer()) { $canOnlyRead = false; $canOnlyReview = true; } if (Validation::isSiteAdmin() || Validation::isConferenceManager() || Validation::isDirector()) { $canOnlyRead = false; $canOnlyReview = false; } $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('canOnlyRead', $canOnlyRead); $templateMgr->assign('canOnlyReview', $canOnlyReview); return parent::display(); }
/** * Display the form. */ function display() { $canOnlyRead = true; $canOnlyReview = false; // FIXME: Bug #6538. These policies used to use several role checks // that are no longer appropriate / have been removed. The remaining // ones should be too. if (Validation::isReviewer()) { $canOnlyRead = false; $canOnlyReview = true; } if (Validation::isSiteAdmin()) { $canOnlyRead = false; $canOnlyReview = false; } $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('canOnlyRead', $canOnlyRead); $templateMgr->assign('canOnlyReview', $canOnlyReview); return parent::display(); }
/** * Constructor. */ function __construct() { parent::__construct(); }
/** * Constructor. */ function NotificationSettingsForm() { parent::PKPNotificationSettingsForm(); }
/** * Display the form. * @param $request Request */ function display($request) { $conferenceDao = DAORegistry::getDAO('ConferenceDAO'); $conferences =& $conferenceDao->getNames(); $canOnlyRead = true; $canOnlyReview = false; if (Validation::isReviewer()) { $canOnlyRead = false; $canOnlyReview = true; } if (Validation::isSiteAdmin() || Validation::isConferenceManager() || Validation::isDirector()) { $canOnlyRead = false; $canOnlyReview = false; } // Remove the notification setting categories that the user will not be receiving (to simplify the form) $notificationSettingCategories = $this->_getNotificationSettingCategories(); if ($canOnlyRead || $canOnlyReview) { unset($notificationSettingCategories['submissions']); } if ($canOnlyRead) { unset($notificationSettingCategories['reviewing']); } $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('notificationSettingCategories', $notificationSettingCategories); $templateMgr->assign('notificationSettings', $this->_getNotificationSettingsMap()); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('canOnlyRead', $canOnlyRead); $templateMgr->assign('canOnlyReview', $canOnlyReview); return parent::display($request); }