<?php
/*
	WPRichSnippets - Restaurant aggregate review template
 
	WARNING: This file is part of the core WPRichSnippets plugin. DO NOT edit
	this file under any circumstances.
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly


function wprs_template_restaurant_aggregate( $id = null ) {
	
	global $post;
    
	If ( ! isset($id) ) $id = $post->ID;
		
	// define $box
	$box = '';
	
	// get box settings
	$template = wprs_template($id);
			
	$box .= '<div class="tab-pane active" id="item_square">';
			
		$box .= '<div class="wprs_container">';
			$box .= '<div class="row">';
		
				$box .= '<div id="wprs_square">';
			
					$box .= $template['media'];
			
					$box .= '<div class="row">';
						
						$box .= '<div class="col-xs-4 col-sm-4 col-md-4">';
							$box .= '<ul>';
								$box .= '<li><b><span>'. __('User Rating', 'wprs') .'</span></b></li>';
								$box .= '<li>'.$template['user_star_aggregate'].'</li>';
								$box .= '<li>'.$template['score_user'].'</li>';
							$box .= '</ul>';
						$box .= '</div>';
						
						$box .= '<div class="col-xs-4 col-sm-4 col-md-4">'.$template['price'].'</div>';
					
						$box .= '<div class="col-xs-4 col-sm-4 col-md-4">';
							$box .= '<ul class="al-right">';
								if ($template['percentage_user_average'] !='') {$box .= '<li>'.$template['percentage_user_average'].'</li>';}
								$box .= '<li>'.$template['userrating_review_count'].'</li>';
							$box .= '</ul>';
						$box .= '</div>';
					
					$box .= '</div>';
					
					$box .= '<hr />';
			
					$box .= '<div class="row">';
						$box .= '<div class="col-md-6 wprs_restaurant_details">';
							$box .= '<ul>';
								$box .= '<li><b>'.$template['item_name'].'</b></li>';
								$box .= '<li>'.$template['phone'].'</li>';
								$box .= '<li>'.$template['cuisine'].'</li>';
								$box .= '<li>'.$template['openhours'].'</li>';
								$box .= '<li>'.$template['restaurant_menu'].'</li>';
								$box .= '<li>'.$template['reservations'].'</li>';
							$box .= '</ul>';
						$box .= '</div>';
						$box .= '<div class="col-md-6 wprs_restaurant_details">';
							$box .= '<ul>';
								$box .= '<li>'.$template['map'].'</li>';
								$box .= '<li>'.$template['address'].'</li>';
							$box .= '</ul>';
						$box .= '</div>';
					$box .= '</div>';
			
					$box .= '<hr />';
					
					/*
					$box .= '<div class="row">';
						$box .= '<div class="summary col-md-12">';
							$box .= $template['description'];
							$box .= $template['links'];
						$box .= '</div>';
					$box .= '</div>';
					*/
	
				$box .= '</div>';
		
			$box .= '</div>';
		$box .= '</div>';


	$box .= '</div>';

	return apply_filters('wprs_template_restaurant_aggregate', $box);
	
}

