Exemplo n.º 1
0
<? $is_new = ($evaluation->chdate >= object_get_visit($evaluation->id, 'eval', false, false)) && ($evaluation->author_id != $GLOBALS['user']->id);
?>
<article class="<?php 
echo ContentBoxHelper::classes($evaluation->id, $is_new);
?>
" id="<?php 
echo $evaluation->id;
?>
" data-visiturl="<?php 
echo URLHelper::getScriptLink('dispatch.php/vote/visit');
?>
">
    <header>
        <h1>
            <a href="<?php 
echo ContentBoxHelper::switchhref($evaluation->id, array('contentbox_type' => 'eval'));
?>
">
                <?php 
echo htmlReady($evaluation->title);
?>
            </a>
        </h1>
        <nav>
            <a href="<?php 
echo $evaluation->author ? URLHelper::getLink('dispatch.php/profile', array('username' => $evaluation->author->username)) : '';
?>
">
                <?php 
echo $evaluation->author ? htmlReady($evaluation->author->getFullName()) : '';
?>
Exemplo n.º 2
0
        <?php 
echo Studip\Button::create(_('Abstimmen'), 'vote', array('value' => $vote->id));
?>
    <? endif ?>
    <?php 
echo Studip\LinkButton::create(_('Ergebnisse'), ContentBoxHelper::href($vote->id, array('preview[]' => $vote->id)));
?>
<? else: ?>
    <?php 
echo Studip\LinkButton::create(_('Ergebnisse ausblenden'), ContentBoxHelper::href($vote->id, array('preview' => 0)));
?>
    <?php 
echo Request::get('sort') ? Studip\LinkButton::create(_('Nicht sortieren'), ContentBoxHelper::href($vote->id, array('preview[]' => $vote->id, 'sort' => 0))) : Studip\LinkButton::create(_('Sortieren'), ContentBoxHelper::href($vote->id, array('preview[]' => $vote->id, 'sort' => 1)));
?>
    <? if ($vote->changeable && $vote->state == 'active' && !$nobody): ?>
        <?php 
echo Studip\LinkButton::create(_('Antwort ändern'), ContentBoxHelper::href($vote->id, array('change' => 1)));
?>
    <? endif; ?>
    <? if (!$vote->anonymous && ($admin || $vote->namesvisibility)): ?>
        <? if (Request::get('revealNames') === $vote->id) : ?>
            <?php 
echo Studip\LinkButton::create(_('Namen ausblenden'), ContentBoxHelper::href($vote->id, array('revealNames' => null)));
?>
        <? else : ?>
            <?php 
echo Studip\LinkButton::create(_('Namen zeigen'), ContentBoxHelper::href($vote->id, array('revealNames' => $vote->id)));
?>
        <? endif; ?>
    <? endif; ?>
<? endif; ?>
Exemplo n.º 3
0
echo $semester_id;
?>
" class="<?php 
echo count($single_dates) === 1 ? 'open' : ContentBoxHelper::classes('singledate-' . $semester_id);
?>
">
            <header>
                <h1>
                    <input type="checkbox" class="date-proxy"
                           data-proxyfor="#singledate-<?php 
echo $semester_id;
?>
 .ids-irregular"
                           data-activates=".actionForAllIrregular">
                    <a href="<?php 
echo ContentBoxHelper::href('singledate-' . $semester_id);
?>
">
                        <?php 
echo htmlReady(Semester::find($semester_id)->name);
?>
                    </a>
                </h1>
                <nav>
                    <span>
                        <?php 
echo sprintf(ngettext('%u Termin', '%u Termine', count($termine)), count($termine));
?>
                    </span>
                    <span>
                        <?php 
Exemplo n.º 4
0
<article class="<?php 
echo ContentBoxHelper::classes($questionnaire->id, $is_new);
?>
 widget_questionnaire_<?php 
echo $questionnaire->getId();
?>
"  data-questionnaire_id="<?php 
echo htmlReady($questionnaire->getId());
?>
">
    <header>
        <h1>
            <a href="<?php 
echo ContentBoxHelper::switchhref($questionnaire->id, array('contentbox_type' => 'vote'));
?>
">
                <?php 
echo htmlReady($questionnaire->title);
?>
            </a>
        </h1>
        <nav>
            <a href="<?php 
echo $questionnaire->user_id ? URLHelper::getLink('dispatch.php/profile', array('username' => get_username($questionnaire->user_id))) : '';
?>
">
                <?php 
echo $questionnaire->user_id ? htmlReady(get_fullname($questionnaire->user_id)) : '';
?>
            </a>
            <span>
Exemplo n.º 5
0
echo CSRFProtection::tokenTag();
?>
                    <input type="hidden" name="comsubmit" value="<?php 
echo $new['news_id'];
?>
">
                    <div align="center">
                        <textarea class="add_toolbar wysiwyg" name="comment_content" style="width:70%" rows="8" cols="38" wrap="virtual" placeholder="<?php 
echo _('Geben Sie hier Ihren Kommentar ein!');
?>
"></textarea>
                        <br>
                        <?php 
echo Studip\Button::createAccept(_('Absenden'));
?>
                    </div>
                </form>
            <? endif ?>
        <? else: ?>
        <a href="<?php 
echo ContentBoxHelper::href($new['news_id'], array("comments" => 1));
?>
">
                <?php 
echo sprintf(_('Kommentare lesen (%s) / Kommentar schreiben'), StudipComment::NumCommentsForObject($new['news_id']));
?>
            </a>
        <? endif; ?>
    </footer>
<? endif; ?>
Exemplo n.º 6
0
<article class="<?php 
echo ContentBoxHelper::classes($termin['id']);
?>
" id="<?php 
echo $termin['id'];
?>
">
    <header>
        <h1>
            <a href="<?php 
echo ContentBoxHelper::href($termin['id']);
?>
">
                <?php 
echo Icon::create('date', 'inactive')->asImg(['class' => 'text-bottom']);
?>
                <?php 
echo htmlReady($termin['title']);
?>
            </a>
        </h1>
        <nav>
            <span>
                <?php 
echo $termin['room'] ? _('Raum') . ': ' . htmlReady($termin['room']) : '';
?>
            </span>
            <? if($admin && $isProfile && $termin['type'] === 'CalendarEvent'): ?>
            <a href="<?php 
echo URLHelper::getLink('dispatch.php/calendar/single/edit/' . $termin['range_id'] . '/' . $termin['event_id'], array('source_page' => 'dispatch.php/profile'));
?>
Exemplo n.º 7
0
    <? $is_new = ($new['chdate'] >= object_get_visit($new->id, 'news', false, false))
            && ($new['user_id'] != $GLOBALS['user']->id); ?>
    <article class="<?php 
echo ContentBoxHelper::classes($new->id, $is_new);
?>
" id="<?php 
echo $new->id;
?>
" data-visiturl="<?php 
echo URLHelper::getScriptLink('dispatch.php/news/visit');
?>
">
        <header>
            <h1>
                <a href="<?php 
echo ContentBoxHelper::href($new->id, array('contentbox_type' => 'news'));
?>
">
                    <?php 
echo Icon::create('news', 'clickable')->asImg();
?>
                    <?php 
echo htmlReady($new['topic']);
?>
                </a>
            </h1>
            <nav>
                <?php 
echo $this->render_partial('news/_actions.php', array('new' => $new, 'range' => $range));
?>
            </nav>
Exemplo n.º 8
0
<? $is_new = ($vote->chdate >= object_get_visit($vote->id, 'vote', false, false)) && ($vote->author_id != $GLOBALS['user']->id);
?>
<article class="<?php 
echo ContentBoxHelper::classes($vote->id, $is_new);
?>
" id="<?php 
echo $vote->id;
?>
" data-visiturl="<?php 
echo URLHelper::getScriptLink('dispatch.php/vote/visit');
?>
">
    <header>
        <h1>
            <a href="<?php 
echo ContentBoxHelper::switchhref($vote->id, array('contentbox_type' => 'vote'));
?>
">
                <?php 
echo htmlReady($vote->title);
?>
            </a>
        </h1>
        <nav>
            <a href="<?php 
echo $vote->author ? URLHelper::getLink('dispatch.php/profile', array('username' => $vote->author->username)) : '';
?>
">
                <?php 
echo $vote->author ? htmlReady($vote->author->getFullName()) : '';
?>
Exemplo n.º 9
0
                    <h1>
                    <? if ($info = $course->getBookedRoomsTooltip($metadate_id)) : ?>
                        <?php 
echo tooltipIcon($info);
?>
                    <? elseif ($course->getCycleColorClass($metadate_id) === 'red'): ?>
                        <?php 
echo tooltipIcon(_('Keine Raumbuchungen vorhanden'));
?>
                    <? else: ?>
                        <?php 
echo tooltipIcon(_('Keine offenen Raumbuchungen'));
?>
                    <? endif; ?>
                        <a href="<?php 
echo ContentBoxHelper::href($metadate_id);
?>
">
                            <?php 
echo htmlReady($cycle['cycle']->toString('long'));
?>
                        </a>
                    </h1>
                    <nav>
                        <span>
                            <?php 
echo _('Raum');
?>
:
                        <? if (count($cycle['room_request']) > 0): ?>
                            <?php 
Exemplo n.º 10
0
<?php

echo $GLOBALS['vote_message'][$vote->id];
?>
<? $show_result = $controller->showResult($vote) ?>
<? $maxvotes = $vote->maxvotes ?>
<section>
    <div>
        <?php 
echo formatReady($vote->question);
?>
    </div>
    <form action="<?php 
echo ContentBoxHelper::href($vote->id);
?>
" method="post">
        <section class="answers">
            <? foreach (Request::get('sort') ? $vote->answers->orderBy("count desc", SORT_NUMERIC) : $vote->answers->orderBy("position", SORT_NUMERIC) as $answer): ?>
                <div class="answer">
                    <? if ($show_result): ?>
                        <div class="bar">
                            <div class="percent">
                                <?php 
echo htmlReady($vote->count ? round($answer->count * 100 / $vote->count) : 0);
?>
%
                            </div>
                            <? $width = $maxvotes ? $answer->count / $maxvotes : 0; ?>
                            <div style="display: inline-block;
                                border:1px solid black;
                                width: <?php