fixed recommended ads and remove old twig query

This commit is contained in:
vedatakd 2019-10-11 12:39:24 +03:00
parent 10aa303451
commit 4c66214196
2 changed files with 16 additions and 4 deletions

View File

@ -36,10 +36,6 @@
<!-- carousel -->
<div class="col-md-7 slider-box">
{% if entries('advs').isEnabled('getamazon') %}
{% set product_amazon = entries('getamazon','products').where('slug',adv.slug).first() %}
{% endif %}
{% if blocks('ad-item-picture-block-area') is null %}
{% include "visiosoft.module.advs::advs/partials/blocks/ads-item-picture-block" %}
{% else %}

View File

@ -25,6 +25,12 @@ use Illuminate\Contracts\Events\Dispatcher;
class AdvsController extends AdminController
{
private $model;
public function __construct(AdvModel $model)
{
$this->model = $model;
parent::__construct();
}
/**
* Display an index of existing entries.
@ -66,6 +72,16 @@ class AdvsController extends AdminController
]
]);
if($this->model->is_enabled('recommendedads'))
{
$table->addButton('add_recommended',[
'type' => 'default',
'icon' => 'fa fa-gg',
'text' => 'Add Recommended',
'href' => '/admin/recommendedads/create/{entry.id}',
]);
}
$table->setColumns([
'name' => [
'class' => 'advs-name',