summaryrefslogtreecommitdiff
path: root/protected
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:32:25 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-06-25 23:32:25 +0200
commit66e981bd3d3f9946afed0efbcaf8efa7907c530f (patch)
treed7dcb28617055cf8690c68f79058032d00a0e6fb /protected
parentb938b240a36bb7098a952d1b0bf0307a24c9dc36 (diff)
Anzeige korrektur
Diffstat (limited to 'protected')
-rw-r--r--protected/models/Veranstaltung.php1
-rw-r--r--protected/models/Verein.php19
-rw-r--r--protected/views/verein/index.php8
-rw-r--r--protected/views/verein/view.php8
4 files changed, 22 insertions, 14 deletions
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php
index a0f1f9d..0117033 100644
--- a/protected/models/Veranstaltung.php
+++ b/protected/models/Veranstaltung.php
@@ -126,7 +126,6 @@ class Veranstaltung extends CActiveRecord
//$criteria->compare("endzeit"," <= ".$now,'AND');
$criteria->condition = '(startzeit between SUBDATE(NOW(),INTERVAL 1 HOUR) and ADDDATE(NOW(),INTERVAL 1 HOUR) OR startzeit < NOW() and endzeit > NOW() ) and endzeit > NOW() and published = 1';
$criteria->order = "startzeit ASC";
- Yii::trace(print_r($criteria,true));
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
diff --git a/protected/models/Verein.php b/protected/models/Verein.php
index 6d84c91..78117e0 100644
--- a/protected/models/Verein.php
+++ b/protected/models/Verein.php
@@ -105,20 +105,29 @@ class Verein extends CActiveRecord
$criteria->compare('id',$this->id);
$criteria->compare('name',$this->name,true);
- $criteria->compare('url',$this->url,true);
- $criteria->compare('bild',$this->bild,true);
$criteria->compare('email',$this->email,true);
$criteria->compare('slug',$this->slug,true);
- $criteria->compare('kontaktdaten',$this->kontaktdaten,true);
- $criteria->compare('beschreibung',$this->beschreibung,true);
$criteria->compare('standort_id',$this->standort_id);
- $criteria->compare('published',$this->published);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
+ public function listPublic()
+ {
+
+ $criteria=new CDbCriteria;
+
+ //$criteria->compare('startzeit','> '.$nowMin);
+ //$criteria->compare('startzeit','< '.$nowPlus);
+ //$criteria->compare("endzeit"," <= ".$now,'AND');
+ $criteria->condition = 'published = 1';
+ return new CActiveDataProvider($this, array(
+ 'criteria'=>$criteria,
+ ));
+ }
+
public function behaviors() {
return array(
// 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
diff --git a/protected/views/verein/index.php b/protected/views/verein/index.php
index 5c03339..1e447a0 100644
--- a/protected/views/verein/index.php
+++ b/protected/views/verein/index.php
@@ -11,10 +11,10 @@ $this->menu=array(
<h2>Vereine</h2>
<?php $this->widget('zii.widgets.CListView', array(
- 'dataProvider'=>$model->search(),
+ 'dataProvider'=>$model->listPublic(),
'itemView'=>'_short', // refers to the partial view named '_post'
- 'sortableAttributes'=>array(
+ /*'sortableAttributes'=>array(
'name',
- /*'create_time'=>'Post Time',*/
- ),
+ /*'create_time'=>'Post Time',
+ ),*/
));?>
diff --git a/protected/views/verein/view.php b/protected/views/verein/view.php
index 5d1df76..eb57968 100644
--- a/protected/views/verein/view.php
+++ b/protected/views/verein/view.php
@@ -4,18 +4,18 @@ $this->breadcrumbs=array(
$model->name,
);
-$this->menu=array(
+/*$this->menu=array(
array('label'=>'Vereine verwalten', 'url'=>array('index')),
-);
+);*/
?>
<h3><?php echo $model->name; ?></h3>
<p>Der Verein <?php echo $model->name ?> befindet sich <?php echo CHtml::Link($model->standort->name,array('standort/view','id'=>$model->standort->id))?>.</p>
-<?php if ($model->bild) {
+<?php if ($model->bild && ""!=$model->bild) {
echo CHtml::image($model->bild,'Vereinslogo '.$model->name, array("class" => "float-left bordered"));
}?>
-<div class="box info float-right"><?php echo $model->kontaktdaten ?></div>
+<div class="box info float-right"><?php echo $model->kontaktdaten ?><?php if($model->url && ""!=$model->url) {?><a href="<?php echo $model->url ?>" target="_blank"><?php echo $model->url?></a><?php }?></div>
<p><?php echo $model->beschreibung?></p>
<?php /*$this->widget('zii.widgets.CListView', array(