<h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('core', 'Create Store'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'nombre', 'label' => Yii::t('core', 'Name')], ['attribute' => 'dia', 'label' => Yii::t('core', 'Open on'), 'format' => 'raw', 'value' => function ($data) {
    return Yii::t('core', sysconfigs::getNombreDia($data->dia));
}], ['attribute' => 'prioridad', 'label' => Yii::t('core', 'Priority'), 'format' => 'raw', 'value' => function ($data) {
    return Yii::t('core', sysconfigs::getNombrePrioridad($data->prioridad));
}], ['attribute' => 'esActivo', 'label' => Yii::t('core', 'Active?'), 'format' => 'raw', 'value' => function ($data) {
    if ($data->esActivo == 0) {
        return '<span class="label label-danger">' . Yii::t('core', sysconfigs::getNombreEsActivo($data->esActivo)) . '</span>';
    } else {
        return '<span class="label label-success">' . Yii::t('core', sysconfigs::getNombreEsActivo($data->esActivo)) . '</span>';
    }
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
        console.log(marker);
    }
    google.maps.event.addDomListener(window, 'load', initMap);

</script>

<div class="comercio-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Yii::t('core', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('core', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('core', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['attribute' => 'nombre', 'label' => Yii::t('core', 'Name')], ['attribute' => 'direccion', 'label' => Yii::t('core', 'Adress')], ['attribute' => 'dia', 'label' => Yii::t('core', 'Open on'), 'format' => 'raw', 'value' => Yii::t('core', sysconfigs::getNombreDia($model->dia))], ['attribute' => 'prioridad', 'label' => Yii::t('core', 'Priority'), 'format' => 'raw', 'value' => Yii::t('core', sysconfigs::getNombrePrioridad($model->prioridad))], ['attribute' => 'esActivo', 'label' => Yii::t('core', 'Active?'), 'format' => 'raw', 'value' => $model->esActivo ? '<span class="label label-success">' . Yii::t('core', sysconfigs::getNombreEsActivo($model->esActivo)) . '</span>' : '<span class="label label-danger">' . Yii::t('core', sysconfigs::getNombreEsActivo($model->esActivo)) . '</span>', 'widgetOptions' => ['pluginOptions' => ['onText' => 'Yes', 'offText' => 'No']]]]]);
?>

</div>

<div id="map-canvas" style="height: 300px; width: 200px;border: 1px solid black"></div>