69 lines
4.0 KiB
PHP
69 lines
4.0 KiB
PHP
<?php if ($reviewed_product) : ?>
|
|
<a style="text-decoration: none; background: none; padding: 0px; margin: 0px;" href="<?php echo st_url_for('stReview/edit') ?>?id=<?php echo $reviewed_product->getId() ?>" <?php if ($reviewed_product->getDescription() != "") : ?> class="tooltip" title="<?php echo $reviewed_product->getDescription() ?>" <?php endif; ?>>
|
|
<?php $i = 1;
|
|
while ($i <= $reviewed_product->getScore())
|
|
{ ?>
|
|
<?php echo st_admin_get_icon('star', array('color' => 'warning')); ?>
|
|
<?php $i++;
|
|
} ?></a>
|
|
|
|
<div style="display:inline;">
|
|
<?php if ($reviewed_product->getAgreement()) : ?>
|
|
<?php echo st_admin_get_icon('check-circle') ?>
|
|
<?php elseif ($reviewed_product->getSkipped()) : ?>
|
|
<?php echo st_admin_get_icon('delete-circle', array('color' => 'default')) ?>
|
|
<?php else : ?>
|
|
<a style="text-decoration: none;" href="<?php echo st_url_for('stReview/reviewAccept') ?>?id=<?php echo $reviewed_product->getId() ?>" id="st_review_ajax_<?php echo $order_product->getId() ?>" data-review-action="accept">
|
|
<?php echo st_admin_get_icon('check-circle') ?>
|
|
</a>
|
|
|
|
|
<a style="text-decoration: none;" href="<?php echo st_url_for('stReview/reviewSkip') ?>?id=<?php echo $reviewed_product->getId() ?>" id="st_review_ajax_<?php echo $order_product->getId() ?>" data-review-action="skip">
|
|
<?php echo st_admin_get_icon('delete-circle', array('color' => 'default')) ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<script>
|
|
jQuery(function($) {
|
|
$('#st_review_ajax_<?php echo $order_product->getId() ?>').click(function() {
|
|
var link = $(this);
|
|
$.preloader.show();
|
|
$.post(link.attr('href'), {}, function() {
|
|
if (link.data('review-action') == 'skip') {
|
|
link.parent().html('<?php echo st_admin_get_icon('delete-circle', array('color' => 'default')) ?>');
|
|
} else if (link.data('review-action') == 'accept') {
|
|
link.parent().html('<?php echo st_admin_get_icon('check-circle') ?>');
|
|
}
|
|
$.preloader.hide();
|
|
});
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
<?php else: ?>
|
|
<?php if (!$order_product->getProduct()) : ?>
|
|
<?php echo st_admin_get_icon('delete-circle', array('color' => 'default')) ?>
|
|
<?php else: ?>
|
|
<a style="text-decoration: none; background: none; padding: 0px; margin: 0px;"
|
|
href="<?php echo st_url_for('stReview/sendReviewRequest') ?>?order_product_id=<?php echo $order_product->getId() ?>"
|
|
id="st_review_ajax_<?php echo $order_product->getId() ?>"
|
|
class="tooltip"
|
|
title="<?php echo $order_product->getSendReview() != "" ? stReview::getSendTime($order_product->getSendReview()).'<br>'.$i18n->__('Kliknij aby wysłać ponownie.') : __("Kliknij aby wysłać prośbę o recenzję.") ?>">
|
|
<?php echo st_admin_get_icon('envelop') ?>
|
|
<?php echo $order_product->getSendReview() != "" ? st_admin_get_icon('check-circle', array('size' => 15, 'style' => 'margin-left: -12px; margin-bottom: -13px')) : st_admin_get_icon('arrow-right', array('size' => 12, 'style' => 'margin-left: -11px; margin-bottom: -14px')) ?>
|
|
</a>
|
|
<script>
|
|
jQuery(function($) {
|
|
$('#st_review_ajax_<?php echo $order_product->getId() ?>').click(function() {
|
|
var link = $(this);
|
|
$.preloader.show();
|
|
$.post(link.attr('href'), {}, function(response) {
|
|
link.data('title', response.title);
|
|
link.html(response.content);
|
|
$.preloader.hide();
|
|
});
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|