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

48 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/* @var $this ProgramController */
/* @var $dataProvider CActiveDataProvider */
?>
<?php
2014-05-23 11:22:34 +02:00
$this->breadcrumbs = array(
'Programs',
);
2014-05-23 11:22:34 +02:00
$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 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>