示例#1
0
 /**
  * @copydoc Form::fetch()
  */
 function fetch($request, $params = null)
 {
     $site = $request->getSite();
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('categoriesEnabled', $site->getSetting('categoriesEnabled'));
     return parent::fetch($request, $params);
 }
示例#2
0
 /**
  * Fetch the form
  * @param $request Request
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $baseUrl = $templateMgr->_request->getBaseUrl();
     // Add extra java script required for ajax components
     // FIXME: Must be removed after OMP->OJS backporting
     // NOTE: I believe this needs attention. jquery.validate.min.js is
     // loaded with our minifiedScripts.tpl list and includes some i18n
     // features.
     $templateMgr->addJavaScript('citation', $baseUrl . '/lib/pkp/js/functions/citation.js', array('contexts' => 'backend'));
     $templateMgr->addJavaScript('jqueryValidate', $baseUrl . '/lib/pkp/js/lib/jquery/plugins/validate/jquery.validate.min.js', array('contexts' => 'backend'));
     $templateMgr->addJavaScript('jqueryValidatorI18n', $baseUrl . '/lib/pkp/js/functions/jqueryValidatorI18n.js', array('contexts' => 'backend'));
     //
     // Citation editor filter configuration
     //
     // 1) Add the filter grid URLs
     $dispatcher = $request->getDispatcher();
     $parserFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.ParserFilterGridHandler', 'fetchGrid');
     $templateMgr->assign('parserFilterGridUrl', $parserFilterGridUrl);
     $lookupFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.LookupFilterGridHandler', 'fetchGrid');
     $templateMgr->assign('lookupFilterGridUrl', $lookupFilterGridUrl);
     // 2) Create a list of all available citation output filters.
     $router = $request->getRouter();
     $journal = $router->getContext($request);
     $filterDao = DAORegistry::getDAO('FilterDAO');
     /* @var $filterDao FilterDAO */
     $metaCitationOutputFilterObjects = $filterDao->getObjectsByGroup('nlm30-element-citation=>plaintext', $journal->getId());
     foreach ($metaCitationOutputFilterObjects as $metaCitationOutputFilterObject) {
         $metaCitationOutputFilters[$metaCitationOutputFilterObject->getId()] = $metaCitationOutputFilterObject->getDisplayName();
     }
     $templateMgr->assign_by_ref('metaCitationOutputFilters', $metaCitationOutputFilters);
     return parent::fetch($request);
 }
示例#3
0
 /**
  * Fetch the form
  * @param $request Request
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     // Add extra style sheets required for ajax components
     // FIXME: Must be removed after OMP->OJS backporting
     $templateMgr->addStyleSheet($request->getBaseUrl() . '/styles/ojs.css');
     // Add extra java script required for ajax components
     // FIXME: Must be removed after OMP->OJS backporting
     $templateMgr->addJavaScript('lib/pkp/js/functions/citation.js');
     $templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/validate/jquery.validate.min.js');
     $templateMgr->addJavaScript('lib/pkp/js/functions/jqueryValidatorI18n.js');
     //
     // Citation editor filter configuration
     //
     // 1) Add the filter grid URLs
     $dispatcher = $request->getDispatcher();
     $parserFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.ParserFilterGridHandler', 'fetchGrid');
     $templateMgr->assign('parserFilterGridUrl', $parserFilterGridUrl);
     $lookupFilterGridUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'grid.filter.LookupFilterGridHandler', 'fetchGrid');
     $templateMgr->assign('lookupFilterGridUrl', $lookupFilterGridUrl);
     // 2) Create a list of all available citation output filters.
     $router = $request->getRouter();
     $journal = $router->getContext($request);
     $filterDao = DAORegistry::getDAO('FilterDAO');
     /* @var $filterDao FilterDAO */
     $metaCitationOutputFilterObjects = $filterDao->getObjectsByGroup('nlm30-element-citation=>plaintext', $journal->getId());
     foreach ($metaCitationOutputFilterObjects as $metaCitationOutputFilterObject) {
         $metaCitationOutputFilters[$metaCitationOutputFilterObject->getId()] = $metaCitationOutputFilterObject->getDisplayName();
     }
     $templateMgr->assign_by_ref('metaCitationOutputFilters', $metaCitationOutputFilters);
     return parent::fetch($request);
 }
 /**
  * @copydoc ContextSettingsForm::fetch
  */
 function fetch($request, $params = null)
 {
     $templateMgr = TemplateManager::getManager($request);
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION);
     $templateMgr->assign('ccLicenseOptions', array_merge(array('' => 'common.other'), Application::getCCLicenseOptions()));
     return parent::fetch($request, $params);
 }
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     for ($x = 1; $x < 11; $x++) {
         $numAnnouncementsHomepageOptions[$x] = $x;
     }
     $params = array('numAnnouncementsHomepageOptions' => $numAnnouncementsHomepageOptions, 'disableAnnouncementsHomepage' => !$this->getData('enableAnnouncementsHomepage'));
     return parent::fetch($request, $params);
 }
 /**
  * @copydoc Form::fetch()
  */
 function fetch($request, $params = null)
 {
     $templateMgr = TemplateManager::getManager($request);
     import('lib.pkp.classes.mail.MailTemplate');
     $mail = new MailTemplate('SUBMISSION_ACK');
     $templateMgr->assign('submissionAckDisabled', !$mail->isEnabled());
     return parent::fetch($request, $params);
 }
 /**
  * @see Form::fetch()
  */
 function fetch($request, $params = null)
 {
     $templateMgr = TemplateManager::getManager($request);
     $onixCodelistItemDao = DAORegistry::getDAO('ONIXCodelistItemDAO');
     $codeTypes = $onixCodelistItemDao->getCodes('List44');
     // Name code types for publisher
     $templateMgr->assign('codeTypes', $codeTypes);
     return parent::fetch($request);
 }
示例#8
0
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $currencyDao = DAORegistry::getDAO('CurrencyDAO');
     $currencies = array();
     foreach ($currencyDao->getCurrencies() as $currency) {
         $currencies[$currency->getCodeAlpha()] = $currency->getName();
     }
     $templateMgr->assign('currencies', $currencies);
     return parent::fetch($request);
 }
示例#9
0
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     $params = array();
     // Ensuring blind review link.
     import('lib.pkp.classes.linkAction.request.ConfirmationModal');
     import('lib.pkp.classes.linkAction.LinkAction');
     $params['ensuringLink'] = new LinkAction('showReviewPolicy', new ConfirmationModal(__('review.blindPeerReview'), __('review.ensuringBlindReview'), 'modal_information', null, null, true, MODAL_WIDTH_DEFAULT), __('review.ensuringBlindReview'));
     $params['scheduledTasksDisabled'] = Config::getVar('general', 'scheduled_tasks') ? false : true;
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('numDaysBeforeInviteReminderValues', range(3, 10));
     $templateMgr->assign('numDaysBeforeSubmitReminderValues', range(0, 10));
     return parent::fetch($request, $params);
 }
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     $params = array();
     // Ensuring blind review link.
     import('lib.pkp.classes.linkAction.request.ConfirmationModal');
     import('lib.pkp.classes.linkAction.LinkAction');
     $params['ensuringLink'] = new LinkAction('showReviewPolicy', new ConfirmationModal(__('review.blindPeerReview'), __('review.ensuringBlindReview'), 'modal_information', null, null, true, MODAL_WIDTH_DEFAULT), __('manager.setup.reviewOptions.showBlindReviewLink'));
     $params['scheduledTasksDisabled'] = Config::getVar('general', 'scheduled_tasks') ? false : true;
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign(array('numDaysBeforeInviteReminderValues' => array_combine(range(1, 10), range(1, 10)), 'numDaysBeforeSubmitReminderValues' => array_combine(range(1, 10), range(1, 10))));
     $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
     $templateMgr->assign('reviewMethodOptions', $reviewAssignmentDao->getReviewMethodsTranslationKeys());
     return parent::fetch($request, $params);
 }
示例#11
0
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     // Get all upload form image link actions.
     $uploadImageLinkActions = array();
     foreach ($this->getImagesSettingsName() as $settingName => $altText) {
         $uploadImageLinkActions[$settingName] = $this->_getFileUploadLinkAction($settingName, 'image', $request);
     }
     // Get the css upload link action.
     $uploadCssLinkAction = $this->_getFileUploadLinkAction('styleSheet', 'css', $request);
     $imagesViews = $this->_renderAllFormImagesViews($request);
     $cssView = $this->renderFileView('styleSheet', $request);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('uploadImageLinkActions', $uploadImageLinkActions);
     $templateMgr->assign('uploadCssLinkAction', $uploadCssLinkAction);
     $themePlugins = PluginRegistry::loadCategory('themes');
     $themePluginOptions = array();
     foreach ($themePlugins as $themePlugin) {
         $themePluginOptions[basename($themePlugin->getPluginPath())] = $themePlugin->getDisplayName();
     }
     $templateMgr->assign('themePluginOptions', $themePluginOptions);
     $params = array('imagesViews' => $imagesViews, 'styleSheetView' => $cssView, 'locale' => AppLocale::getLocale());
     return parent::fetch($request, $params);
 }
示例#12
0
 /**
  * @copydoc Form::fetch()
  */
 function fetch($request, $params = null)
 {
     $site = $request->getSite();
     $templateMgr = TemplateManager::getManager($request);
     return parent::fetch($request, $params);
 }
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     $context = $request->getContext();
     $dispatcher = $request->getDispatcher();
     return parent::fetch($request, array('envelopeSenderDisabled' => !Config::getVar('email', 'allow_envelope_sender') || Config::getVar('email', 'force_default_envelope_sender') && Config::getVar('email', 'default_envelope_sender'), 'emailVariables' => array('contextName' => $context->getLocalizedName(), 'senderName' => __('email.senderName'), 'senderEmail' => __('email.senderEmail'))));
 }
示例#14
0
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     // Get all upload form image link actions.
     $uploadImageLinkActions = array();
     foreach ($this->getImagesSettingsName() as $settingName => $altText) {
         $uploadImageLinkActions[$settingName] = $this->_getFileUploadLinkAction($settingName, 'image', $request);
     }
     // Get the css upload link action.
     $uploadCssLinkAction = $this->_getFileUploadLinkAction('styleSheet', 'css', $request);
     $imagesViews = $this->_renderAllFormImagesViews($request);
     $cssView = $this->renderFileView('styleSheet', $request);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('uploadImageLinkActions', $uploadImageLinkActions);
     $templateMgr->assign('uploadCssLinkAction', $uploadCssLinkAction);
     $themePlugins = PluginRegistry::getPlugins('themes');
     if (is_null($themePlugins)) {
         $themePlugins = PluginRegistry::loadCategory('themes', true);
     }
     $enabledThemes = array();
     $activeThemeOptions = array();
     foreach ($themePlugins as $themePlugin) {
         $enabledThemes[basename($themePlugin->getPluginPath())] = $themePlugin->getDisplayName();
         if ($themePlugin->isActive()) {
             $activeThemeOptions = $themePlugin->getOptionsConfig();
             $activeThemeOptionsValues = $themePlugin->getOptionValues();
             foreach ($activeThemeOptions as $name => $option) {
                 $activeThemeOptions[$name]['value'] = isset($activeThemeOptionsValues[$name]) ? $activeThemeOptionsValues[$name] : '';
             }
         }
     }
     $templateMgr->assign(array('enabledThemes' => $enabledThemes, 'activeThemeOptions' => $activeThemeOptions));
     $params = array('imagesViews' => $imagesViews, 'styleSheetView' => $cssView, 'locale' => AppLocale::getLocale());
     return parent::fetch($request, $params);
 }
 /**
  * @copydoc ContextSettingsForm::fetch()
  */
 function fetch($request)
 {
     $params = array('envelopeSenderDisabled' => !Config::getVar('email', 'allow_envelope_sender'));
     return parent::fetch($request, $params);
 }