summaryrefslogtreecommitdiff
path: root/protected/views/verein/view.php
blob: f7c066d0513601a162786ef748667ddb0e6959cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
$this->breadcrumbs=array(
	'Vereine'=>array('index'),
	$model->name,
);
$this->pageTitle = $model->name . ' - ' . Yii::app()->name;

/*$this->menu=array(
	array('label'=>'Vereine verwalten', 'url'=>array('index')),

);*/
if ($model->hintergrund && ""!=$model->hintergrund) {
	$this->astafAdditionalStyle="background-repeat:no-repeat;background-image: url('".$model->hintergrund."');";
}
?>

<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 && ""!=$model->bild) {
	echo CHtml::image($model->bild,'Vereinslogo '.$model->name, array("class" => "float-left bordered"));
}?>
<?php if ($model->kontaktdaten && ""!=$model->kontaktdaten) { if(strlen($model->kontaktdaten)> 5) {?>
<div class="box info float-right" style="max-width:18em;"><?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>
<?php }}?>
<p ><?php echo $model->beschreibung?></p>

<?php /*$this->widget('zii.widgets.CListView', array(
      'dataProvider'=>new CArrayDataProvider($model->angebote, array()),
      'itemView'=>'_shortangebot',   // refers to the partial view named '_post'
  ));*/?>
<div class="ym-clearfix" ></div>
<div >
<h4 >Kulinarische Angebote</h4>
<?php 
$dataProvider=new CActiveDataProvider('AngebotVerein', array(
		'criteria'=>array(
				'condition'=>'verein_id='.$model->id,
				'with'=>array('angebot'),
		),
		'pagination'=>array(
				'pageSize'=>20,
		),
));
$this->widget('zii.widgets.CListView', array(
      'dataProvider'=>$dataProvider,
      'itemView'=>'_shortangebotverein',
	  //'sortableAttributes'=>array(
      //  'preis','menge', 
    //),   
  ));?>
<h4>Veranstaltungen</h4>
<?php 
$veranstaltung = new Veranstaltung();
$veranstaltung->with('standort');

$veranstaltung->published()->thisYear()->sorted();

$this->widget('zii.widgets.grid.CGridView', array(
		
		'dataProvider'=>$veranstaltung->parentVerein($model->id)->search(),
		'columns'=>array(
				array(
            			'name'=>'startzeit',
						'type'=>'html',
						'sortable' => true,
						'header' => "Wann?",
            			'value'=>'Yii::app()->dateFormatter->format(\'EEEE\',$data->startzeit)."<br />".Yii::app()->dateFormatter->format(\'HH:mm\',$data->startzeit)." Uhr"',
						'htmlOptions' => array('style'=>"width:15%;"),
				),
				array(
						'name'=> 'titel',
						'header' =>'Was?',
						'type' => 'Raw',
						'value' => 'CHTML::link($data->titel,array("veranstaltung/view","id"=>$data->id))',
						),
				array(
						'name' => "standort_id",
						'type' => 'Raw',
						'header' => "Wo?",
						'sortable' => true,
						'value' => 'CHTML::link($data->standort->name,array("standort/view","id"=>$data->standort->id))',
				),
				
			),
		'blankDisplay' => "Heute keine Termine bekannt",
		'showTableOnEmpty' => false,
		'enableSorting' => true,
		'enablePagination' => true,
		'hideHeader' => false,
		'template' => '{pager} {items} {pager}',
		'htmlOptions' => array('class'=>''),
		

  ));


?>
  
  
</div>