2014-05-19 10:16:43 +02:00
|
|
|
<?php
|
2014-06-06 09:47:15 +02:00
|
|
|
/* @var $this ProgramsController */
|
2014-06-30 22:51:59 +02:00
|
|
|
/* @var $page integer */
|
2014-06-06 09:47:15 +02:00
|
|
|
/* @var $pagecount integer */
|
|
|
|
/* @var $rowcount integer */
|
|
|
|
/* @var $data Program[][] */
|
2014-06-30 22:51:59 +02:00
|
|
|
/* @var $category string */
|
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-30 22:51:59 +02:00
|
|
|
'Programs',
|
|
|
|
);
|
2014-07-11 19:29:19 +02:00
|
|
|
|
|
|
|
$this->selectedNav = 'prog';
|
|
|
|
|
2014-05-19 10:16:43 +02:00
|
|
|
?>
|
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
<div class="container">
|
2014-05-28 21:29:49 +02:00
|
|
|
|
2014-06-30 22:51:59 +02:00
|
|
|
<?php
|
|
|
|
if (empty($category))
|
2014-09-28 02:37:53 +02:00
|
|
|
{
|
2014-06-30 22:51:59 +02:00
|
|
|
echo MsHtml::pageHeader("Programs", "Games and Tools, developed by me");
|
2014-09-28 02:37:53 +02:00
|
|
|
}
|
2014-06-30 22:51:59 +02:00
|
|
|
else
|
2014-09-28 02:37:53 +02:00
|
|
|
{
|
2014-06-30 22:51:59 +02:00
|
|
|
echo MsHtml::pageHeader("Programs", '"' . $category . '"');
|
2014-09-28 02:37:53 +02:00
|
|
|
|
|
|
|
$this->breadcrumbs = array(
|
|
|
|
'Programs' => '/programs',
|
|
|
|
$category
|
|
|
|
);
|
|
|
|
}
|
2014-06-30 22:51:59 +02:00
|
|
|
?>
|
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
|
|
|
|
2014-06-30 22:51:59 +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
|
|
|
|
2014-06-30 22:51:59 +02:00
|
|
|
foreach ($datarow as $dataelem) {
|
2014-06-06 12:02:56 +02:00
|
|
|
/* @var $dataelem Program */
|
2014-06-04 18:06:38 +02:00
|
|
|
$this->widget('ThumbnailProgPreview',
|
2014-05-28 17:19:57 +02:00
|
|
|
[
|
2014-06-06 09:47:15 +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,
|
2014-06-06 12:02:56 +02:00
|
|
|
'date' => $dataelem->getDateTime(),
|
2014-06-06 09:47:15 +02:00
|
|
|
'enabled' => $dataelem->enabled,
|
|
|
|
'programminglang' => $dataelem->programming_lang,
|
2014-05-28 17:19:57 +02:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
echo '</ul>';
|
|
|
|
}
|
|
|
|
|
2014-06-06 09:47:15 +02:00
|
|
|
?>
|
2014-05-23 11:22:34 +02:00
|
|
|
</div>
|
2014-06-02 19:31:14 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if ($pagecount > 1) {
|
|
|
|
$pagination_arr = array();
|
|
|
|
|
2014-06-30 22:51:59 +02:00
|
|
|
$pagination_arr[] = ['label' => '«', 'url' => '?page=' . ($page - 1), 'disabled' => ($page <= 1)];
|
|
|
|
for ($i = 1; $i <= $pagecount; $i++) {
|
2014-06-02 19:31:14 +02:00
|
|
|
$pagination_arr[] = ['label' => $i, 'url' => '?page=' . $i, 'active' => ($i == $page)];
|
|
|
|
}
|
2014-06-30 22:51:59 +02:00
|
|
|
$pagination_arr[] = ['label' => '»', 'url' => '?page=' . ($page + 1), 'disabled' => ($page >= $pagecount)];
|
2014-06-02 19:31:14 +02:00
|
|
|
|
2014-06-06 12:02:56 +02:00
|
|
|
echo MsHtml::pagination($pagination_arr,
|
2014-06-02 19:31:14 +02:00
|
|
|
[
|
|
|
|
'align' => 'right',
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
</div>
|
2014-05-19 10:16:43 +02:00
|
|
|
|