{{ header }}
<div class="pts-container">
	<ul class="pts-breadcrumb">
		{% for breadcrumb in breadcrumbs %}
		<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
		{% endfor %}
	</ul>
		{% if success %}
	  <div class="alert pts-alert-success"> {{ success }}</div>
	  {% endif %}
	<div class="row">
		{{ column_left }}
		{% if column_left and column_right %}
		{% set class = 'pts-col-sm-6' %}
		{% elseif column_left or column_right %}
		{% set class = 'pts-col-sm-9' %}
		{% else %}
		{% set class = 'pts-col-sm-12' %}
		{% endif %}
		<div id="pts-content" class="{{ class }}">
			{{ content_top }}
				<h1>{{ text_storereview }}</h1>
					{% if reviews %}
					{% for review in reviews %}
					<table class="pts-table pts-table-striped pts-table-bordered">
					  <tr>
						<td style="width: 50%;"><strong>{{ review.customer_name }}</strong></td>
						<td class="pts-text-right">{{ review.date_added }}</td>
					  </tr>
					  <tr>
						<td colspan="2"><strong>{{ review.review_title }}</strong>
						<p>{{ review.review_description }}</p>
						<div class="rating">
						  {% for i in 1..5 %}
							{% if review.rating < i %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span> {% endif %}
							{% endfor %}
						  </div>
						  </td>
					  </tr>
					</table>
					{% endfor %}
					<div class="pts-col-sm-6 pts-text-left">{{ pagination }}</div>
					<div class="pts-col-sm-6 pts-text-right">{{ results }}</div>
					{% else %}
					<div class="pts-text-center">{{ text_empty_result }}</div>
					{% endif %}
					{% if not result_check %}
					<h2>{{ text_heading }}</h2>
					<form class="pts-form-horizontal" id="form-review" action="{{ action }}" method="post">
					{% if customer_id %}
					<div class="pts-form-group required">
					  <div class="pts-col-sm-12">
						<label class="pts-control-label" for="input-name">{{ text_title }}</label>
						<input type="text" name="review_title" value="{{ review_title }}" id="input-name" class="pts-form-control" />
						<input type="hidden" name="seller_id" value="{{ seller_id }}" />
						<input type="hidden" name="customer_id" value="{{ customer_id }}" />
						{% if error_title %}
							<div class="text-danger">{{ error_title }}</div>
						{% endif %}
					  </div>
					</div>
					<div class="pts-form-group required">
					  <div class="pts-col-sm-12">
						<label class="pts-control-label" for="input-review">{{ text_description }}</label>
						<textarea name="review_description" rows="5" id="input-review" class="pts-form-control">{{ review_description }}</textarea>
						{% if error_description %}
							<div class="text-danger">{{ error_description }}</div>
						{% endif %}
						<div class="help-block">{{ text_note }}</div>
					  </div>
					</div>
					<div class="pts-form-group required">
					  <div class="pts-col-sm-12">
						<label class="pts-control-label">{{ text_rating }}</label>
						&nbsp;&nbsp;&nbsp; {{ entry_bad }}&nbsp;
						<input type="radio" name="rating" value="1" />
						&nbsp;
						<input type="radio" name="rating" value="2" />
						&nbsp;
						<input type="radio" name="rating" value="3" />
						&nbsp;
						<input type="radio" name="rating" value="4" />
						&nbsp;
						<input type="radio" name="rating" value="5" />
						&nbsp;{{ entry_good }}</div>
						{% if error_rating %}
							<div class="text-danger">{{ error_rating }}</div>
						{% endif %}
					</div>
					<div class="buttons clearfix">
					  <div class="pts-pull-right">
						<button type="submit" id="button-review" data-loading-text="{{ text_loading }}" class="pts-btn pts-btn-primary">{{ button_continue }}</button>
					  </div>
					</div>
					{% else %}
					{{ text_login }}
					{% endif %}
				  </form>
					{% endif %}
			{{ content_bottom }}</div>
	{{ column_right }}</div>
</div>
{{ footer }}