manuxi / sulu-admin-extras-bundle
Admin UI extensions for Sulu CMS - Property Resolvers and List Field Transformers
Package info
github.com/manuxi/SuluAdminExtrasBundle
Language:JavaScript
Type:symfony-bundle
pkg:composer/manuxi/sulu-admin-extras-bundle
Requires
- php: ^8.1
- sulu/sulu: ^3.0
- symfony/config: ^5.4 || ^6.0 || ^7.0
- symfony/dependency-injection: ^5.4 || ^6.0 || ^7.0
- symfony/http-kernel: ^5.4 || ^6.0 || ^7.0
- symfony/translation-contracts: ^2.5 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- jackalope/jackalope-doctrine-dbal: ^1.3.4
- phpunit/phpunit: ^9.5 || ^10.0
README
A bundle for Sulu CMS that adds useful tools like Content Types (Form Fields) and List Transformers (Visualizations) to the Admin UI.
This bundle combines and modernizes functionality from the former SuluContentTypesBundle and SuluTweaksBundle for Sulu 3.0.
English | 🇩🇪 Deutsch
📚 Features & Documentation
Detailed documentation for each feature can be found in the docs/ folder:
Property Types
- Color Select - Color selection with visual preview (List: Type Color, see below)
- Number With Default - Number with support for
default_value - Slider Range - Slider input
- Star Rating - Star rating selection
- DateTime Start / End - Linked date-time pickers with auto end-time, business hours validation and next-slot finder
- DateTime With Default - Date-time picker with
default_valuesupport - Business Hours - Weekly schedule with time slots, breaks and copy function
- Public Holidays - Holiday manager with Nager.Date API integration
- Holiday Dates - Company holidays and closing times
- Single Contact Autocomplete - Single-Contact-Select with autocomplete
List Transformers
- Percent Bar - Percentage bar with many options
- Publish State - Display publication status in a separate column (hidden by default)
- Ghost Locale - Language status in a separate column (hidden by default)
- Type Color - Color display (Form: Color Select, see above)
- Star Rating - Star rating
- Color Dot - Colored circle from hex value
- Status Switcher - Interactive inline status switcher with dropdown with options changing the entity status
Other
- Collapsible Sections - Auto-collapsible XML sections in the Admin UI (hacky)
- AddNewToolbarAction - "New"-Button in Action-Toolbar of an element
🚀 Installation
Requirement: Sulu CMS 3.0+
1. Install via Composer
composer require manuxi/sulu-admin-extras-bundle
2. Register Bundle
Add to config/bundles.php:
return [ Manuxi\SuluAdminExtrasBundle\SuluAdminExtrasBundle::class => ['all' => true], ];
3. Admin Assets Setup
To load the JavaScript components in the Sulu Admin, you must adjust your project's asset configuration.
A) Update assets/admin/package.json
Open the file assets/admin/package.json in your project root. Add or update the dependency to point to the bundle's resources:
{
"dependencies": {
"sulu-admin-extras-bundle": "file:../../vendor/manuxi/sulu-admin-extras-bundle/src/Resources"
}
}
B) Update assets/admin/app.js
Open assets/admin/app.js (or index.js) and import the bundle:
import 'sulu-admin-extras-bundle';
C) Install & Build Run the following commands to compile the admin assets:
cd assets/admin
npm install
npm run build
⚙️ Configuration
You can copy the default configuration file:
cp vendor/manuxi/sulu-admin-extras-bundle/src/Resources/config/default.yaml config/packages/sulu_admin_extras.yaml
See docs for detailed configuration options.