function show_restaurant($restaurantId) { $restaurantService = new RestaurantService(); $restaurant = $restaurantService->getRestaurantById($restaurantId); ?> <input id="rest_lat" value="<?php echo $restaurant->lat; ?> " type="hidden"/> <input id="rest_lon" value="<?php echo $restaurant->lon; ?> " type="hidden"/> <div><b>Restaurante <?php echo $restaurant->name; ?> </b></div> <div id="divMap" style="width:100%; height: 70px;"></div> <div><?php echo $restaurant->description; ?> <a href="<?php echo get_permalink($restaurantId); ?> " class="btn btn-xs btn-primary">Ver más</a> </div> <div class="row"> <div class="col-md-12"> <table class="table"> <tbody> <tr> <td><img src="<?php echo MECATO_PLUGIN_URL . 'inc/img/icons/address.png'; ?> " width="20" height="20" /><?php echo $restaurant->city->name . ' - ' . $restaurant->address; ?> </td> <td><img src="<?php echo MECATO_PLUGIN_URL . 'inc/img/icons/phone.png'; ?> " width="20" height="20" /><?php echo $restaurant->phone; ?> </td> </tr> </tbody> </table> </div> </div> <?php }
function show_view() { $post = get_post(); $restaurantService = new RestaurantService(); $restaurant = $restaurantService->getRestaurantById(); ?> <div id="divMainSection"> <div><?php echo $post->post_content; ?> </div> <input id="rest_lat" type="hidden" value="<?php echo $restaurant->lat; ?> "/> <input id="rest_lon" type="hidden" value="<?php echo $restaurant->lon; ?> "/> <?php $this->show_location($restaurant); $this->show_gallery($restaurant); $this->show_menu($post); $this->show_update_restaurant($post); ?> </div> <?php }