{{ header }}
<style>
#content{
	position: static !important;
}
.w_content .alert{
	margin-top: 15px;
}
.breadcrumb{
	margin: 0px 0 8px 0 !important;
}
</style>
<link href="view/stylesheet/revirewpro/style.css" rel="stylesheet" />
{{ column_left }}
<div id="content">
<div class="container-fluid">
<div class="w_wrap">
	<div class="w_header">
		<div class="flscr_btn"><i class="fa fa-arrows-alt"></i></div>
		<h1>{{ heading_title }}</h1>
		<ul class="breadcrumb">
			{% for breadcrumb in breadcrumbs %}
			<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
			{% endfor %}
		</ul>
	</div>
	<div class="w_content">
		<div class="alert alert-danger hide alert-dismissible">
			<i class="fa fa-exclamation-circle"></i> You Don;t Have permissin to modify
			<button type="button" class="close">&times;</button>
		</div>
		<div class="row">
			<div class="col-sm-12">
				<div class="well ">
					<div class="row">
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-12 control-label">Durum</label>
								<div class="col-sm-12">
									<select class="form-control" name="status">
										<option value="">---Select---</option>
										{% if status == '1' %}
											<option value="1" selected="selected">{{ text_enabled }}</option>
										{% else %}
											<option value="1">{{ text_enabled }}</option>
										{% endif %}
										{% if status == '0' %}
											<option value="0" selected="selected">{{ text_disabled }}</option>
										{% else %}
											<option value="0">{{ text_disabled }}</option>
										{% endif %}
									</select>
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-12 control-label">{{ entry_product }}</label>
								<div class="col-sm-12">
									<input type="text" name="product" value="{{ product_id.name }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
									<input type="hidden" name="product_id" value="" />
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-12 control-label">{{ entry_userrating }}</label>
								<div class="col-sm-12">
									<select class="form-control" name="userreview">
										<option value="">---Select---</option>
										{% if userreview == '1' %}
											<option value="1" selected="selected">{{ text_registered }}</option>
										{% else %}
											<option value="1">{{ text_registered }}</option>
										{% endif %}
										{% if userreview == '0' %}
											<option value="0" selected="selected">{{ text_guest }}</option>
										{% else %}
											<option value="0">{{ text_guest }}</option>
										{% endif %}
									</select>
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-12 control-label">{{ entry_customername }}</label>
								<div class="col-sm-12">
									<input type="text" class="form-control" name="customer" value="{% if customer_id.firstname %}{{ customer_id.firstname }} {{ customer_id.lastname }} {% endif %}" placeholder="{{ entry_customername }}" />
									<input type="hidden" name="customer_id" value="" />
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
							  <label class="control-label col-sm-12" for="input-date-added">Yorum Tarihi</label>
							  <div class="col-sm-12">
								  <div class="input-group date">
									<input type="text" name="filter_date_added" value="{{ filter_date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" id="input-date-added" class="form-control" />
									<span class="input-group-btn">
									<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
									</span>
								  </div>
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-12 control-label"> </label>
								<div class="col-sm-12">
									<button class="btn btn-info button-filter" data-toggle="tooltip" data-original-title="{{ text_filter }}"><i class="fa fa-filter"></i></button>
									<button type="button" data-loading-text="Loading..." data-toggle="tooltip" class="button-add btn btn-primary" data-original-title="{{ text_add }}"><i class="fa fa-plus"></i></button>
									<a href="{{ updatereviews }}" data-loading-text="{{ text_refresh }}" data-original-title="{{ text_refresh }}" data-toggle="tooltip" class="btn btn-info"><i class="fa fa-refresh"></i></a>
									{% if allratingList %}
									<a href="{{ oldreviews }}" data-original-title="Opencart varsayılan yorumları buraya aktarır" data-toggle="tooltip" class="btn btn-warning"><i class="fa fa-download"></i> Varsayılan Yorumlar</a>
									{% else %}
									<a class="oldreview btn btn-warning" data-original-title="Opencart varsayılan yorumları buraya aktarır" data-toggle="tooltip"><i class="fa fa-download"></i> Varsayılan Yorumlar</a>
									{% endif %}
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-md-12">
				<div class="table-responsive">
					<table class="table table-bordered table-hover">
						<thead>
							<tr>
								<th class="text-center">
									<span>{{ heading_title }}</span>
								</th>
								<th class="text-left">{{ entry_product }}</th>
								<th class="text-left">{{ entry_rating }}</th>
								<th class="text-left">{{ text_enabled }}/{{ text_disabled }}</th>
								<th class="text-right">{{ text_featured }}</th>
								<th class="text-right">{{ text_action }}</th>
							</tr>
						</thead>
						<tbody>
							{% if reviews %}
							{% for review in reviews %}
							<tr>
								<td class="text-left">
									<div class="panel panel-default">
										<table class="table">
											<tbody>
												<tr>
													{% if review.author %}
													<td colspan="2">{{ review.author }}</td>
													{% endif %}
												</tr>
												{% if review.email %}
												<tr>
													<td style="width: 1%"><button class="btn btn-info btn-xs" title="" data-toggle="tooltip" data-original-title="E-Mail"><i class="fa fa-envelope fa-fw"></i></button></td>
													<td><a href="mailto:{{ review.email }}">{{ review.email }}</a></td>
												</tr>
												{% endif %}
												
												<tr>
													<td><button class="btn btn-info btn-xs" data-toggle="tooltip" data-original-title="User"><i class="fa fa-user fa-fw"></i></button></td>
													<td>
														{% if review.customer_id %}
															<span class="label label-success">{{ text_registered }}</span>
														{% else %}
															<span class="label label-warning">{{ text_guest }}</span>
														{% endif %}
													</td>
												</tr>
												<tr>
													<td><button class="btn btn-info btn-xs" title="" data-toggle="tooltip" data-original-title="Like/Dislike"><i class="fa fa-thumbs-up fa-fw"></i></button></td>
													<td>
														<span class="label label-success">{{ review.yesvotes }}</span>
														<span class="label label-danger">{{ review.novotes }}</span>
													</td>
												</tr>
												<tr>
													<td><button class="btn btn-info btn-xs" title="" data-toggle="tooltip" data-original-title="Date"><i class="fa fa-clock-o fa-fw"></i></button></td>
													<td>{{ review.date_added }}	</td>
												</tr>
												{% if review.getreports.comment %}
												<tr>
													<td><button class="btn btn-xs btn-danger" data-toggle="tooltip" data-original-title="Review abuse"><i class="fa fa-star fa-fw"></i></button></td>
													<td><a class="button-abuse" data-toggle="modal" data-target="#reviewreports_{{ review.review_id }}" rel="{{ review.review_id }}" style="cursor:pointer">{{ entry_revewabuse }}</a>
													<div class="modal fade" id="reviewreports_{{ review.review_id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
													  <div class="modal-dialog" role="document">
														<div class="modal-content">
														  <div class="modal-header">
															<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
															<h4>{{ entry_revewabuse }} </h4>
														  </div>
														  <div class="modal-body">
														  <input type="hidden" name="abuse_review_id" value="" /><br />
															<table class="table table-bordered table-hover">
																<thead>
																	<tr>
																		<td>{{ entry_reason }}</td>
																		<td>{{ entry_comment }}</td>
																		<td>{{ entry_view_user }}</td>
																	</tr>
																</thead>
																<tbody>
																	<tr>
																		<td>{{ review.getreports.name }}</td>
																		<td>{{ review.getreports.comment }}</td>
																		{% if review.getreports.customer_id != '0' %}
																		<td><a href="{{review.getreports.customer_link}}" class="btn btn-info btn-sm"><i class="fa fa-eye"></i></a></td>
																		{% else %}
																		<td><a>{{ text_guest }}</td>
																		{% endif %}
																	</tr>
																</tbody>
															</table>
														  </div>
														</div>
													  </div>
													</div>
													</td>
												</tr>
												{% endif %}
												 {% if review.replies[review.review_id] %}
												<tr>
													<td><button class="btn btn-info btn-xs" title="" data-toggle="tooltip" data-original-title="Replies"><i class="fa fa-reply fa-fw"></i></button></td>
													<td>
														<a type="button" data-toggle="modal" data-target="#myModal_{{ review.review_id }}">
														{{ totaladminreply[review.review_id] }} {{ text_adminreplies }}
														</a>
														<!-- Modal -->
														<div class="modal fade" id="myModal_{{ review.review_id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
														  <div class="modal-dialog" role="document">
															<div class="modal-content">
															  <div class="modal-header">
																<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
																<h4 class="modal-title" id="myModalLabel">{{ text_replies }}</h4>
															  </div>
															  <div class="modal-body">
																{% if review.replies[review.review_id] %}
																	{% for replies in review.replies[review.review_id] %}
																		<div class="replyadmin">
																			<div class="pull-left">
																				{{ replies.date }}
																				<p>{{ replies.comment }}</p>
																			</div>
																			<div class="pull-right">
																			<button type="button" rel="{{ replies.review_id }}" id="{{ replies.vote_id }}" data-loading-text="Loading..." data-toggle="tooltip" class="reply-delete btn btn-danger" data-original-title="{{ text_delete }}"><i class="fa fa-trash-o"></i></button>
																			</div>
																			<div class="clearfix"></div>
																		<hr />
																		</div>
																		
																	{% endfor %}
																{% endif %}
															  </div>
															</div>
														  </div>
														</div>
													</td>
												</tr>
												{% endif %}
											</tbody>
										</table>
									</div>
								</td>
								<td>
									<table class="table table-bordered table-hover">
										<thead>
											<tr>
												<th class="text-center">{{ entry_image }}</th>
												<th class="text-left">{{ entry_productname }}</th>
												<th class="text-left">{{ entry_view }}</th>
											</tr>
										</thead>
										<tbody>
											<tr>
												<td class="text-center">
													<img title="" data-toggle="tooltip" data-original-title="{{ review.getproduct }}" src="{{ review.thumb }}" alt="{{ review.getproduct }}" class="img-thumbnail">
												</td>												
												<td class="text-left">
													<span title="" data-toggle="tooltip" data-original-title="Product">{{ review.getproduct }}</span>
												</td>
												<td class="text-left">
													<a href="{{ review.productlink }}" target="_new" class="btn btn-info btn-sm"><i class="fa fa-eye"></i></a>
												</td>
											</tr>
											<tr>
												<td colspan="4">
													{% if review.title %}
														<p><b>{{ review.title }}</b></p>
													{% endif %}
													{% if review.text %}
														<p>{{ review.text }}</p>
													{% endif %}
													{% if review.attachfile %}
														{% for attachemnt in review.attachfile %}
														<div class="thumbnail" style="margin:0;">
														<button class="btn btn-success btn-xs reviewdownloadfile" rel="{{ attachemnt.code }}">{{ text_attachment }} <i class="fa fa-download"></i></button>
														<button class="btn btn-xs btn-danger removeattachment" rel="{{ attachemnt.code }}"><i class="fa fa-trash-o"></i></button>
														</div>
														{% endfor %}
													{% endif %}
													
												</td>
											</tr>
										</tbody>
									</table>
								</td>
								<td class="text-left">
									{% if rating_desc %}
										<table class="table table-bordered table-hover">
											{% for ratings in rating_desc %}
											<tr>
												<td>
													{{ ratings.rating_name }}
												</td>
												<td class="partuclarreview">
													{% for i in 1..5 %}
														{% if i <= review.rating[ratings.rating_id].rating %}
															<i class="fa fa-star"></i>
														{% else %}
															<i class="fa fa-star-o"></i>
														{% endif %}
													{% endfor %}
												</td>
											</tr>
											{% endfor %}
										</table>
									{% endif %}
								</td>
								<td>
									<select class="form-control reviewstatus" rel="{{ review.review_id }}" name="review_status">
										<option value="1" {% if review.status %} selected {% endif %}>{{ text_enabled }}</option>
										<option value="0" {% if not review.status %} selected {% endif %}>{{ text_disabled }}</option>
									</select>
								</td>
								<td>
									<select class="form-control reviewfeatured" rel="{{ review.review_id }}" name="review_featured">
										<option value="1" {% if review.featured %} selected {% endif %}>{{ text_yes }}</option>
										<option value="0" {% if not review.featured %} selected {% endif %}>{{ text_no }}</option>
									</select>
								</td>
								<td class="text-right">
									<button type="button" rel="{{ review.review_id }}" data-loading-text="Loading..." data-toggle="tooltip" class="button-edit btn btn-primary" data-original-title="{{ text_edit }}"><i class="fa fa-pencil"></i></button>
									
									<button type="button" rel="{{ review.review_id }}" data-loading-text="Loading..." data-toggle="tooltip" class="button-reply btn btn-info" data-original-title="{{ text_reply }}"><i class="fa fa-reply"></i></button>
									
									<button type="button" rel="{{ review.review_id }}" data-loading-text="Loading..." data-toggle="tooltip" class="button-review btn btn-danger" data-original-title="{{ text_delete }}"><i class="fa fa-trash-o"></i></button>
								</td>
							</tr>
							{% endfor %}
							{% endif %}
						</tbody>
					</table>
				</div>
			</div>
			<div class="col-sm-6">
				<div class="text-left">{{ results }}</div>
			</div>
			<div class="col-sm-6">
				<div class="text-right">{{ pagination }}</div>
			</div>
		</div>
		
		<!-- Review Relpy-->
		<div class="modal fade" id="replypopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		  <div class="modal-dialog" role="document">
			<div class="modal-content">
			  <div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4>{{ text_reply }}</h4>
			  </div>
			  <div class="modal-body">
				<div class="error"></div>
				<label>{{ text_reply }}</label>
				<textarea name="comment" placeholder="{{ text_reply }}" class="form-control"></textarea>
				<input type="hidden" name="reply_review_id" value="" /><br />
				<button class="replytoreview btn btn-info">{{ text_submit }}</button>
			  </div>
			</div>
		  </div>
		</div>
    </div>

  </div>
</div>
<script type="text/javascript" src="view/javascript/summernote/summernote.js"></script>
<link href="view/javascript/summernote/summernote.css" rel="stylesheet" />
<script type="text/javascript" src="view/javascript/summernote/summernote-image-attributes.js"></script> 
<script type="text/javascript" src="view/javascript/summernote/opencart.js"></script> 
<div id="loadhtml"></div>
<script type="text/javascript"><!--

$('.flscr_btn').on('click', function(){
	$('.w_wrap').toggleClass('fullscreen');
});

$('.reviewdownloadfile').on('click', function(){
	var file = $(this).attr("rel");
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/downloadattachment&file=' + file + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$this.button('reset');
		},
		success: function(json){
			if(json['download']){
				window.location=json['download'];
			}
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('.removeattachment').on('click', function(){
	var file = $(this).attr("rel");
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/removeattachment&file=' + file + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$this.button('reset');
		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				//$this.button().remove();
				$this.parent().remove();
				$this.siblings('button').remove();
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('.button-edit').on('click', function(){
	var $this = $(this);
	var review_id = $(this).attr("rel");
	$.ajax({
		url: 'index.php?route=extension/reviewlist/getreviews&review_id='+ review_id + '&user_token={{ user_token }}',
		type: 'post',
		dataType: 'html',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$('.button-edit').button('reset');
		},
		success: function(html){
			$('#loadhtml').html(html);
		},
        error: function(xhr, ajaxOptions, thrownError) {
            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
        }
	});
});

$('.button-add').on('click', function(){
	$('#loadhtml').html('');
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/addnewreview&user_token={{ user_token }}',
		type: 'post',
		dataType: 'html',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$('.button-add').button('reset');
		},
		success: function(html){
			$('#loadhtml').html(html);
		},
        error: function(xhr, ajaxOptions, thrownError) {
            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
        }
	});
});

$('.button-reply').on('click', function(){
	var review_id = $(this).attr("rel");
	$('input[name=\'reply_review_id\']').val(review_id);
	$('#replypopup').modal('show');
});

$('.button-abuse').on('click', function(){
	var review_id = $(this).attr("rel");
	$('input[name=\'abuse_review_id\']').val(review_id);
	$('#reviewreports').modal('show');
});

$('.replytoreview').on('click', function(){
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/replyreview&user_token={{ user_token }}',
		type: 'post',
		data: $('#replypopup input, #replypopup textarea'),
		dataType: 'json',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$this.button('reset');
		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				alert('Replied successfully!');
				$('#replypopup textarea').val('');
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('.reply-delete').on('click', function(){
	var review_id = $(this).attr("rel");
	var vote_id = $(this).attr("id");
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/replydelete&review_id=' + review_id + '&vote_id=' + vote_id + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$this.button('reset');
		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				$this.parents('.replyadmin').remove();
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('.button-review').on('click', function(){
	var review_id = $(this).attr("rel");
	var $this = $(this);
	$.ajax({
		url: 'index.php?route=extension/reviewlist/removereview&review_id=' + review_id + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			$this.button('loading');
		},
		complete: function() {
			$this.button('reset');
		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				$this.parents('tr').remove();
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});


$('.reviewstatus').on('change', function (e) {
	var $this = $(this);
	var review_id = $(this).attr("rel");
    var status = this.value;
	$.ajax({
		url: 'index.php?route=extension/reviewlist/reviewstatus&review_id=' + review_id + '&status=' + status + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			
		},
		complete: function() {

		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				alert('Status Updated!');
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('.reviewfeatured').on('change', function (e) {
	var $this = $(this);
	var review_id = $(this).attr("rel");
    var featured = this.value;
	$.ajax({
		url: 'index.php?route=extension/reviewlist/reviewfeatured&review_id=' + review_id + '&featured=' + featured + '&user_token={{ user_token }}',
		dataType: 'json',
		beforeSend: function() {
			
		},
		complete: function() {

		},
		success: function(json){
			if(json['error']){
				$('.w_content .alert').removeClass('hide');
			}else{
				alert('Featured updated');
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});

$('input[name=\'product\']').autocomplete({
	'source': function(request, response) {
		$.ajax({
			url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' +  encodeURIComponent(request),
			dataType: 'json',
			success: function(json) {
				json.unshift({
					product_id: 0,
					name: '{{ text_none }}'
				});

				response($.map(json, function(item) {
					return {
						label: item['name'],
						value: item['product_id']
					}
				}));
			}
		});
	},
	'select': function(item) {
		$('input[name=\'product\']').val(item['label']);
		$('input[name=\'product_id\']').val(item['value']);
	}
});

$('input[name=\'customer\']').autocomplete({
	'source': function(request, response) {
		$.ajax({
			url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_name=' +  encodeURIComponent(request),
			dataType: 'json',
			success: function(json) {
				json.unshift({
					customer_id: 0,
					name: '{{ text_none }}'
				});

				response($.map(json, function(item) {
					return {
						label: item['name'],
						value: item['customer_id']
					}
				}));
			}
		});
	},
	'select': function(item) {
		$('input[name=\'customer\']').val(item['label']);
		$('input[name=\'customer_id\']').val(item['value']);
	}
});

$('.button-filter').on('click', function() {
	var url = '';
	var status = $('select[name=\'status\']').val();
	if (status !== '') {
		url += '&status=' + encodeURIComponent(status);
	}
	
	var userreview = $('select[name=\'userreview\']').val();
	if (userreview !== '') {
		url += '&userreview=' + encodeURIComponent(userreview);
	}
	
	var product_id = $('input[name=\'product_id\']').val();
	if (product_id) {
		url += '&product_id=' + encodeURIComponent(product_id);
	}

	var customer_id = $('input[name=\'customer_id\']').val();
	if (customer_id) {
		url += '&customer_id=' + encodeURIComponent(customer_id);
	}
	
	var filter_date_added = $('input[name=\'filter_date_added\']').val();
	if (filter_date_added) {
		url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
	}
	location = 'index.php?route=extension/reviewlist&user_token={{ user_token }}' + url;
});

$('.close').on('click', function(){
	$('.close').parents('.alert').addClass('hide');
});
$('.oldreview').on('click', function(){
	alert('Please Create Rating Bar');
});

$('.date').datetimepicker({
	language: '{{ datepicker }}',
	pickTime: false
});

$('.time').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: false
});

$('.datetime').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: true,
	pickTime: true
});

//--></script> 

{{ footer }}