summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protected/models/Verein.php0
-rw-r--r--protected/views/verein/view.php7
2 files changed, 6 insertions, 1 deletions
diff --git a/protected/models/Verein.php b/protected/models/Verein.php
index 242bd95..c5b6b4b 100644
--- a/protected/models/Verein.php
+++ b/protected/models/Verein.php
diff --git a/protected/views/verein/view.php b/protected/views/verein/view.php
index fe3ebd7..aa41066 100644
--- a/protected/views/verein/view.php
+++ b/protected/views/verein/view.php
@@ -47,9 +47,14 @@ $this->widget('zii.widgets.CListView', array(
));?>
<h4>Veranstaltungen</h4>
<?php
+$start = CDateTimeParser::parse(Yii::app()->params["start_date"]." ".Yii::app()->params["start_time"], "dd.MM.yyyy HH:mm");
+$astafStart = Yii::app()->dateFormatter->format("yyyy-MM-dd HH:mm", $start);
+$ende = CDateTimeParser::parse(Yii::app()->params["end_date"]." ".Yii::app()->params["end_time"], "dd.MM.yyyy HH:mm");
+$astafEnde = Yii::app()->dateFormatter->format("yyyy-MM-dd HH:mm", $ende);
$dataProvider=new CActiveDataProvider('Veranstaltung', array(
'criteria'=>array(
- 'condition'=>'verein_id='.$model->id." and published=1",
+ 'condition'=>'verein_id='.$model->id." and published=1 and startzeit between '$astafStart' and '$astafEnde' ",
+ 'order' => 'startzeit asc',
),
'pagination'=>array(
'pageSize'=>20,