mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Moving media manager references from the CMS service provider to the System service provider
This commit is contained in:
parent
d14f1fec0f
commit
6bcaeb2d65
@ -68,6 +68,8 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
$combiner->registerBundle('~/modules/backend/assets/less/october.less');
|
||||
$combiner->registerBundle('~/modules/backend/assets/js/october.js');
|
||||
$combiner->registerBundle('~/modules/backend/widgets/table/assets/js/build.js');
|
||||
$combiner->registerBundle('~/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser.js');
|
||||
$combiner->registerBundle('~/modules/backend/widgets/mediamanager/assets/less/mediamanager.less');
|
||||
$combiner->registerBundle('~/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less');
|
||||
$combiner->registerBundle('~/modules/backend/formwidgets/codeeditor/assets/js/build.js');
|
||||
$combiner->registerBundle('~/modules/backend/formwidgets/fileupload/assets/less/fileupload.less');
|
||||
@ -96,6 +98,14 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
'url' => Backend::url('backend'),
|
||||
'permissions' => ['backend.access_dashboard'],
|
||||
'order' => 10
|
||||
],
|
||||
'media' => [
|
||||
'label' => 'cms::lang.media.menu_label',
|
||||
'icon' => 'icon-folder',
|
||||
'iconSvg' => 'modules/backend/assets/images/media-icon.svg',
|
||||
'url' => Backend::url('backend/media'),
|
||||
'permissions' => ['media.*'],
|
||||
'order' => 200
|
||||
]
|
||||
]);
|
||||
});
|
||||
@ -140,6 +150,10 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
'backend.manage_branding' => [
|
||||
'label' => 'system::lang.permissions.manage_branding',
|
||||
'tab' => 'system::lang.permissions.name'
|
||||
],
|
||||
'media.manage_media' => [
|
||||
'label' => 'cms::lang.permissions.manage_media',
|
||||
'tab' => 'cms::lang.permissions.name',
|
||||
]
|
||||
]);
|
||||
});
|
||||
@ -163,6 +177,7 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
$manager->registerFormWidget('Backend\FormWidgets\RecordFinder', 'recordfinder');
|
||||
$manager->registerFormWidget('Backend\FormWidgets\Repeater', 'repeater');
|
||||
$manager->registerFormWidget('Backend\FormWidgets\TagList', 'taglist');
|
||||
$manager->registerFormWidget('Backend\FormWidgets\MediaFinder', 'mediafinder');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,6 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
|
||||
$this->registerComponents();
|
||||
$this->registerThemeLogging();
|
||||
$this->registerAssetBundles();
|
||||
$this->registerCombinerEvents();
|
||||
|
||||
/*
|
||||
@ -79,20 +78,6 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register asset bundles.
|
||||
*/
|
||||
protected function registerAssetBundles()
|
||||
{
|
||||
/*
|
||||
* Register asset bundles
|
||||
*/
|
||||
CombineAssets::registerCallback(function ($combiner) {
|
||||
$combiner->registerBundle('~/modules/cms/widgets/mediamanager/assets/js/mediamanager-browser.js');
|
||||
$combiner->registerBundle('~/modules/cms/widgets/mediamanager/assets/less/mediamanager.less');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers events for the asset combiner.
|
||||
*/
|
||||
@ -181,14 +166,6 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
'permissions' => ['cms.manage_pages', 'cms.manage_layouts', 'cms.manage_partials']
|
||||
]
|
||||
]
|
||||
],
|
||||
'media' => [
|
||||
'label' => 'cms::lang.media.menu_label',
|
||||
'icon' => 'icon-folder',
|
||||
'iconSvg' => 'modules/cms/assets/images/media-icon.svg',
|
||||
'url' => Backend::url('cms/media'),
|
||||
'permissions' => ['media.*'],
|
||||
'order' => 200
|
||||
]
|
||||
]);
|
||||
});
|
||||
@ -255,11 +232,6 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
'tab' => 'cms::lang.permissions.name',
|
||||
'order' => 100
|
||||
],
|
||||
'media.manage_media' => [
|
||||
'label' => 'cms::lang.permissions.manage_media',
|
||||
'tab' => 'cms::lang.permissions.name',
|
||||
'order' => 100
|
||||
]
|
||||
]);
|
||||
});
|
||||
}
|
||||
@ -271,7 +243,6 @@ class ServiceProvider extends ModuleServiceProvider
|
||||
{
|
||||
WidgetManager::instance()->registerFormWidgets(function ($manager) {
|
||||
$manager->registerFormWidget('Cms\FormWidgets\Components');
|
||||
$manager->registerFormWidget('Cms\FormWidgets\MediaFinder', 'mediafinder');
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user