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


PHP Locale::Translate方法代码示例

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


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

示例1: index

 /**
  * Display section editor index page.
  */
 function index($args)
 {
     SectionEditorHandler::validate();
     SectionEditorHandler::setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $rangeInfo = Handler::getRangeInfo('submissions');
     // Get the user's search conditions, if any
     $searchField = Request::getUserVar('searchField');
     $dateSearchField = Request::getUserVar('dateSearchField');
     $searchMatch = Request::getUserVar('searchMatch');
     $search = Request::getUserVar('search');
     $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
     if ($fromDate !== null) {
         $fromDate = date('Y-m-d H:i:s', $fromDate);
     }
     $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
     if ($toDate !== null) {
         $toDate = date('Y-m-d H:i:s', $toDate);
     }
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $page = isset($args[0]) ? $args[0] : '';
     $sections =& $sectionDao->getSectionTitles($journal->getJournalId());
     switch ($page) {
         case 'submissionsInEditing':
             $functionName = 'getSectionEditorSubmissionsInEditing';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.inEditing';
             break;
         case 'submissionsArchives':
             $functionName = 'getSectionEditorSubmissionsArchives';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.archives';
             break;
         default:
             $page = 'submissionsInReview';
             $functionName = 'getSectionEditorSubmissionsInReview';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.inReview';
     }
     $submissions =& $sectionEditorSubmissionDao->{$functionName}($user->getUserId(), $journal->getJournalId(), Request::getUserVar('section'), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('helpTopicId', $helpTopicId);
     $templateMgr->assign('sectionOptions', array(0 => Locale::Translate('editor.allSections')) + $sections);
     $templateMgr->assign_by_ref('submissions', $submissions);
     $templateMgr->assign('section', Request::getUserVar('section'));
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign('sectionEditor', $user->getFullName());
     // Set search parameters
     $duplicateParameters = array('searchField', 'searchMatch', 'search', 'dateFromMonth', 'dateFromDay', 'dateFromYear', 'dateToMonth', 'dateToDay', 'dateToYear', 'dateSearchField');
     foreach ($duplicateParameters as $param) {
         $templateMgr->assign($param, Request::getUserVar($param));
     }
     $templateMgr->assign('dateFrom', $fromDate);
     $templateMgr->assign('dateTo', $toDate);
     $templateMgr->assign('fieldOptions', array(SUBMISSION_FIELD_TITLE => 'article.title', SUBMISSION_FIELD_AUTHOR => 'user.role.author', SUBMISSION_FIELD_EDITOR => 'user.role.editor'));
     $templateMgr->assign('dateFieldOptions', array(SUBMISSION_FIELD_DATE_SUBMITTED => 'submissions.submitted', SUBMISSION_FIELD_DATE_COPYEDIT_COMPLETE => 'submissions.copyeditComplete', SUBMISSION_FIELD_DATE_LAYOUT_COMPLETE => 'submissions.layoutComplete', SUBMISSION_FIELD_DATE_PROOFREADING_COMPLETE => 'submissions.proofreadingComplete'));
     import('issue.IssueAction');
     $issueAction =& new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->display('sectionEditor/index.tpl');
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:63,代码来源:SectionEditorHandler.inc.php

示例2: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $journal =& Request::getJournal();
     // set up the accessibility options pulldown
     $templateMgr->assign('enableDelayedOpenAccess', $journal->getSetting('enableDelayedOpenAccess'));
     $templateMgr->assign('accessOptions', array(ISSUE_ACCESS_OPEN => Locale::Translate('editor.issues.openAccess'), ISSUE_ACCESS_SUBSCRIPTION => Locale::Translate('editor.issues.subscription')));
     $templateMgr->assign('enablePublicIssueId', $journal->getSetting('enablePublicIssueId'));
     parent::display();
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:13,代码来源:IssueForm.inc.php

示例3: advanced

 /**
  * Show advanced search form.
  */
 function advanced()
 {
     parent::validate();
     SearchHandler::setupTemplate(false);
     $templateMgr =& TemplateManager::getManager();
     if (Request::getJournal() == null) {
         $journalDao =& DAORegistry::getDAO('JournalDAO');
         $journals =& $journalDao->getEnabledJournalTitles();
         //Enabled added
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('journalOptions', array('' => Locale::Translate('search.allJournals')) + $journals);
         $journalPath = Request::getRequestedJournalPath();
     }
     SearchHandler::assignAdvancedSearchParameters($templateMgr);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:19,代码来源:SearchHandler.inc.php

示例4: advanced

 /**
  * Show advanced search form.
  */
 function advanced()
 {
     parent::validate();
     SearchHandler::setupTemplate(false);
     $templateMgr =& TemplateManager::getManager();
     $publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
     if (Request::getConference() == null) {
         $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
         $conferences =& $conferenceDao->getConferenceTitles(true);
         //Enabled added
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('conferenceOptions', array('' => Locale::Translate('search.allConferences')) + $conferences);
         $yearRange = $publishedPaperDao->getPaperYearRange(null);
     } else {
         $conference =& Request::getConference();
         $yearRange = $publishedPaperDao->getPaperYearRange($conference->getId());
     }
     SearchHandler::_assignAdvancedSearchParameters($templateMgr, $yearRange);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:23,代码来源:SearchHandler.inc.php

示例5: advanced

 /**
  * Show advanced search form.
  */
 function advanced()
 {
     $this->validate();
     $this->setupTemplate(false);
     $templateMgr =& TemplateManager::getManager();
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     if (Request::getJournal() == null) {
         $journalDao =& DAORegistry::getDAO('JournalDAO');
         $journals =& $journalDao->getJournalTitles(true);
         $templateMgr->assign('siteSearch', true);
         $templateMgr->assign('journalOptions', array('' => Locale::Translate('search.allJournals')) + $journals);
         $journalPath = Request::getRequestedJournalPath();
         $yearRange = $publishedArticleDao->getArticleYearRange(null);
     } else {
         $journal =& Request::getJournal();
         $yearRange = $publishedArticleDao->getArticleYearRange($journal->getId());
     }
     $this->_assignAdvancedSearchParameters($templateMgr, $yearRange);
     $templateMgr->display('search/advancedSearch.tpl');
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:23,代码来源:SearchHandler.inc.php

示例6: sendReminder

 function sendReminder($subscription, $journal, $emailKey)
 {
     $userDao =& DAORegistry::getDAO('UserDAO');
     $subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');
     $journalName = $journal->getLocalizedTitle();
     $journalId = $journal->getId();
     $user =& $userDao->getUser($subscription->getUserId());
     if (!isset($user)) {
         return false;
     }
     $subscriptionType =& $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());
     $subscriptionName = $journal->getSetting('subscriptionName');
     $subscriptionEmail = $journal->getSetting('subscriptionEmail');
     $subscriptionPhone = $journal->getSetting('subscriptionPhone');
     $subscriptionFax = $journal->getSetting('subscriptionFax');
     $subscriptionMailingAddress = $journal->getSetting('subscriptionMailingAddress');
     $subscriptionContactSignature = $subscriptionName;
     Locale::requireComponents(array(LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_APPLICATION_COMMON));
     if ($subscriptionMailingAddress != '') {
         $subscriptionContactSignature .= "\n" . $subscriptionMailingAddress;
     }
     if ($subscriptionPhone != '') {
         $subscriptionContactSignature .= "\n" . Locale::Translate('user.phone') . ': ' . $subscriptionPhone;
     }
     if ($subscriptionFax != '') {
         $subscriptionContactSignature .= "\n" . Locale::Translate('user.fax') . ': ' . $subscriptionFax;
     }
     $subscriptionContactSignature .= "\n" . Locale::Translate('user.email') . ': ' . $subscriptionEmail;
     $paramArray = array('subscriberName' => $user->getFullName(), 'journalName' => $journalName, 'subscriptionType' => $subscriptionType->getSummaryString(), 'expiryDate' => $subscription->getDateEnd(), 'username' => $user->getUsername(), 'subscriptionContactSignature' => $subscriptionContactSignature);
     import('classes.mail.MailTemplate');
     $mail = new MailTemplate($emailKey);
     $mail->setFrom($subscriptionEmail, $subscriptionName);
     $mail->addRecipient($user->getEmail(), $user->getFullName());
     $mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
     $mail->setBody($mail->getBody($journal->getPrimaryLocale()));
     $mail->assignParams($paramArray);
     $mail->send();
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:38,代码来源:SubscriptionExpiryReminder.inc.php

示例7: sendReminder

 function sendReminder($registration, $conference, $schedConf, $emailKey)
 {
     $userDao =& DAORegistry::getDAO('UserDAO');
     $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
     $schedConfName = $schedConf->getLocalizedTitle();
     $schedConfId = $schedConf->getId();
     $user =& $userDao->getUser($registration->getUserId());
     if (!isset($user)) {
         return false;
     }
     $registrationType =& $registrationTypeDao->getRegistrationType($registration->getTypeId());
     $registrationName = $schedConf->getSetting('registrationName');
     $registrationEmail = $schedConf->getSetting('registrationEmail');
     $registrationPhone = $schedConf->getSetting('registrationPhone');
     $registrationFax = $schedConf->getSetting('registrationFax');
     $registrationMailingAddress = $schedConf->getSetting('registrationMailingAddress');
     $registrationContactSignature = $registrationName;
     if ($registrationMailingAddress != '') {
         $registrationContactSignature .= "\n" . $registrationMailingAddress;
     }
     if ($registrationPhone != '') {
         $registrationContactSignature .= "\n" . Locale::Translate('user.phone') . ': ' . $registrationPhone;
     }
     if ($registrationFax != '') {
         $registrationContactSignature .= "\n" . Locale::Translate('user.fax') . ': ' . $registrationFax;
     }
     $registrationContactSignature .= "\n" . Locale::Translate('user.email') . ': ' . $registrationEmail;
     $paramArray = array('registrantName' => $user->getFullName(), 'conferenceName' => $conferenceName, 'schedConfName' => $schedConfName, 'registrationType' => $registrationType->getSummaryString(), 'expiryDate' => $registration->getDateEnd(), 'username' => $user->getUsername(), 'registrationContactSignature' => $registrationContactSignature);
     import('classes.mail.MailTemplate');
     $mail = new MailTemplate($emailKey);
     $mail->setFrom($registrationEmail, $registrationName);
     $mail->addRecipient($user->getEmail(), $user->getFullName());
     $mail->setSubject($mail->getSubject($conference->getPrimaryLocale()));
     $mail->setBody($mail->getBody($conference->getPrimaryLocale()));
     $mail->assignParams($paramArray);
     $mail->send();
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:37,代码来源:RegistrationExpiryReminder.inc.php

示例8: displayHomepage

 /**
  * Display external feed content on journal homepage.
  * @param $hookName string
  * @param $args array
  */
 function displayHomepage($hookName, $args)
 {
     $journal =& Request::getJournal();
     $journalId = $journal ? $journal->getId() : 0;
     if ($this->getEnabled()) {
         $requestedPage = Request::getRequestedPage();
         if (empty($requestedPage) || $requestedPage == 'index') {
             $externalFeedDao =& DAORegistry::getDAO('ExternalFeedDAO');
             $this->import('simplepie.SimplePie');
             $feeds =& $externalFeedDao->getExternalFeedsByJournalId($journal->getId());
             $output = '<div id="externalFeedsHome">';
             while ($currentFeed =& $feeds->next()) {
                 if (!$currentFeed->getDisplayHomepage()) {
                     continue;
                 }
                 $feed = new SimplePie();
                 $feed->set_feed_url($currentFeed->getUrl());
                 $feed->enable_order_by_date(false);
                 $feed->set_cache_location(CacheManager::getFileCachePath());
                 $feed->init();
                 if ($currentFeed->getLimitItems()) {
                     $recentItems = $currentFeed->getRecentItems();
                 } else {
                     $recentItems = 0;
                 }
                 $output .= '<h3>' . $currentFeed->getLocalizedTitle() . '</h3>';
                 $output .= '<table class="externalFeeds">';
                 $output .= '<tr>';
                 $output .= '<td colspan="2" class="headseparator">&nbsp;</td>';
                 $output .= '</tr>';
                 $separator = '';
                 foreach ($feed->get_items(0, $recentItems) as $item) {
                     $output .= $separator;
                     $output .= '<tr class="title">';
                     $output .= '<td colspan="2" class="title">';
                     $output .= '<h4>' . $item->get_title() . '</h4>';
                     $output .= '</td>';
                     $output .= '</tr>';
                     $output .= '<tr class="description">';
                     $output .= '<td colspan="2" class="description">';
                     $output .= $item->get_description();
                     $output .= '</td>';
                     $output .= '</tr>';
                     $output .= '<tr class="details">';
                     $output .= '<td class="posted">';
                     $output .= Locale::Translate('plugins.generic.externalFeed.posted') . ': ' . date('Y-m-d', strtotime($item->get_date()));
                     $output .= '</td>';
                     $output .= '<td class="more">';
                     $output .= '<a href="' . $item->get_permalink() . '" target="_blank">' . Locale::Translate('plugins.generic.externalFeed.more') . '</a>';
                     $output .= '</td>';
                     $output .= '</tr>';
                     $separator = '<tr><td colspan="2" class="separator">&nbsp;</td></tr>';
                 }
                 $output .= '<tr><td colspan="2" class="endseparator">&nbsp;</td></tr>';
                 $output .= '</table>';
             }
             $output .= '</div>';
             $templateManager =& $args[0];
             $additionalHomeContent = $templateManager->get_template_vars('additionalHomeContent');
             $templateManager->assign('additionalHomeContent', $additionalHomeContent . "\n\n" . $output);
         }
     }
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:68,代码来源:ExternalFeedPlugin.inc.php

示例9: execute

 /**
  * Save thesis. 
  */
 function execute()
 {
     $thesisPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);
     $thesisPlugin->import('Thesis');
     $thesisDao =& DAORegistry::getDAO('ThesisDAO');
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $thesis = new Thesis();
     $thesis->setJournalId($journalId);
     $thesis->setStatus(THESIS_STATUS_INACTIVE);
     $thesis->setDegree($this->getData('degree'));
     $thesis->setDegreeName($this->getData('degreeName'));
     $thesis->setDepartment($this->getData('department'));
     $thesis->setUniversity($this->getData('university'));
     $thesis->setTitle($this->getData('title'));
     $thesis->setDateApproved($this->getData('dateApprovedYear') . '-' . $this->getData('dateApprovedMonth') . '-' . $this->getData('dateApprovedDay'));
     $thesis->setUrl(strtolower($this->getData('url')));
     $thesis->setAbstract($this->getData('abstract'));
     $thesis->setComment($this->getData('comment'));
     $thesis->setStudentFirstName($this->getData('studentFirstName'));
     $thesis->setStudentMiddleName($this->getData('studentMiddleName'));
     $thesis->setStudentLastName($this->getData('studentLastName'));
     $thesis->setStudentEmail($this->getData('studentEmail'));
     $thesis->setStudentEmailPublish($this->getData('studentEmailPublish') == null ? 0 : 1);
     $thesis->setStudentBio($this->getData('studentBio'));
     $thesis->setSupervisorFirstName($this->getData('supervisorFirstName'));
     $thesis->setSupervisorMiddleName($this->getData('supervisorMiddleName'));
     $thesis->setSupervisorLastName($this->getData('supervisorLastName'));
     $thesis->setSupervisorEmail($this->getData('supervisorEmail'));
     $thesis->setDiscipline($this->getData('discipline'));
     $thesis->setSubjectClass($this->getData('subjectClass'));
     $thesis->setSubject($this->getData('keyword'));
     $thesis->setCoverageGeo($this->getData('coverageGeo'));
     $thesis->setCoverageChron($this->getData('coverageChron'));
     $thesis->setCoverageSample($this->getData('coverageSample'));
     $thesis->setMethod($this->getData('method'));
     $thesis->setLanguage($this->getData('language'));
     $thesis->setDateSubmitted(Core::getCurrentDate());
     $thesisDao->insertThesis($thesis);
     // Send supervisor confirmation email
     if (!empty($this->uploadCodeEnabled)) {
         $uploadCode = $thesisPlugin->getSetting($journalId, 'uploadCode');
         $submittedUploadCode = $this->getData('uploadCode');
     }
     if (empty($uploadCode) || $uploadCode != $submittedUploadCode) {
         $journalName = $journal->getLocalizedTitle();
         $thesisName = $thesisPlugin->getSetting($journalId, 'thesisName');
         $thesisEmail = $thesisPlugin->getSetting($journalId, 'thesisEmail');
         $thesisPhone = $thesisPlugin->getSetting($journalId, 'thesisPhone');
         $thesisFax = $thesisPlugin->getSetting($journalId, 'thesisFax');
         $thesisMailingAddress = $thesisPlugin->getSetting($journalId, 'thesisMailingAddress');
         $thesisContactSignature = $thesisName;
         if (!empty($thesisMailingAddress)) {
             $thesisContactSignature .= "\n" . $thesisMailingAddress;
         }
         if (!empty($thesisPhone)) {
             $thesisContactSignature .= "\n" . Locale::Translate('user.phone') . ': ' . $thesisPhone;
         }
         if (!empty($thesisFax)) {
             $thesisContactSignature .= "\n" . Locale::Translate('user.fax') . ': ' . $thesisFax;
         }
         $thesisContactSignature .= "\n" . Locale::Translate('user.email') . ': ' . $thesisEmail;
         $studentName = $thesis->getStudentFirstName() . ' ' . $thesis->getStudentLastName();
         $supervisorName = $thesis->getSupervisorFirstName() . ' ' . $thesis->getSupervisorLastName();
         $paramArray = array('journalName' => $journalName, 'thesisName' => $thesisName, 'thesisEmail' => $thesisEmail, 'title' => $thesis->getTitle(), 'studentName' => $studentName, 'degree' => Locale::Translate($thesis->getDegreeString()), 'degreeName' => $thesis->getDegreeName(), 'department' => $thesis->getDepartment(), 'university' => $thesis->getUniversity(), 'dateApproved' => $thesis->getDateApproved(), 'supervisorName' => $supervisorName, 'abstract' => $thesis->getAbstract(), 'thesisContactSignature' => $thesisContactSignature);
         import('classes.mail.MailTemplate');
         $mail = new MailTemplate('THESIS_ABSTRACT_CONFIRM');
         $mail->setFrom($thesisEmail, "\"" . $thesisName . "\"");
         $mail->assignParams($paramArray);
         $mail->addRecipient($thesis->getSupervisorEmail(), "\"" . $supervisorName . "\"");
         $mail->addCc($thesis->getStudentEmail(), "\"" . $studentName . "\"");
         $mail->send();
     }
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:77,代码来源:StudentThesisForm.inc.php

示例10: setupTemplate

 /**
  * Setup common template variables.
  * @param $subclass boolean set to true if caller is below this handler in the hierarchy
  */
 function setupTemplate($subclass = false)
 {
     $templateMgr =& TemplateManager::getManager();
     if ($subclass) {
         $templateMgr->append('pageHierarchy', array(Request::url(null, 'booksForReview'), Locale::Translate('plugins.generic.booksForReview.displayName'), true));
     }
     $bfrPlugin =& PluginRegistry::getPlugin('generic', BOOKS_FOR_REVIEW_PLUGIN_NAME);
     $templateMgr->addStyleSheet(Request::getBaseUrl() . '/' . $bfrPlugin->getStyleSheet());
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:13,代码来源:BooksForReviewHandler.inc.php

示例11: getSpecificDiscussionsText

 function getSpecificDiscussionsText($option)
 {
     switch ($option) {
         case MINUTES_REVIEW_POPULATION_SELECTION:
             return Locale::Translate('editor.minutes.initialReview.populationSelect');
         case MINUTES_REVIEW_SCIENTIFIC_DESIGN:
             return Locale::Translate('editor.minutes.initialReview.scientificDesign');
         case MINUTES_REVIEW_MINIMIZATIONS:
             return Locale::Translate('editor.minutes.initialReview.minimizations');
         case MINUTES_REVIEW_SAFEGUARDS:
             return Locale::Translate('editor.minutes.initialReview.safeguards');
         case MINUTES_REVIEW_CONFIDENTIALITY:
             return Locale::Translate('editor.minutes.initialReview.confidentiality');
         case MINUTES_REVIEW_RISKS:
             return Locale::Translate('editor.minutes.initialReview.risks');
         case MINUTES_REVIEW_BENEFITS:
             return Locale::Translate('editor.minutes.initialReview.benefits');
         case MINUTES_REVIEW_CONSENT_DOCUMENT:
             return Locale::Translate('editor.minutes.initialReview.consentDocument');
         case MINUTES_REVIEW_OTHER_CONSIDERATIONS:
             return Locale::Translate('editor.minutes.initialReview.otherConsiderations');
         case MINUTES_REVIEW_LOCAL_IRB:
             return Locale::Translate('editor.minutes.initialReview.localIrbApproval');
         default:
             return Locale::Translate('editor.minutes.specificDiscussion');
     }
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:27,代码来源:Meeting.inc.php

示例12: index

 /**
  * Display section editor index page.
  */
 function index($args)
 {
     $this->validate();
     $this->setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $rangeInfo = Handler::getRangeInfo('submissions');
     // Get the user's search conditions, if any
     $searchField = Request::getUserVar('searchField');
     $dateSearchField = Request::getUserVar('dateSearchField');
     $searchMatch = Request::getUserVar('searchMatch');
     $search = Request::getUserVar('search');
     $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
     if ($fromDate !== null) {
         $fromDate = date('Y-m-d H:i:s', $fromDate);
     }
     $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
     if ($toDate !== null) {
         $toDate = date('Y-m-d H:i:s', $toDate);
     }
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $page = isset($args[0]) ? $args[0] : '';
     $sections =& $sectionDao->getSectionTitles($journal->getId());
     $sort = Request::getUserVar('sort');
     $sort = isset($sort) ? $sort : 'title';
     $sortDirection = Request::getUserVar('sortDirection');
     $filterSectionOptions = array(FILTER_SECTION_ALL => Locale::Translate('editor.allSections')) + $sections;
     switch ($page) {
         case 'waitingForResubmissions':
             $functionName = 'getSectionEditorWaitingForSubmissionsIterator';
             break;
         case 'submissionsInReview':
             $functionName = 'getSectionEditorSubmissionsInReviewIterator';
             break;
         case 'submissionsApproved':
             $functionName = 'getSectionEditorSubmissionsApprovedIterator';
             break;
         case 'submissionsCompleted':
             $functionName = 'getSectionEditorSubmissionsCompletedIterator';
             break;
         case 'submissionsArchives':
             $functionName = 'getSectionEditorSubmissionsArchivesIterator';
             break;
         default:
             $page = 'submissionsSubmitted';
             $functionName = 'getSectionEditorSubmissionsSubmittedIterator';
     }
     $submissions =& $sectionEditorSubmissionDao->{$functionName}($user->getSecretaryCommitteeId(), $journal->getId(), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo, $sort, $sortDirection);
     $templateMgr =& TemplateManager::getManager();
     //$templateMgr->assign('helpTopicId', $helpTopicId);
     $templateMgr->assign('sectionOptions', $filterSectionOptions);
     $templateMgr->assign_by_ref('submissions', $submissions);
     // EL on February 19th 2013
     //$templateMgr->assign('filterSection', $filterSection);
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign('sectionEditor', $user->getFullName());
     // Set search parameters
     $duplicateParameters = array('searchField', 'searchMatch', 'search', 'dateFromMonth', 'dateFromDay', 'dateFromYear', 'dateToMonth', 'dateToDay', 'dateToYear', 'dateSearchField');
     foreach ($duplicateParameters as $param) {
         $templateMgr->assign($param, Request::getUserVar($param));
     }
     $templateMgr->assign('dateFrom', $fromDate);
     $templateMgr->assign('dateTo', $toDate);
     $templateMgr->assign('fieldOptions', array(SUBMISSION_FIELD_TITLE => 'article.title', SUBMISSION_FIELD_AUTHOR => 'user.role.author', SUBMISSION_FIELD_EDITOR => 'user.role.editor'));
     $templateMgr->assign('dateFieldOptions', array(SUBMISSION_FIELD_DATE_SUBMITTED => 'submissions.submitted', SUBMISSION_FIELD_DATE_COPYEDIT_COMPLETE => 'submissions.copyeditComplete', SUBMISSION_FIELD_DATE_LAYOUT_COMPLETE => 'submissions.layoutComplete', SUBMISSION_FIELD_DATE_PROOFREADING_COMPLETE => 'submissions.proofreadingComplete'));
     $extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');
     $countries =& $extraFieldDao->getExtraFieldsList(EXTRA_FIELD_GEO_AREA);
     $templateMgr->assign_by_ref('countries', $countries);
     import('classes.issue.IssueAction');
     $issueAction = new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->assign('sort', $sort);
     $templateMgr->assign('sortDirection', $sortDirection);
     $templateMgr->assign('ercId', $user->getSecretaryCommitteeId());
     $templateMgr->display('sectionEditor/index.tpl');
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:80,代码来源:SectionEditorHandler.inc.php

示例13: execute

 /**
  * Save subscription. 
  */
 function execute()
 {
     $subscriptionDao =& DAORegistry::getDAO('SubscriptionDAO');
     $journal =& Request::getJournal();
     if (isset($this->subscriptionId)) {
         $subscription =& $subscriptionDao->getSubscription($this->subscriptionId);
     }
     if (!isset($subscription)) {
         $subscription =& new Subscription();
     }
     $subscription->setJournalId($journal->getJournalId());
     $subscription->setUserId($this->getData('userId'));
     $subscription->setTypeId($this->getData('typeId'));
     $subscription->setDateStart($this->getData('dateStartYear') . '-' . $this->getData('dateStartMonth') . '-' . $this->getData('dateStartDay'));
     $subscription->setDateEnd($this->getData('dateEndYear') . '-' . $this->getData('dateEndMonth') . '-' . $this->getData('dateEndDay'));
     $subscription->setMembership($this->getData('membership') ? $this->getData('membership') : null);
     $subscription->setDomain($this->getData('domain') ? $this->getData('domain') : null);
     $subscription->setIPRange($this->getData('ipRange') ? $this->getData('ipRange') : null);
     // Update or insert subscription
     if ($subscription->getSubscriptionId() != null) {
         $subscriptionDao->updateSubscription($subscription);
     } else {
         $subscriptionDao->insertSubscription($subscription);
     }
     if ($this->getData('notifyEmail')) {
         // Send user subscription notification email
         $userDao =& DAORegistry::getDAO('UserDAO');
         $subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');
         $journalSettingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
         $journalName = $journal->getJournalTitle();
         $journalId = $journal->getJournalId();
         $user =& $userDao->getUser($this->getData('userId'));
         $subscriptionType =& $subscriptionTypeDao->getSubscriptionType($this->getData('typeId'));
         $subscriptionName = $journalSettingsDao->getSetting($journalId, 'subscriptionName');
         $subscriptionEmail = $journalSettingsDao->getSetting($journalId, 'subscriptionEmail');
         $subscriptionPhone = $journalSettingsDao->getSetting($journalId, 'subscriptionPhone');
         $subscriptionFax = $journalSettingsDao->getSetting($journalId, 'subscriptionFax');
         $subscriptionMailingAddress = $journalSettingsDao->getSetting($journalId, 'subscriptionMailingAddress');
         $subscriptionContactSignature = $subscriptionName;
         if ($subscriptionMailingAddress != '') {
             $subscriptionContactSignature .= "\n" . $subscriptionMailingAddress;
         }
         if ($subscriptionPhone != '') {
             $subscriptionContactSignature .= "\n" . Locale::Translate('user.phone') . ': ' . $subscriptionPhone;
         }
         if ($subscriptionFax != '') {
             $subscriptionContactSignature .= "\n" . Locale::Translate('user.fax') . ': ' . $subscriptionFax;
         }
         $subscriptionContactSignature .= "\n" . Locale::Translate('user.email') . ': ' . $subscriptionEmail;
         $paramArray = array('subscriberName' => $user->getFullName(), 'journalName' => $journalName, 'subscriptionType' => $subscriptionType->getSummaryString(), 'username' => $user->getUsername(), 'subscriptionContactSignature' => $subscriptionContactSignature);
         import('mail.MailTemplate');
         $mail =& new MailTemplate('SUBSCRIPTION_NOTIFY');
         $mail->setFrom($subscriptionEmail, $subscriptionName);
         $mail->assignParams($paramArray);
         $mail->addRecipient($user->getEmail(), $user->getFullName());
         $mail->send();
     }
 }
开发者ID:Jouper,项目名称:jouper,代码行数:61,代码来源:SubscriptionForm.inc.php

示例14: issueToc

 /**
  * Display the table of contents
  */
 function issueToc($args, $request)
 {
     $issueId = (int) array_shift($args);
     $this->validate($issueId, true);
     $issue =& $this->issue;
     $this->setupTemplate(EDITOR_SECTION_ISSUES);
     $templateMgr =& TemplateManager::getManager();
     $journal =& $request->getJournal();
     $journalId = $journal->getId();
     $journalSettingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $enablePublicArticleId = $journalSettingsDao->getSetting($journalId, 'enablePublicArticleId');
     $templateMgr->assign('enablePublicArticleId', $enablePublicArticleId);
     $enablePageNumber = $journalSettingsDao->getSetting($journalId, 'enablePageNumber');
     $templateMgr->assign('enablePageNumber', $enablePageNumber);
     $templateMgr->assign('customSectionOrderingExists', $customSectionOrderingExists = $sectionDao->customSectionOrderingExists($issueId));
     $templateMgr->assign('issueId', $issueId);
     $templateMgr->assign_by_ref('issue', $issue);
     $templateMgr->assign('unpublished', !$issue->getPublished());
     $templateMgr->assign('issueAccess', $issue->getAccessStatus());
     // get issue sections and articles
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);
     $layoutEditorSubmissionDao =& DAORegistry::getDAO('LayoutEditorSubmissionDAO');
     $proofedArticleIds = $layoutEditorSubmissionDao->getProofedArticlesByIssueId($issueId);
     $templateMgr->assign('proofedArticleIds', $proofedArticleIds);
     $currSection = 0;
     $counter = 0;
     $sections = array();
     $sectionCount = 0;
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     foreach ($publishedArticles as $article) {
         $sectionId = $article->getSectionId();
         if ($currSection != $sectionId) {
             $lastSectionId = $currSection;
             $sectionCount++;
             if ($lastSectionId !== 0) {
                 $sections[$lastSectionId][5] = $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $sectionId) : $sectionCount;
             }
             // Store next custom order
             $currSection = $sectionId;
             $counter++;
             $sections[$sectionId] = array($sectionId, $article->getSectionTitle(), array($article), $counter, $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $lastSectionId) : $sectionCount - 1, null);
         } else {
             $sections[$article->getSectionId()][2][] = $article;
         }
     }
     $templateMgr->assign_by_ref('sections', $sections);
     $templateMgr->assign('accessOptions', array(ARTICLE_ACCESS_ISSUE_DEFAULT => Locale::Translate('editor.issues.default'), ARTICLE_ACCESS_OPEN => Locale::Translate('editor.issues.open')));
     import('classes.issue.IssueAction');
     $templateMgr->assign('issueOptions', IssueAction::getIssueOptions());
     $templateMgr->assign('helpTopicId', 'publishing.tableOfContents');
     $templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');
     $templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');
     $templateMgr->display('editor/issues/issueToc.tpl');
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:59,代码来源:IssueManagementHandler.inc.php

示例15: issueToc

 /**
  * Display the table of contents
  */
 function issueToc($args)
 {
     $issueId = isset($args[0]) ? $args[0] : 0;
     $issue = IssueManagementHandler::validate($issueId, true);
     IssueManagementHandler::setupTemplate(EDITOR_SECTION_ISSUES);
     $templateMgr =& TemplateManager::getManager();
     $journal =& Request::getJournal();
     $journalId = $journal->getJournalId();
     $journalSettingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $enablePublicArticleId = $journalSettingsDao->getSetting($journalId, 'enablePublicArticleId');
     $templateMgr->assign('enablePublicArticleId', $enablePublicArticleId);
     $enableSubscriptions = $journalSettingsDao->getSetting($journalId, 'enableSubscriptions');
     $templateMgr->assign('enableSubscriptions', $enableSubscriptions);
     $enablePageNumber = $journalSettingsDao->getSetting($journalId, 'enablePageNumber');
     $templateMgr->assign('enablePageNumber', $enablePageNumber);
     $templateMgr->assign('customSectionOrderingExists', $customSectionOrderingExists = $sectionDao->customSectionOrderingExists($issueId));
     $templateMgr->assign('issueId', $issueId);
     $templateMgr->assign_by_ref('issue', $issue);
     $templateMgr->assign('unpublished', !$issue->getPublished());
     $templateMgr->assign('issueAccess', $issue->getAccessStatus());
     // get issue sections and articles
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);
     $layoutAssignmentDao =& DAORegistry::getDAO('LayoutAssignmentDAO');
     $proofedArticleIds = $layoutAssignmentDao->getProofedArticlesByIssueId($issueId);
     $templateMgr->assign('proofedArticleIds', $proofedArticleIds);
     $currSection = 0;
     $counter = 0;
     $sections = array();
     $sectionCount = 0;
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     foreach ($publishedArticles as $article) {
         $sectionId = $article->getSectionId();
         if ($currSection != $sectionId) {
             $lastSectionId = $currSection;
             $sectionCount++;
             if ($lastSectionId !== 0) {
                 $sections[$lastSectionId][5] = $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $sectionId) : $sectionCount;
             }
             // Store next custom order
             $currSection = $sectionId;
             $counter++;
             $sections[$sectionId] = array($sectionId, $article->getSectionTitle(), array($article), $counter, $customSectionOrderingExists ? $sectionDao->getCustomSectionOrder($issueId, $lastSectionId) : $sectionCount - 1, null);
         } else {
             $sections[$article->getSectionId()][2][] = $article;
         }
     }
     $templateMgr->assign_by_ref('sections', $sections);
     $accessOptions[ISSUE_DEFAULT] = Locale::Translate('editor.issues.default');
     $accessOptions[OPEN_ACCESS] = Locale::Translate('editor.issues.open');
     $templateMgr->assign('accessOptions', $accessOptions);
     import('issue.IssueAction');
     $templateMgr->assign('issueOptions', IssueAction::getIssueOptions());
     $templateMgr->assign('helpTopicId', 'publishing.tableOfContents');
     $templateMgr->display('editor/issues/issueToc.tpl');
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:60,代码来源:IssueManagementHandler.inc.php


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