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


PHP CommentForm::display方法代码示例

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


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

示例1: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageTitle', 'submission.comments.comments');
     $templateMgr->assign('commentAction', 'postLayoutComment');
     $templateMgr->assign('commentType', 'layout');
     $templateMgr->assign('hiddenFormParams', array('articleId' => $this->article->getId()));
     parent::display();
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:12,代码来源:LayoutCommentForm.inc.php

示例2: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageTitle', 'submission.comments.directorAuthorCorrespondence');
     $templateMgr->assign('paperId', $this->paper->getPaperId());
     $templateMgr->assign('commentAction', 'postDirectorDecisionComment');
     $templateMgr->assign('hiddenFormParams', array('paperId' => $this->paper->getPaperId()));
     $isDirector = $this->roleId == ROLE_ID_DIRECTOR || $this->roleId == ROLE_ID_TRACK_DIRECTOR ? true : false;
     $templateMgr->assign('isDirector', $isDirector);
     parent::display();
 }
开发者ID:sedici,项目名称:ocs,代码行数:14,代码来源:DirectorDecisionCommentForm.inc.php

示例3: display

 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageTitle', 'submission.comments.editorAuthorCorrespondence');
     $templateMgr->assign('articleId', $this->article->getId());
     $templateMgr->assign('commentAction', 'postEditorDecisionComment');
     $templateMgr->assign('hiddenFormParams', array('articleId' => $this->article->getId()));
     $isEditor = $this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR ? true : false;
     $templateMgr->assign('isEditor', $isEditor);
     parent::display();
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:14,代码来源:EditorDecisionCommentForm.inc.php

示例4: display

 /**
  * Display the form.
  */
 function display()
 {
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment =& $reviewAssignmentDao->getById($this->reviewId);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('commentType', 'peerReview');
     $templateMgr->assign('pageTitle', 'submission.comments.review');
     $templateMgr->assign('commentAction', 'postPeerReviewComment');
     $templateMgr->assign('commentTitle', strip_tags($this->article->getScientificTitle()));
     $templateMgr->assign('isLocked', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     $templateMgr->assign('canEmail', false);
     // Previously, editors could always email.
     $templateMgr->assign('showReviewLetters', $this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR ? true : false);
     $templateMgr->assign('reviewer', ROLE_ID_REVIEWER);
     $templateMgr->assign('hiddenFormParams', array('articleId' => $this->article->getArticleId(), 'reviewId' => $this->reviewId));
     parent::display();
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:20,代码来源:PeerReviewCommentForm.inc.php

示例5: display

 /**
  * Display the form.
  */
 function display()
 {
     $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment =& $reviewAssignmentDao->getById($this->reviewId);
     $reviewLetters =& $reviewAssignmentDao->getReviewIndexesForRound($this->paper->getPaperId(), $this->paper->getCurrentRound());
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('commentType', 'peerReview');
     $templateMgr->assign('pageTitle', 'submission.comments.review');
     $templateMgr->assign('commentAction', 'postPeerReviewComment');
     $templateMgr->assign('commentTitle', strip_tags($this->paper->getLocalizedTitle()));
     $templateMgr->assign('isLocked', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     $templateMgr->assign('canEmail', false);
     // Previously, directors could always email.
     $templateMgr->assign('showReviewLetters', $this->roleId == ROLE_ID_DIRECTOR ? true : false);
     $templateMgr->assign('reviewLetters', $reviewLetters);
     $templateMgr->assign('reviewer', ROLE_ID_REVIEWER);
     $templateMgr->assign('hiddenFormParams', array('paperId' => $this->paper->getPaperId(), 'reviewId' => $this->reviewId));
     parent::display();
 }
开发者ID:artkuo,项目名称:ocs,代码行数:22,代码来源:PeerReviewCommentForm.inc.php

示例6: add

 /**
  * Add a comment
  * @param $args array
  * @param $request Request
  */
 function add($args, $request)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $parentId = isset($args[2]) ? (int) $args[2] : 0;
     $journal =& $request->getJournal();
     $commentDao =& DAORegistry::getDAO('CommentDAO');
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticle =& $publishedArticleDao->getPublishedArticleByArticleId($articleId);
     $parent =& $commentDao->getById($parentId, $articleId);
     if (isset($parent) && $parent->getSubmissionId() != $articleId) {
         $request->redirect(null, null, 'view', array($articleId, $galleyId));
     }
     $this->validate($request, $articleId);
     $this->setupTemplate($request, $publishedArticle, $galleyId, $parent);
     // Bring in comment constants
     $enableComments = $journal->getSetting('enableComments');
     switch ($enableComments) {
         case COMMENTS_UNAUTHENTICATED:
             break;
         case COMMENTS_AUTHENTICATED:
         case COMMENTS_ANONYMOUS:
             // The user must be logged in to post comments.
             if (!$request->getUser()) {
                 Validation::redirectLogin();
             }
             break;
         default:
             // Comments are disabled.
             Validation::redirectLogin();
     }
     import('classes.comment.form.CommentForm');
     $commentForm = new CommentForm(null, $articleId, $galleyId, isset($parent) ? $parentId : null);
     $commentForm->initData();
     if (isset($args[3]) && $args[3] == 'save') {
         $commentForm->readInputData();
         if ($commentForm->validate()) {
             $commentForm->execute();
             // Send a notification to associated users
             import('classes.notification.NotificationManager');
             $notificationManager = new NotificationManager();
             $articleDao =& DAORegistry::getDAO('ArticleDAO');
             $article =& $articleDao->getArticle($articleId);
             $notificationUsers = $article->getAssociatedUserIds();
             foreach ($notificationUsers as $userRole) {
                 $notificationManager->createNotification($request, $userRole['id'], NOTIFICATION_TYPE_USER_COMMENT, $article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId());
             }
             $request->redirect(null, null, 'view', array($articleId, $galleyId, $parentId), array('refresh' => 1));
         }
     }
     $commentForm->display();
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:57,代码来源:CommentHandler.inc.php

示例7: add

 function add($args)
 {
     $paperId = isset($args[0]) ? (int) $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $parentId = isset($args[2]) ? (int) $args[2] : 0;
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     $this->validate($paperId);
     $paper =& $this->paper;
     $parent =& $commentDao->getComment($parentId, $paperId);
     if (isset($parent) && $parent->getPaperId() != $paperId) {
         Request::redirect(null, null, null, 'view', array($paperId, $galleyId));
     }
     $this->setupTemplate($paper, $galleyId, $parent);
     // Bring in comment constants
     $commentDao =& DAORegistry::getDAO('CommentDAO');
     $enableComments = $conference->getSetting('enableComments');
     $commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
     $commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');
     $closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
     $commentsClosed = $schedConf->getSetting('closeComments') ? true : false && strtotime($closeCommentsDate < time());
     $enableComments = $enableComments && !$commentsClosed && $paper->getEnableComments();
     if (!$enableComments) {
         Request::redirect(null, null, 'index');
     }
     if ($commentsRequireRegistration && !Request::getUser()) {
         Validation::redirectLogin();
     }
     import('comment.form.CommentForm');
     $commentForm = new CommentForm(null, $paperId, $galleyId, isset($parent) ? $parentId : null);
     $commentForm->initData();
     if (isset($args[3]) && $args[3] == 'save') {
         $commentForm->readInputData();
         if ($commentForm->validate()) {
             $commentForm->execute();
             // Send a notification to associated users
             import('notification.Notification');
             $paperDAO =& DAORegistry::getDAO('PaperDAO');
             $paper =& $paperDAO->getPaper($paperId);
             $notificationUsers = $paper->getAssociatedUserIds();
             foreach ($notificationUsers as $userRole) {
                 $url = Request::url(null, null, null, 'view', array($paperId, $galleyId, $parentId));
                 Notification::createNotification($userRole['id'], "notification.type.userComment", $paper->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_USER_COMMENT);
             }
             Request::redirect(null, null, null, 'view', array($paperId, $galleyId, $parentId), array('refresh' => 1));
         }
     }
     $commentForm->display();
 }
开发者ID:jalperin,项目名称:ocs,代码行数:49,代码来源:CommentHandler.inc.php

示例8: CommentForm

$PAGE->set_heading($course->fullname);
$PAGE->navbar->add(get_string('emarking', 'mod_emarking'));
$PAGE->navbar->add(get_string('comment', 'mod_emarking'));
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help(get_string('emarking', 'mod_emarking'), 'annotatesubmission', 'mod_emarking');
//output of the tabtree
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "comment");
//Form viewer
$view_form = 1;
// action actions on create
if ($action == "create") {
    echo $OUTPUT->heading(get_string('createcomment', 'mod_emarking'));
    //Creating form
    $newcommentform = new CommentForm();
    //Form Display
    $newcommentform->display();
}
if ($action == "created") {
    //Recration of the form
    $newcommentform = new CommentForm();
    //Form result
    if ($newcommentform->is_cancelled()) {
        $action = "list";
    } elseif ($fromform = $newcommentform->get_data()) {
        $record = new stdClass();
        //Giving var record the necesary parameters
        $record->text = $fromform->comment["text"];
        $record->emarkingid = $emarking->id;
        $record->markerid = $USER->id;
        //Creating record in moodle DB
        $DB->insert_record('emarking_predefined_comment', $record);
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:comment.php


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