2014-05-19 10:16:43 +02:00
|
|
|
<?php
|
2014-05-28 11:02:52 +02:00
|
|
|
/* @var $this ProgramController */
|
2014-05-19 10:16:43 +02:00
|
|
|
/* @var $dataProvider CActiveDataProvider */
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
2014-05-23 11:22:34 +02:00
|
|
|
$this->breadcrumbs = array(
|
2014-05-28 11:02:52 +02:00
|
|
|
'Programs',
|
2014-05-19 10:16:43 +02:00
|
|
|
);
|
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
$this->menu = array(
|
2014-05-28 11:02:52 +02:00
|
|
|
array('label' => 'Create Program', 'url' => array('create')),
|
|
|
|
array('label' => 'Manage Program', 'url' => array('admin')),
|
2014-05-19 10:16:43 +02:00
|
|
|
);
|
|
|
|
?>
|
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
<div class="container">
|
2014-05-28 17:19:57 +02:00
|
|
|
<div class="row-fluid">
|
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
<?php
|
2014-05-28 17:19:57 +02:00
|
|
|
$all = Program::model()->findAll();
|
|
|
|
$rows = ceil((count($all) / 4));
|
2014-05-23 11:22:34 +02:00
|
|
|
|
2014-05-28 17:19:57 +02:00
|
|
|
for ($i = 0; $i < $rows; $i++) {
|
|
|
|
echo '<ul class="thumbnails">';
|
2014-05-23 11:22:34 +02:00
|
|
|
|
2014-05-28 17:19:57 +02:00
|
|
|
foreach (array_slice(Program::model()->findAll(), $i * 4, 4) as $record) {
|
|
|
|
$this->widget('ThumbnailPreview',
|
|
|
|
[
|
|
|
|
'caption' => $record->attributes['Thumbnailname'],
|
|
|
|
'description' => $record->attributes['Description'],
|
|
|
|
'category' => $record->attributes['Kategorie'],
|
|
|
|
'language' => explode("|", $record->attributes['Language']),
|
|
|
|
'image' => '/images/programs/thumbnails/' . $record->attributes['Name'] . '.jpg',
|
|
|
|
'starcount' => $record->attributes['Sterne'],
|
|
|
|
'downloads' => $record->attributes['Downloads'],
|
|
|
|
'date' => new DateTime($record->attributes['add_date']),
|
|
|
|
]);
|
|
|
|
}
|
2014-05-23 11:22:34 +02:00
|
|
|
|
2014-05-28 17:19:57 +02:00
|
|
|
echo '</ul>';
|
|
|
|
}
|
2014-05-23 11:22:34 +02:00
|
|
|
?>
|
2014-05-28 17:19:57 +02:00
|
|
|
|
2014-05-23 11:22:34 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-05-19 10:16:43 +02:00
|
|
|
|