summaryrefslogtreecommitdiff
path: root/protected/views/standort/view.php
blob: 0674ce96d27690063a08acd8752b34f6d1943d36 (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
<?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>
<h6>Folgende Vereine finden sich <?php echo $model->name?></h6>
<?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',
		'sortableAttributes'=>array(
				'name'
		)
  ));?>