Exemple #1
0
            <? if ($GLOBALS['perm']->have_studip_perm("tutor", $posting['Seminar_id']) or ($posting['user_id'] === $GLOBALS['user']->id)) : ?>
            <a href="#" class="edit" onClick="return false;" title="<?php 
echo _("Bearbeiten");
?>
" style="vertical-align: middle; opacity: 0.6; width: 14px; height:14px; display: inline-block; background: url('<?php 
echo Assets::image_path("icons/16/grey/tools.png");
?>
') center center; background-position: center center;"></a>
            <? endif ?>
        </div>
        <div class="name">
            <? if (!$author->isNew()) : ?>
            <a href="<?php 
echo URLHelper::getLink($author->getURL(), array(), true);
?>
">
            <? endif ?>
                <?php 
echo htmlReady($author_name);
?>
            <? if (!$author->isNew()) : ?>
            </a>
            <? endif ?>
        </div>
        <div class="content">
            <?php 
echo ForumPosting::format($posting['description']);
?>
        </div>
    </div>
</li>
Exemple #2
0
 public function refresh_posting_action()
 {
     $posting = new ForumPosting(Request::get("topic_id"));
     $thread = new ForumPosting($posting['root_id']);
     if ($thread['context_type'] === "course" && !$GLOBALS['perm']->have_studip_perm("autor", $posting['Seminar_id']) or $thread['context_type'] === "private" && !$thread->isRelated()) {
         throw new AccessDeniedException("Kein Zugriff");
     }
     ForumPosting::$course_hashes = $thread['context_type'] === "course" ? $thread['Seminar_id'] : false;
     $this->render_text(studip_utf8encode(ForumPosting::format($posting['description'])));
 }
Exemple #3
0
                <?php 
echo htmlReady($author_name);
?>
            <? if (!$author->isNew()) : ?>
            </a>
            <? endif ?>
        </div>
        <div class="content">
            <? 
            $content = $thread['description'];
            if ($thread['name'] && strpos($thread['description'], $thread['name']) === false) {
                $content = $thread['name']."\n".$content;
            }
            ?>
            <?php 
echo ForumPosting::format($content);
?>
        </div>
    </div>

    <ul class="comments">
    <? $postings = $thread->getChildren() ?>
    <? if ($postings) : ?>
        <? if (count($postings) > 3) : ?>
        <li class="more">
            <?php 
echo sprintf(ngettext('%u weiterer Kommentar', '%u weitere Kommentare', count($postings) - 3), count($postings) - 3);
?>
            ...
        </li>
        <? endif; ?>