예제 #1
0
파일: index.php 프로젝트: ratbird/hope
 /**
  * redirect to correct page (overview or newest entries),
  * depending on whether there are any entries.
  */
 function enter_seminar_action()
 {
     if (ForumPerm::has('fav_entry', $this->getId()) && ForumVisit::getCount($this->getId(), ForumVisit::getVisit($this->getId())) > 0) {
         $this->redirect(PluginEngine::getLink('coreforum/index/newest'));
     } else {
         $this->redirect(PluginEngine::getLink('coreforum/index/index'));
     }
 }
예제 #2
0
 function getIconNavigation($course_id, $last_visit, $user_id = null)
 {
     if (!$this->isActivated($course_id)) {
         return;
     }
     $this->setupAutoload();
     if ($GLOBALS['perm']->have_studip_perm('user', $course_id)) {
         $num_entries = ForumVisit::getCount($course_id, ForumVisit::getVisit($course_id));
         $text = ForumHelpers::getVisitText($num_entries, $course_id);
     } else {
         $num_entries = 0;
         $text = 'Forum';
     }
     $navigation = new Navigation('forum', PluginEngine::getURL($this, array(), 'index/enter_seminar'));
     $navigation->setBadgeNumber($num_entries);
     if ($num_entries > 0) {
         $navigation->setImage(Icon::create('forum+new', 'attention', ["title" => $text]));
     } else {
         $navigation->setImage(Icon::create('forum', 'inactive', ["title" => $text]));
     }
     return $navigation;
 }
예제 #3
0
파일: add.php 프로젝트: ratbird/hope
        <img src="<?php 
echo $picturepath;
?>
/anfasser_48.png" class="handle js" id="tutorMoveArea">
        <? endif ?>

        <a href="<?php 
echo PluginEngine::getLink('coreforum/index/index/' . $jump_to_topic_id . '#' . $jump_to_topic_id);
?>
">
        <? if ($entry['chdate'] >= $visitdate && $entry['user_id'] != $GLOBALS['user']->id): ?>
            <?php 
echo Icon::create('forum+new', 'attention', ['title' => _('Dieser Eintrag ist neu!')])->asImg(16, ["id" => 'tutorNotificationIcon', "style" => 'margin-bottom: 15px;']);
?>
        <? else : ?>
            <? $num_postings = ForumVisit::getCount($entry['topic_id'], $visitdate) ?>
            <? $text = ForumHelpers::getVisitText($num_postings, $entry['topic_id'], $constraint['depth']) ?>
            <? if ($num_postings > 0) : ?>
                <?php 
echo Icon::create('forum', 'attention', ['title' => $text])->asImg(16, ["id" => 'tutorNotificationIcon', "style" => 'margin-bottom: 15px;']);
?>
            <? else : ?>
                <?php 
echo Icon::create('forum', 'info', ['title' => $text])->asImg(16, ["id" => 'tutorNotificationIcon', "style" => 'margin-bottom: 15px;']);
?>
            <? endif ?>
        <? endif ?>
        </a>
    </td>
    <td class="areaentry">
        <div style="position: relative;<?php