summaryrefslogtreecommitdiff
path: root/protected/views/standort/view.php
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-05-11 10:18:31 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-05-11 10:18:31 +0200
commita6cd00ec233d1c7676d75224900ed1543130ac94 (patch)
tree94f25ab6433d3a729e004dbc2610e3f7b7c69cc2 /protected/views/standort/view.php
parent5b39d6bf7f34ed52059410f3d0af3799aeff2113 (diff)
diverse anzeigen und experimente
Diffstat (limited to 'protected/views/standort/view.php')
-rw-r--r--protected/views/standort/view.php67
1 files changed, 67 insertions, 0 deletions
diff --git a/protected/views/standort/view.php b/protected/views/standort/view.php
new file mode 100644
index 0000000..26312a3
--- /dev/null
+++ b/protected/views/standort/view.php
@@ -0,0 +1,67 @@
+<?php
+$this->breadcrumbs=array(
+ 'Speis & Trank'=>array('index'),
+ $model->name,
+);
+
+$this->menu=array(
+ array('label'=>'Standorte', 'url'=>array('index')),
+ array('label'=>'Standort erstellen', 'url'=>array('create')),
+ array('label'=>$model->name.' bearbeiten', 'url'=>array('update', 'id'=>$model->id)),
+ array('label'=>$model->name.' löschen', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
+);
+?>
+
+<h3>Standort "<?php echo $model->name ?>"</h3>
+<p>
+<?php Yii::import('ext.egmap.*');
+
+$gMap = new EGMap();
+$gMap->zoom = 20;
+$mapTypeControlOptions = array(
+ 'position'=> EGMapControlPosition::LEFT_BOTTOM,
+ 'style'=>EGMap::MAPTYPECONTROL_STYLE_DROPDOWN_MENU
+);
+
+$gMap->width = '100%';
+$gMap->setOptions(array("mapTypeId"=>EGMap::TYPE_HYBRID));
+$gMap->mapTypeControlOptions= $mapTypeControlOptions;
+
+$gMap->setCenter($model->pos_lat, $model->pos_long);
+$info_window_a = new EGMapInfoWindow('<div>'.$model->name.'</div>');
+$icon = new EGMapMarkerImage("http://google-maps-icons.googlecode.com/files/gazstation.png");
+
+$icon->setSize(32, 37);
+$icon->setAnchor(16, 16.5);
+$icon->setOrigin(0, 0);
+$marker = new EGMapMarkerWithLabel($model->pos_lat, $model->pos_long, array('title' => $model->name,'icon'=> $icon));
+$marker->draggable=false;
+$marker->raiseOnDrag= true;
+$marker->addHtmlInfoWindow($info_window_a);
+
+$gMap->addMarker($marker);
+
+// enabling marker clusterer just for fun
+// to view it zoom-out the map
+$gMap->enableMarkerClusterer(new EGMapMarkerClusterer());
+
+$gMap->renderMap();
+?>
+</p>
+<p>
+<?php
+$dataProvider=new CActiveDataProvider('Verein', array(
+ 'criteria'=>array(
+ 'condition'=>'standort_id='.$model->id,
+ ),
+ 'pagination'=>array(
+ 'pageSize'=>20,
+ ),
+));
+$this->widget('zii.widgets.CListView', array(
+ 'dataProvider'=>$dataProvider,
+ 'itemView'=>'/verein/_short',
+
+ ));?>
+
+</p> \ No newline at end of file