mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #968 from openclassify/dia
#3231 [recommendedads-module] Table buttons disappear if recommended-…
This commit is contained in:
commit
b9a736cc55
@ -11,7 +11,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="preview-actions text-center">
|
||||
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') %}
|
||||
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') and (auth_user().isAdmin or not auth_user().hasPermission('visiosoft.module.packages::packages.no_read')) %}
|
||||
{% set continueLink = url_route('visiosoft.module.packages::add_package', [adv.id]) %}
|
||||
{% elseif isActive('dopings') %}
|
||||
{% set continueLink = url_route('add_doping', [adv.id]) %}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Adv\Table;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryModel;
|
||||
|
||||
class AdvTableButtons
|
||||
{
|
||||
public function handle(AdvTableBuilder $builder)
|
||||
{
|
||||
$builder->setButtons([
|
||||
$buttons = [
|
||||
'status' => [
|
||||
'text' => function (EntryInterface $entry) {
|
||||
$text_type = ($entry->getStatus() == 'approved') ? 'decline' : 'approve';
|
||||
@ -50,9 +49,13 @@ class AdvTableButtons
|
||||
'create_configration' => [
|
||||
'text' => trans('visiosoft.module.advs::button.create_configurations'),
|
||||
'href' => route('visiosoft.module.advs::configrations.create') . "?ad={entry.id}"]
|
||||
]
|
||||
]
|
||||
]
|
||||
]);
|
||||
];
|
||||
|
||||
$builder->setButtons($buttons);
|
||||
|
||||
return $buttons;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -43,15 +43,6 @@ class AdvsController extends AdminController
|
||||
$table->addAsset("styles.css", "visiosoft.module.advs::css/custom.css");
|
||||
$table->addAsset('scripts.js', 'visiosoft.module.advs::js/list.js');
|
||||
|
||||
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}',
|
||||
]);
|
||||
}
|
||||
|
||||
return $table->render();
|
||||
}
|
||||
|
||||
|
||||
@ -17,12 +17,6 @@ use Visiosoft\DefaultadminTheme\Listener\ApplySorting;
|
||||
*/
|
||||
class DefaultadminThemeServiceProvider extends AddonServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* The addon listeners.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listeners = [
|
||||
SortNavigation::class => [
|
||||
ApplySorting::class,
|
||||
@ -33,9 +27,6 @@ class DefaultadminThemeServiceProvider extends AddonServiceProvider
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register the addon.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
AbstractPaginator::$defaultView = 'visiosoft.theme.defaultadmin::pagination/bootstrap-4';
|
||||
|
||||
@ -45,7 +45,7 @@ class ProfileModulePlugin extends Plugin
|
||||
|
||||
return $ad;
|
||||
}
|
||||
)
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user