summaryrefslogtreecommitdiff
path: root/protected/views/veranstaltung/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/views/veranstaltung/index.php')
-rw-r--r--protected/views/veranstaltung/index.php76
1 files changed, 43 insertions, 33 deletions
diff --git a/protected/views/veranstaltung/index.php b/protected/views/veranstaltung/index.php
index 4415f85..5c6d9c6 100644
--- a/protected/views/veranstaltung/index.php
+++ b/protected/views/veranstaltung/index.php
@@ -6,41 +6,51 @@ $this->pageTitle = 'Veranstaltungen - ' . Yii::app()->name;
$this->menu=array(
array('label'=>'Jetzt auf dem Fest', 'url'=>array('now')),
+ array('label'=>'Freitag', 'url'=>array('index','tag'=>'Freitag')),
+ array('label'=>'Samstag', 'url'=>array('index','tag'=>'Samstag')),
+ array('label'=>'Sonntag', 'url'=>array('index','tag'=>'Sonntag')),
+ //array('label'=>'Bühnenprogramm', 'url'=>array('stage')),
//array('label'=>'Veranstaltung suchen', 'url'=>array('search')),
-);?>
-<h3>Veranstaltungen</h3>
+);/*
+$buehnen = new CActiveDataProvider('Standort', array(
+ 'criteria'=>array(
+ 'condition'=>"type='Bühne'",
-
-<?php $this->widget('zii.widgets.CListView', array(
- 'dataProvider'=>$model->published()->thisYear()->sorted()->search(),
- 'itemView'=>'_short_all', // refers to the partial view named '_post'
- 'sortableAttributes'=>array(
- 'startzeit', 'titel'
- /*'create_time'=>'Post Time',*/
),
));
- /**
- $this->widget('zii.widgets.grid.CGridView', array(
- 'id'=>'veranstaltung-grid',
- 'dataProvider'=>$model->search(),
- 'filter'=>$model,
- 'columns'=>array(
- array('header'=>'Verein',
- 'name'=>'verein_id',
- 'filter'=>CHtml::listData(Verein::model()->findAll(), 'id', 'name'),
- 'value'=>'$data->verein->name'),
- 'titel',
- array('header'=>'Startzeit', 'value'=>'Format::displayDateTime($data->startzeit)'),
- array('header'=>'Endzeit', 'value'=>'Format::displayDateTime($data->endzeit)'),
- array('header'=>'Standort',
- 'name'=>'standort_id',
- 'filter'=>CHtml::listData(Standort::model()->findAll(array('condition'=>'type="Bühne"')), 'id', 'name'),
- 'value'=>'($data->standort) ? $data->standort->name : "Kein Standort"'),
- array('header'=>'Öffentlich',
- 'value'=>'CHtml::image($data->published ? "images/ok.png" : "images/nok.png", $data->published ? "ok.png" : "nok.png")', 'type'=>'raw'),
- array(
- 'class'=>'CButtonColumn',
- ),
- )
-)); */?>
+$mymenu = array();
+foreach ($buehnen->getData() as $buehne) {
+ $mymenu = array_merge( $mymenu , array(array('label' => 'Bühnenprogramm '.$buehne->name, 'url'=>array('stage','id'=>$buehne->id))));
+}
+$this->menu = array_merge($this->menu, $mymenu);
+*/
+?>
+<h2>Veranstaltungen
+<?php
+$veranstaltung = new Veranstaltung();
+$veranstaltung->with('verein')->with('standort');
+switch ($tag) {
+ case 'Freitag':
+ $veranstaltung->freitag();
+ echo " am ".$tag;
+ break;
+ case 'Samstag':
+ $veranstaltung->samstag();
+ echo " am ".$tag;
+ break;
+ case 'Sonntag':
+ $veranstaltung->sonntag();
+ echo " am ".$tag;
+ break;
+}
+?>
+</h2>
+
+<?php
+$veranstaltung->published()->thisYear()->sorted();
+$this->renderPartial('_list_veranstaltungen',array(
+ 'veranstaltungen'=>$veranstaltung
+ ));
+
+?> \ No newline at end of file