mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fixed recommended ads and remove old twig query
This commit is contained in:
parent
10aa303451
commit
4c66214196
@ -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 %}
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user