当前位置: 首页>>代码示例>>PHP>>正文


PHP Locale::requireComponents方法代码示例

本文整理汇总了PHP中Locale::requireComponents方法的典型用法代码示例。如果您正苦于以下问题:PHP Locale::requireComponents方法的具体用法?PHP Locale::requireComponents怎么用?PHP Locale::requireComponents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Locale的用法示例。


在下文中一共展示了Locale::requireComponents方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $this->_monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS));
     // Get the monograph id
     $monograph =& $this->getMonograph();
     assert(is_a($monograph, 'Monograph'));
     $monographId = $monograph->getId();
     // Retrieve the submissionParticipants associated with this monograph to be displayed in the grid
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     /* @var $signoffDao SignoffDAO */
     $users =& $signoffDao->getUsersBySymbolic('SIGNOFF_STAGE', ASSOC_TYPE_MONOGRAPH, $monographId);
     $rowData = array();
     while ($user =& $users->next()) {
         $userId = $user->getId();
         $rowData[$userId] = $user;
     }
     $this->setData($rowData);
     // Columns
     $cellProvider = new SubmissionParticipantGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:25,代码来源:SubmissionParticipantGridHandler.inc.php

示例2: display

 /**
  * Display the form
  * @param $request Request
  * @param $dispatcher Dispatcher
  */
 function display($request, $dispatcher)
 {
     $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/grid-clickhandler.js');
     $templateMgr->addJavaScript('lib/pkp/js/modal.js');
     $templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/validate/jquery.validate.min.js');
     $templateMgr->addJavaScript('lib/pkp/js/jqueryValidatorI18n.js');
     import('classes.mail.MailTemplate');
     $mail = new MailTemplate('SUBMISSION_ACK');
     if ($mail->isEnabled()) {
         $templateMgr->assign('submissionAckEnabled', true);
     }
     // Citation editor filter configuration
     //
     // 1) Check whether PHP5 is available.
     if (!checkPhpVersion('5.0.0')) {
         Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION));
         $citationEditorError = 'submission.citations.editor.php5Required';
     } else {
         $citationEditorError = null;
     }
     $templateMgr->assign('citationEditorError', $citationEditorError);
     if (!$citationEditorError) {
         // 2) Add the filter grid URLs
         $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);
         // 3) Create a list of all available citation output filters.
         $router =& $request->getRouter();
         $journal =& $router->getContext($request);
         import('lib.pkp.classes.metadata.MetadataDescription');
         $inputSample = new MetadataDescription('lib.pkp.classes.metadata.nlm.NlmCitationSchema', ASSOC_TYPE_CITATION);
         $outputSample = 'any string';
         $filterDao =& DAORegistry::getDAO('FilterDAO');
         $metaCitationOutputFilterObjects =& $filterDao->getCompatibleObjects($inputSample, $outputSample, $journal->getId());
         foreach ($metaCitationOutputFilterObjects as $metaCitationOutputFilterObject) {
             $metaCitationOutputFilters[$metaCitationOutputFilterObject->getId()] = $metaCitationOutputFilterObject->getDisplayName();
         }
         $templateMgr->assign_by_ref('metaCitationOutputFilters', $metaCitationOutputFilters);
     }
     $currencyDao =& DAORegistry::getDAO('CurrencyDAO');
     $currencies =& $currencyDao->getCurrencies();
     $currenciesArray = array();
     foreach ($currencies as $currency) {
         $currenciesArray[$currency->getCodeAlpha()] = $currency->getName() . ' (' . $currency->getCodeAlpha() . ')';
     }
     $templateMgr->assign('currencies', $currenciesArray);
     $originalSourceCurrencyAlpha = $journal->getSetting('sourceCurrency');
     $originalSourceCurrency = $currencyDao->getCurrencyByAlphaCode($originalSourceCurrencyAlpha);
     $templateMgr->assign('originalSourceCurrency', $originalSourceCurrency->getName() . ' (' . $originalSourceCurrencyAlpha . ')');
     $proposalSourceDao =& DAORegistry::getDAO('ProposalSourceDAO');
     $templateMgr->assign('countSources', $proposalSourceDao->countSources());
     parent::display($request, $dispatcher);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:65,代码来源:JournalSetupStep3Form.inc.php

示例3: initialize

 /**
  * @see PKPHandler::initialize()
  */
 function initialize(&$request)
 {
     // Basic grid configuration
     $this->setId('fairCopyFiles');
     $this->setTitle('editor.monograph.fairCopy');
     // Load grid data.
     $this->loadMonographFiles();
     // Test whether the tar binary is available for the export to work, if so, add grid action
     $tarBinary = Config::getVar('cli', 'tar');
     if ($this->hasData() && !empty($tarBinary) && file_exists($tarBinary)) {
         $monograph =& $this->getMonograph();
         $router =& $request->getRouter();
         $this->addAction(new LinkAction('downloadAll', new RedirectAction($router->url($request, null, null, 'downloadAllFiles', null, array('monographId' => $monograph->getId()))), 'submission.files.downloadAll', 'getPackage'));
     }
     // Load additional translation components.
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_EDITOR));
     // Columns
     import('controllers.grid.files.fairCopyFiles.FairCopyFilesGridCellProvider');
     $cellProvider =& new FairCopyFilesGridCellProvider();
     parent::initialize($request, $cellProvider);
     // Add a column for the uploader.
     // FIXME: We're just adding some placeholder text here until this
     // is correctly implemented, see #6233.
     $this->addColumn(new GridColumn('select', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
     // Add another column for the uploader's role
     // FIXME: We're just adding some placeholder text here until this
     // is correctly implemented, see #6233.
     $this->addColumn(new GridColumn('uploader-name', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:32,代码来源:FairCopyFilesGridHandler.inc.php

示例4: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic grid configuration
     $this->setId('preparedEmailsGrid');
     $this->setTitle('grid.preparedEmails.currentList');
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER));
     // Elements to be displayed in the grid
     $press =& $request->getPress();
     $emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
     /* @var $emailTemplateDao EmailTemplateDAO */
     $emailTemplates =& $emailTemplateDao->getEmailTemplates(Locale::getLocale(), $press->getId());
     $rowData = array();
     foreach ($emailTemplates as $emailTemplate) {
         $rowData[$emailTemplate->getEmailKey()] = $emailTemplate;
     }
     $this->setGridDataElements($rowData);
     // Grid actions
     import('lib.pkp.classes.linkAction.LinkAction');
     import('lib.pkp.classes.linkAction.request.ConfirmationModal');
     $router =& $request->getRouter();
     $this->addAction(new LinkAction('resetAll', new ConfirmationModal(__('manager.emails.resetAll.message'), null, $router->url($request, null, 'grid.settings.preparedEmails.PreparedEmailsGridHandler', 'resetAllEmails')), __('manager.emails.resetAll'), 'delete'));
     import('controllers.grid.settings.preparedEmails.linkAction.EditEmailLinkAction');
     $addEmailLinkAction =& new EditEmailLinkAction($request);
     $this->addAction($addEmailLinkAction);
     // Columns
     import('controllers.grid.settings.preparedEmails.PreparedEmailsGridCellProvider');
     $cellProvider =& new PreparedEmailsGridCellProvider();
     $this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('sender', 'email.sender', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('recipient', 'email.recipient', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('subject', 'common.subject', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('enabled', 'common.enabled', null, 'controllers/grid/common/cell/checkMarkCell.tpl', $cellProvider));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:34,代码来源:PreparedEmailsGridHandler.inc.php

示例5: display

 function display(&$args)
 {
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OCS_MANAGER));
     $this->import('PaperFormSettings');
     $form = new PaperFormSettings($this, $conference->getId());
     if (Request::getUserVar('GenerateReport')) {
         $ReportHandlerDAO =& DAORegistry::getDAO('MultiPaperReportDAO');
         $iterator =& $ReportHandlerDAO->getPaperReport($conference->getId(), $schedConf->getId());
         $form->readInputData();
         if ($form->validate()) {
             $form->execute();
             $custom_Class = $form->getData('reportClass');
             if (class_exists($custom_Class)) {
                 $Report = new $custom_Class($iterator, $this);
                 $Report->makeReport();
                 Request::redirect(null, null, 'manager', 'plugin');
             } else {
                 echo Locale::translate('plugins.reports.MultiGeneratorPaperReport.classNotFound');
                 $form->display();
             }
         } else {
             $this->setBreadCrumbs(true);
             $form->makeOptions();
             $form->display();
         }
     } else {
         $this->setBreadCrumbs(true);
         $form->initData();
         $form->display();
     }
 }
开发者ID:sedici,项目名称:ocs,代码行数:33,代码来源:MultiPaperReportPlugin.inc.php

示例6: initialize

 /**
  * Configure the grid
  * @param $request PKPRequest
  */
 function initialize(&$request)
 {
     parent::initialize($request);
     // Basic grid configuration
     $this->setId('reviewFormElement');
     $this->setTitle('grid.reviewFormElements.title');
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OMP_MANAGER));
     // Elements to be displayed in the grid
     $router =& $request->getRouter();
     $press =& $router->getContext($request);
     $reviewFormId = $request->getUserVar('rowId');
     $row =& $this->getRow();
     $row->setReviewFormId($reviewFormId);
     $reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
     $reviewFormElements =& $reviewFormElementDao->getReviewFormElementsByReviewForm($reviewFormId);
     $this->setData($reviewFormElements);
     // Add grid-level actions
     $this->addAction(new LegacyLinkAction('createReviewFormElement', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_APPEND, $router->url($request, null, null, 'createReviewFormElement', null, array('gridId' => $this->getId(), 'reviewFormId' => $reviewFormId)), 'grid.action.addItem'), GRID_ACTION_POSITION_ABOVE);
     // Columns
     import('controllers.grid.settings.reviewForm.ReviewFormElementGridCellProvider');
     $cellProvider =& new ReviewFormElementGridCellProvider();
     $this->addColumn(new GridColumn('reviewFormElement', 'grid.reviewFormElements.column.elements', 'controllers/grid/gridCell.tpl', $cellProvider));
     import('controllers.grid.settings.reviewForm.ReviewFormElementTypeCellProvider');
     $cellProvider =& new ReviewFormElementTypeCellProvider();
     $this->addColumn(new GridColumn('elementType', 'common.type', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:30,代码来源:ReviewFormElementGridHandler.inc.php

示例7: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph.
     $this->setMonograph($this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH));
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS));
     // Basic grid configuration
     $this->setTitle('submission.submit.stageParticipants');
     // Get the monograph id
     $monograph =& $this->getMonograph();
     assert(is_a($monograph, 'Monograph'));
     $monographId = $monograph->getId();
     // Retrieve the stageParticipants associated with this monograph to be displayed in the grid
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $data =& $signoffDao->getAllBySymbolic('SIGNOFF_STAGE', ASSOC_TYPE_MONOGRAPH, $monographId, null, $monograph->getCurrentStageId());
     $this->setData($data);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monographId, 'stageId' => $monograph->getCurrentStageId());
     $this->addAction(new LegacyLinkAction('addStageParticipant', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_REPLACE, $router->url($request, null, null, 'addStageParticipant', null, $actionArgs), 'submission.submit.addStageParticipant'));
     // Columns
     $cellProvider = new StageParticipantGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('userGroup', 'author.users.contributor.role', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:26,代码来源:StageParticipantGridHandler.inc.php

示例8: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     // Load submission-specific translations
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OMP_EDITOR));
     // Basic grid configuration
     $this->setTitle('user.role.reviewers');
     // Get the monograph
     $submission =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     assert(is_a($submission, 'SeriesEditorSubmission'));
     $monographId = $submission->getId();
     // Get the review round currently being looked at
     $reviewType = $request->getUserVar('reviewType');
     $round = $request->getUserVar('round');
     // Get the existing review assignments for this monograph
     $reviewAssignments =& $submission->getReviewAssignments($reviewType, $round);
     $this->setData($reviewAssignments);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monographId, 'reviewType' => $reviewType, 'round' => $round);
     $this->addAction(new LegacyLinkAction('addReviewer', LINK_ACTION_MODE_MODAL, LINK_ACTION_TYPE_APPEND, $router->url($request, null, null, 'addReviewer', null, $actionArgs), 'editor.monograph.addReviewer'));
     // Columns
     $cellProvider = new ReviewerGridCellProvider();
     $this->addColumn(new GridColumn('name', 'user.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     // Add a column for the stage editor.
     // FIXME: We're just adding some placeholder text here until this
     // is correctly implemented, see #6233.
     $this->addColumn(new GridColumn('FIXME', null, 'FIXME', 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
     // Add a column for the assigned reviewer.
     $this->addColumn(new GridColumn('reviewer', 'user.role.reviewer', null, 'controllers/grid/common/cell/roleCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:31,代码来源:ReviewerGridHandler.inc.php

示例9: initialize

 /**
  * Configure the grid
  * @param $request PKPRequest
  */
 function initialize(&$request)
 {
     parent::initialize($request);
     // Retrieve the authorized monograph
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     assert(is_a($monograph, 'Monograph'));
     $this->setMonograph($monograph);
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_DEFAULT_SETTINGS, LOCALE_COMPONENT_OMP_SUBMISSION));
     // Basic grid configuration
     $this->setTitle('grid.chapters.title');
     // Set the category data
     $chapterDao =& DAORegistry::getDAO('ChapterDAO');
     $chapters =& $chapterDao->getChapters($monograph->getId());
     $this->setGridDataElements($chapters);
     // Grid actions
     $router =& $request->getRouter();
     $actionArgs = array('monographId' => $monograph->getId());
     $this->addAction(new LinkAction('addChapter', new AjaxModal($router->url($request, null, null, 'addChapter', null, $actionArgs), __('submission.chapter.addChapter'), 'fileManagement'), __('grid.action.addItem'), 'add_item'));
     // Columns
     // reuse the cell providers for the SubmissionContributorGrid
     $cellProvider = new SubmissionContributorGridCellProvider();
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('email', 'author.users.contributor.email', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('role', 'author.users.contributor.role', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('principalContact', 'author.users.contributor.principalContact', null, 'controllers/grid/users/submissionContributor/primaryContact.tpl', $cellProvider));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:30,代码来源:ChapterGridHandler.inc.php

示例10: display

 function display(&$args, $request)
 {
     $templateMgr =& TemplateManager::getManager();
     parent::display($args, $request);
     $issueDao =& DAORegistry::getDAO('IssueDAO');
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $articleGalleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
     $journal =& Request::getJournal();
     switch (array_shift($args)) {
         case 'exportGalley':
             $articleId = array_shift($args);
             $galleyId = array_shift($args);
             $article =& $publishedArticleDao->getPublishedArticleByArticleId($articleId);
             $galley =& $articleGalleyDao->getGalley($galleyId, $articleId);
             if ($article && $galley && ($issue =& $issueDao->getIssueById($article->getIssueId(), $journal->getId()))) {
                 $this->exportArticle($journal, $issue, $article, $galley);
                 break;
             }
         default:
             // Display a list of articles for export
             $this->setBreadcrumbs();
             Locale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION));
             $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
             $rangeInfo = Handler::getRangeInfo('articles');
             $articleIds = $publishedArticleDao->getPublishedArticleIdsAlphabetizedByJournal($journal->getId(), false);
             $totalArticles = count($articleIds);
             $articleIds = array_slice($articleIds, $rangeInfo->getCount() * ($rangeInfo->getPage() - 1), $rangeInfo->getCount());
             import('lib.pkp.classes.core.VirtualArrayIterator');
             $iterator = new VirtualArrayIterator(ArticleSearch::formatResults($articleIds), $totalArticles, $rangeInfo->getPage(), $rangeInfo->getCount());
             $templateMgr->assign_by_ref('articles', $iterator);
             $templateMgr->display($this->getTemplatePath() . 'index.tpl');
             break;
     }
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:34,代码来源:EruditExportPlugin.inc.php

示例11: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_EDITOR, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_PKP_SUBMISSION));
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     // Retrieve the submissionContributors associated with this monograph to be displayed in the grid
     $doneMin = $request->getUserVar('doneMin');
     $doneMax = $request->getUserVar('doneMax');
     $avgMin = $request->getUserVar('avgMin');
     $avgMax = $request->getUserVar('avgMax');
     $lastMin = $request->getUserVar('lastMin');
     $lastMax = $request->getUserVar('lastMax');
     $activeMin = $request->getUserVar('activeMin');
     $activeMax = $request->getUserVar('activeMax');
     $interests = null;
     $seriesEditorSubmissionDao =& DAORegistry::getDAO('SeriesEditorSubmissionDAO');
     $data =& $seriesEditorSubmissionDao->getFilteredReviewers($monograph->getPressId(), $doneMin, $doneMax, $avgMin, $avgMax, $lastMin, $lastMax, $activeMin, $activeMax, $interests, $monograph->getId(), $monograph->getCurrentRound());
     $this->setData($data);
     // Columns
     $cellProvider = new ReviewerSelectGridCellProvider();
     $this->addColumn(new GridColumn('select', '', null, 'controllers/grid/users/reviewerSelect/reviewerSelectRadioButton.tpl', $cellProvider));
     $this->addColumn(new GridColumn('name', 'author.users.contributor.name', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('done', 'common.done', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('avg', 'editor.review.days', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('last', 'editor.submissions.lastAssigned', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('active', 'common.active', null, 'controllers/grid/gridCell.tpl', $cellProvider));
     $this->addColumn(new GridColumn('interests', 'user.interests', null, 'controllers/grid/gridCell.tpl', $cellProvider));
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:28,代码来源:ReviewerSelectGridHandler.inc.php

示例12: recordDecision

 /**
  * Records a director's submission decision.
  * @param $trackDirectorSubmission object
  * @param $decision int
  * @param $stage int
  */
 function recordDecision($trackDirectorSubmission, $decision, $stage)
 {
     $editAssignments =& $trackDirectorSubmission->getEditAssignments();
     if (empty($editAssignments)) {
         return;
     }
     $trackDirectorSubmissionDao =& DAORegistry::getDAO('TrackDirectorSubmissionDAO');
     $user =& Request::getUser();
     $directorDecision = array('editDecisionId' => null, 'directorId' => $user->getId(), 'decision' => $decision, 'dateDecided' => date(Core::getCurrentDate()));
     if (!HookRegistry::call('TrackDirectorAction::recordDecision', array(&$trackDirectorSubmission, $directorDecision))) {
         if ($decision == SUBMISSION_DIRECTOR_DECISION_DECLINE) {
             $trackDirectorSubmission->setStatus(STATUS_DECLINED);
             $trackDirectorSubmission->stampStatusModified();
         } else {
             $trackDirectorSubmission->setStatus(STATUS_QUEUED);
             $trackDirectorSubmission->stampStatusModified();
         }
         $trackDirectorSubmission->addDecision($directorDecision, $stage);
         $decisions = TrackDirectorSubmission::getDirectorDecisionOptions();
         // Add log
         import('paper.log.PaperLog');
         import('paper.log.PaperEventLogEntry');
         Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OCS_DIRECTOR));
         PaperLog::logEvent($trackDirectorSubmission->getPaperId(), PAPER_LOG_DIRECTOR_DECISION, LOG_TYPE_DIRECTOR, $user->getId(), 'log.director.decision', array('directorName' => $user->getFullName(), 'paperId' => $trackDirectorSubmission->getPaperId(), 'decision' => Locale::translate($decisions[$decision]), 'round' => $stage == REVIEW_STAGE_ABSTRACT ? 'submission.abstractReview' : 'submission.paperReview'));
     }
     if ($decision == SUBMISSION_DIRECTOR_DECISION_ACCEPT || $decision == SUBMISSION_DIRECTOR_DECISION_INVITE) {
         // completeReview will take care of updating the
         // submission with the new decision.
         TrackDirectorAction::completeReview($trackDirectorSubmission);
     } else {
         // Insert the new decision.
         $trackDirectorSubmissionDao->updateTrackDirectorSubmission($trackDirectorSubmission);
     }
 }
开发者ID:jmacgreg,项目名称:ocs,代码行数:40,代码来源:TrackDirectorAction.inc.php

示例13: fetch

 /**
  * Fetch
  * @param $request PKPRequest
  * @see Form::fetch()
  */
 function fetch(&$request)
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('monographFileCategories', array(GENRE_CATEGORY_DOCUMENT => Locale::translate('submission.document'), GENRE_CATEGORY_ARTWORK => Locale::translate('submission.art')));
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_MANAGER));
     return parent::fetch($request);
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:12,代码来源:GenreForm.inc.php

示例14: initialize

 /**
  * @see PKPHandler::initialize()
  */
 function initialize(&$request, $args)
 {
     parent::initialize($request, $args);
     // Set the uploader roles (if given).
     $uploaderRoles = $request->getUserVar('uploaderRoles');
     if (!is_null($uploaderRoles)) {
         $this->_uploaderRoles = array();
         $uploaderRoles = explode('-', $uploaderRoles);
         foreach ($uploaderRoles as $uploaderRole) {
             if (!is_numeric($uploaderRole)) {
                 fatalError('Invalid uploader role!');
             }
             $this->_uploaderRoles[] = (int) $uploaderRole;
         }
     }
     // Do we allow revisions only?
     $this->_revisionOnly = (bool) $request->getUserVar('revisionOnly');
     $this->_reviewType = $request->getUserVar('reviewType') ? (int) $request->getUserVar('reviewType') : null;
     $this->_round = $request->getUserVar('round') ? (int) $request->getUserVar('round') : null;
     // The revised file will be non-null if we revise a single existing file.
     if ($this->getRevisionOnly() && $request->getUserVar('revisedFileId')) {
         $this->_revisedFileId = (int) $request->getUserVar('revisedFileId');
     }
     // Load translations.
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:29,代码来源:FileUploadWizardHandler.inc.php

示例15: initialize

 function initialize(&$request)
 {
     parent::initialize($request);
     import('classes.file.LibraryFileManager');
     $libraryFileManager = new LibraryFileManager();
     // Fetch and validate fileType (validated in getNameFromType)
     $fileType = (int) $request->getUserVar('fileType');
     $this->setFileType($fileType);
     $name = $libraryFileManager->getNameFromType($this->getFileType());
     // Basic grid configuration
     $this->setId('libraryFile' . ucwords(strtolower($name)));
     $this->setTitle("grid.libraryFiles.{$name}.title");
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_SUBMISSION));
     // Elements to be displayed in the grid
     $router =& $request->getRouter();
     $context =& $router->getContext($request);
     $libraryFileDao =& DAORegistry::getDAO('LibraryFileDAO');
     $libraryFiles =& $libraryFileDao->getByPressId($context->getId(), $this->getFileType());
     $this->setGridDataElements($libraryFiles);
     // Add grid-level actions
     $this->addAction(new LinkAction('addFile', new AjaxModal($router->url($request, null, null, 'addFile', null, array('fileType' => $this->getFileType())), __('grid.action.addItem'), 'fileManagement'), __('grid.action.addItem'), 'add_item'));
     // Columns
     // Basic grid row configuration
     import('controllers.grid.settings.library.LibraryFileGridCellProvider');
     $this->addColumn(new GridColumn('files', 'grid.libraryFiles.column.files', null, 'controllers/grid/gridCell.tpl', new LibraryFileGridCellProvider()));
 }
开发者ID:jerico-dev,项目名称:omp,代码行数:26,代码来源:LibraryFileGridHandler.inc.php


注:本文中的Locale::requireComponents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。