73 lines
1.6 KiB
PHP
73 lines
1.6 KiB
PHP
<?php
|
|
/* @var $this ProgramsController */
|
|
/* @var $page integer */
|
|
/* @var $pagecount integer */
|
|
/* @var $rowcount integer */
|
|
/* @var $data Program[][] */
|
|
?>
|
|
|
|
<?php
|
|
$this->breadcrumbs = array(
|
|
'Programs',
|
|
);
|
|
|
|
$this->menu = array(
|
|
array('label' => 'Create Program', 'url' => array('create')),
|
|
array('label' => 'Manage Program', 'url' => array('admin')),
|
|
);
|
|
?>
|
|
|
|
<div class="container">
|
|
|
|
<h1>My Programs</h1>
|
|
<br><br>
|
|
|
|
<div class="row-fluid">
|
|
<?php
|
|
|
|
foreach($data as $datarow) {
|
|
echo '<ul class="thumbnails">';
|
|
|
|
foreach($datarow as $dataelem) {
|
|
$this->widget('ThumbnailProgPreview',
|
|
[
|
|
'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' => new DateTime($dataelem->add_date),
|
|
'enabled' => $dataelem->enabled,
|
|
'programminglang' => $dataelem->programming_lang,
|
|
]);
|
|
}
|
|
echo '</ul>';
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
if ($pagecount > 1) {
|
|
$pagination_arr = array();
|
|
|
|
$pagination_arr[] = ['label' => '«', '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' => '»', 'url' => '?page=' . ($page+1), 'disabled' => ($page >= $pagecount)];
|
|
|
|
echo TbHtml::pagination($pagination_arr,
|
|
[
|
|
'align' => 'right',
|
|
]);
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
|