Merge branch 'master' of https://github.com/openclassify/openclassify into muammertop

This commit is contained in:
Muammer Top 2021-03-02 09:19:36 +03:00
commit 968ced2fcf
5 changed files with 9 additions and 24 deletions

View File

@ -11,7 +11,7 @@
</p> </p>
</div> </div>
<div class="preview-actions text-center"> <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]) %} {% set continueLink = url_route('visiosoft.module.packages::add_package', [adv.id]) %}
{% elseif isActive('dopings') %} {% elseif isActive('dopings') %}
{% set continueLink = url_route('add_doping', [adv.id]) %} {% set continueLink = url_route('add_doping', [adv.id]) %}

View File

@ -1,13 +1,12 @@
<?php namespace Visiosoft\AdvsModule\Adv\Table; <?php namespace Visiosoft\AdvsModule\Adv\Table;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface; use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Entry\EntryModel;
class AdvTableButtons class AdvTableButtons
{ {
public function handle(AdvTableBuilder $builder) public function handle(AdvTableBuilder $builder)
{ {
$builder->setButtons([ $buttons = [
'status' => [ 'status' => [
'text' => function (EntryInterface $entry) { 'text' => function (EntryInterface $entry) {
$text_type = ($entry->getStatus() == 'approved') ? 'decline' : 'approve'; $text_type = ($entry->getStatus() == 'approved') ? 'decline' : 'approve';
@ -50,9 +49,13 @@ class AdvTableButtons
'create_configration' => [ 'create_configration' => [
'text' => trans('visiosoft.module.advs::button.create_configurations'), 'text' => trans('visiosoft.module.advs::button.create_configurations'),
'href' => route('visiosoft.module.advs::configrations.create') . "?ad={entry.id}"] 'href' => route('visiosoft.module.advs::configrations.create') . "?ad={entry.id}"]
] ]
] ]
]); ];
$builder->setButtons($buttons);
return $buttons;
} }
} }

View File

@ -43,15 +43,6 @@ class AdvsController extends AdminController
$table->addAsset("styles.css", "visiosoft.module.advs::css/custom.css"); $table->addAsset("styles.css", "visiosoft.module.advs::css/custom.css");
$table->addAsset('scripts.js', 'visiosoft.module.advs::js/list.js'); $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(); return $table->render();
} }

View File

@ -17,12 +17,6 @@ use Visiosoft\DefaultadminTheme\Listener\ApplySorting;
*/ */
class DefaultadminThemeServiceProvider extends AddonServiceProvider class DefaultadminThemeServiceProvider extends AddonServiceProvider
{ {
/**
* The addon listeners.
*
* @var array
*/
protected $listeners = [ protected $listeners = [
SortNavigation::class => [ SortNavigation::class => [
ApplySorting::class, ApplySorting::class,
@ -33,9 +27,6 @@ class DefaultadminThemeServiceProvider extends AddonServiceProvider
], ],
]; ];
/**
* Register the addon.
*/
public function register() public function register()
{ {
AbstractPaginator::$defaultView = 'visiosoft.theme.defaultadmin::pagination/bootstrap-4'; AbstractPaginator::$defaultView = 'visiosoft.theme.defaultadmin::pagination/bootstrap-4';

View File

@ -45,7 +45,7 @@ class ProfileModulePlugin extends Plugin
return $ad; return $ad;
} }
) ),
]; ];
} }
} }