mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Fixed CustomField Range Field Type && Added Admin Panel Settings Assets Clear
This commit is contained in:
parent
af16a58773
commit
37d4319571
@ -33,5 +33,8 @@ return [
|
||||
],
|
||||
'fields' => [
|
||||
'title' => 'Custom Fields'
|
||||
],
|
||||
'assets_clear' => [
|
||||
'name' => 'Assets Clear'
|
||||
]
|
||||
];
|
||||
|
||||
@ -32,6 +32,10 @@ class AdvsModule extends Module
|
||||
],
|
||||
],
|
||||
],
|
||||
'assets_clear' => [
|
||||
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||
'href' => '/admin/assets/clear',
|
||||
]
|
||||
// 'custom_fields' => [
|
||||
// 'buttons' => [
|
||||
// 'new_custom_field',
|
||||
|
||||
@ -181,6 +181,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
'as' => 'visiosoft.module.advs::view_type',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@viewType',
|
||||
],
|
||||
'admin/assets/clear' => [
|
||||
'as' => 'assets_clear',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@assetsClear',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@ -313,7 +317,13 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
'title' => 'visiosoft.module.advs::button.general_settings',
|
||||
'href' => '/admin/settings/modules/visiosoft.module.advs',
|
||||
];
|
||||
$slug2 = 'assets_clear';
|
||||
$section2 = [
|
||||
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||
'href' => '/admin/assets/clear',
|
||||
];
|
||||
$addonCollection->get('anomaly.module.settings')->addSection($slug, $section);
|
||||
$addonCollection->get('anomaly.module.settings')->addSection($slug2, $section2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2,10 +2,12 @@
|
||||
|
||||
|
||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Application\Application;
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
|
||||
use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
use Visiosoft\AdvsModule\Adv\Table\Filter\CategoryFilterQuery;
|
||||
use Visiosoft\AdvsModule\Adv\Table\Filter\CityFilterQuery;
|
||||
use Visiosoft\AdvsModule\Adv\Table\Filter\UserFilterQuery;
|
||||
@ -169,4 +171,12 @@ class AdvsController extends AdminController
|
||||
$events->dispatch(new ChangeStatusAd($id, $settings));//Create Notify
|
||||
return back();
|
||||
}
|
||||
|
||||
public function assetsClear(Filesystem $files, Application $application)
|
||||
{
|
||||
$directory = 'assets';
|
||||
$files->deleteDirectory($directory = $application->getAssetsPath($directory), true);
|
||||
echo "<h1>Success</h1>" . "<br>";
|
||||
echo "<a href='/admin'><b>Return Admin Panel</b></a>";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user