summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protected/views/standort/index.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/protected/views/standort/index.php b/protected/views/standort/index.php
index f5eda10..3ab1232 100644
--- a/protected/views/standort/index.php
+++ b/protected/views/standort/index.php
@@ -15,17 +15,21 @@ $this->menu=array(
<?php
$map = new Map();
foreach ($standorte as $standort) {
+ $has_childs=false;
$infostring = "<div class='gmaps-label' style='color: #000;'><strong>".$standort->name."</strong><br/>";
foreach ($standort->vereine as $verein) {
+ if ( $verein->published > 0) { $has_childs=true; }
$infostring .=CHtml::link($verein->name,array("verein/view","id"=>$verein->id))."<br />";
}
$infostring .="</div>";
$infoWindow = new EGMapInfoWindow($infostring);
// Saving coordinates after user dragged our marker.
+ if ($has_childs) {
$marker = new EGMapMarker($standort->pos_lat, $standort->pos_long, array('title' => $model->name, 'draggable'=>false), 'marker');
$marker->addHtmlInfoWindow($infoWindow);
$map->addMarker($marker, $standort->published);
}
+}
$map->render();
?>