1
0
www.mikescher.com/www/protected/views/programs/index.php

76 lines
1.8 KiB
PHP
Raw Normal View History

<?php
/* @var $this ProgramsController */
/* @var $page integer */
/* @var $pagecount integer */
/* @var $rowcount integer */
/* @var $data Program[][] */
2014-06-02 19:31:14 +02:00
?>
<?php
2014-06-10 13:27:17 +02:00
$this->pageTitle = 'Programs - ' . Yii::app()->name;
$this->breadcrumbs = array(
2014-06-02 19:31:14 +02:00
'Programs',
);
$this->menu = array(
array('label' => 'Create Program', 'url' => array('create')),
array('label' => 'Manage Program', 'url' => array('admin')),
);
?>
2014-05-23 11:22:34 +02:00
<div class="container">
2014-05-28 21:29:49 +02:00
<?php echo MsHtml::pageHeader("Programs", "Games and Tools, developed by me"); ?>
2014-05-28 21:29:49 +02:00
2014-05-28 17:19:57 +02:00
<div class="row-fluid">
2014-05-23 11:22:34 +02:00
<?php
2014-06-02 19:31:14 +02:00
foreach($data as $datarow) {
2014-05-28 17:19:57 +02:00
echo '<ul class="thumbnails">';
2014-05-23 11:22:34 +02:00
foreach($datarow as $dataelem) {
/* @var $dataelem Program */
2014-06-04 18:06:38 +02:00
$this->widget('ThumbnailProgPreview',
2014-05-28 17:19:57 +02:00
[
'caption' => $dataelem->Thumbnailname,
'link' => $dataelem->getLink(),
'description' => $dataelem->Description,
'category' => $dataelem->Kategorie,
'language' => $dataelem->getLanguageList(),
'image' => $dataelem->getImagePath(),
'starcount' => $dataelem->Sterne,
'downloads' => $dataelem->Downloads,
'date' => $dataelem->getDateTime(),
'enabled' => $dataelem->enabled,
'programminglang' => $dataelem->programming_lang,
2014-05-28 17:19:57 +02:00
]);
}
echo '</ul>';
}
?>
2014-05-23 11:22:34 +02:00
</div>
2014-06-02 19:31:14 +02:00
<?php
if ($pagecount > 1) {
$pagination_arr = array();
$pagination_arr[] = ['label' => '&laquo;', 'url' => '?page=' . ($page-1), 'disabled' => ($page <= 1)];
for($i = 1; $i <= $pagecount; $i++) {
$pagination_arr[] = ['label' => $i, 'url' => '?page=' . $i, 'active' => ($i == $page)];
}
$pagination_arr[] = ['label' => '&raquo;', 'url' => '?page=' . ($page+1), 'disabled' => ($page >= $pagecount)];
echo MsHtml::pagination($pagination_arr,
2014-06-02 19:31:14 +02:00
[
'align' => 'right',
]);
}
?>
2014-05-23 11:22:34 +02:00
</div>