Uva Searchengines / protected / views / article / view.php

<?php
$this->breadcrumbs = array(
    'Articles' => array('index'),
    $model->title,
);

?>
<div class="span-19">
    <div id="content">

        <h1><?php echo $model->title; ?></h1>
        <h2>#<?php echo $model->id; ?></h2>

        <?php
        echo $this->printWordCloud($model);
        ?>
        <?php $this->widget('zii.widgets.CDetailView', array(
        'data' => $model,
        'attributes' => array(
            'word_count',
            'filename',
            'date',
            array(
	            'label'=>'Datum',
	            'value' => Yii::app()->dateFormatter->formatDateTime($model->date, 'medium', ''),
            ),
            'id',
            'title',
            'body',
        ),
    ));
        ?>

    </div>
    <!-- content -->
</div>
<div class="span-5 last">
    <div id="sidebar">
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => 'Taken',
        ));
        $this->widget('zii.widgets.CMenu', array(
            'items' => array(
                array('label' => 'Artikel overzicht', 'url' => array('index')),
            ),
            'htmlOptions' => array('class' => 'operations'),
        ));
        $this->endWidget();
        ?>
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => 'Gerelateerde artikelen',
        ));
        $articles = $model->articles;
        if ($articles) {
            $items = array();
            foreach ($articles as $article) {
                $items[] = array('label' => $article->title, 'url' => array('view', 'id' => $article->id));
            }
            $this->widget('zii.widgets.CMenu', array(
                'items' => $items,
                'htmlOptions' => array('class' => 'operations'),
            ));
        } else {
            echo 'Er zijn geen gerelateerde artikelen beschikbaar';
        }
        $this->endWidget();
        ?>
        <?php
        $this->beginWidget('zii.widgets.CPortlet', array(
            'title' => 'Top woorden',
        ));
        $articleWords = $model->articlesWords;
        if ($articleWords) {
            $items = array();
            foreach ($articleWords as $articleWord) {
                if ($articleWord->word_id != 0) {
                    $items[] = array(
                        'label' => $articleWord->word->text,
                        'url' => array('word/view', 'id' => $articleWord->word->id),
                        'itemOptions' => array('title' => 'Tf*idf-score: ' . $articleWord->score),
                    );
                }
            }
            $this->widget('zii.widgets.CMenu', array(
                'items' => $items,
                'htmlOptions' => array('class' => 'operations'),
            ));
        } else {
            echo 'Er zijn top woorden beschikbaar';
        }
        $this->endWidget();
        ?>
    </div>
    <!-- sidebar -->
</div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.