Download the PHP package manuxi/sulu-tweaks-bundle without Composer
On this page you can find all versions of the php package manuxi/sulu-tweaks-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download manuxi/sulu-tweaks-bundle
More information about manuxi/sulu-tweaks-bundle
Files in manuxi/sulu-tweaks-bundle
Package sulu-tweaks-bundle
Short Description Tweaks for Sulu.
License MIT
Homepage https://github.com/manuxi/SuluTweaksBundle
Informations about the package sulu-tweaks-bundle
๏ปฟ# SuluTweaksBundle
English | Deutsche Version
This bundle was created to tweak some aspects of Sulu's list display.
Feature requests are always welcome.
This bundle works for Sulu 2.6 (probably earlier too) and 3.0. Use at own risk ๐ค๐ป
Features
๐ด Publish State Indicator
Stair effects in lists are ugly, and the default display produces exactly those.
This bundle cleans that up: The included SCSS hides the current publish indicators and ghost locale and adds new ones in separate columns. The PublishIndicator also shows a green dot for published elements.
| Status | Color |
|---|---|
| Published | ๐ข Green |
| Draft | ๐ข๐ก Green + Yellow |
| Not published | ๐ก Yellow |
๐ Ghost Locale Indicator
Sulu's built-in ghost locale indicator (showing the fallback language) is automatically added to cells and cannot be repositioned. This bundle provides a separate column for the ghost locale that can be placed anywhere in lists.
The styling matches Sulu's original design.
โญ Star Rating
Displays numeric ratings as visual stars. Supports both 5-point and 10-point scales (with half-stars).
| Rating | Display |
|---|---|
| 3/5 | โ โ โ โโ |
| 7/10 | โ โ โ โฏชโ (half star) |
The numeric value is shown in a tooltip on hover. Optionally, the value can also be displayed next to the stars.
๐ Percent Bar
Displays values as a colored progress bar. The color transitions from red (0%) through orange, yellow to green (100%).
| Percent | Color |
|---|---|
| 0-20% | ๐ด Red |
| 20-40% | ๐ Orange |
| 40-60% | ๐ก Yellow |
| 60-80% | ๐ข Light green |
| 80-100% | ๐ข Green |
Features:
- Configuration globally or per XML parameter
- max_value: Any scale (0-100, 0-10, 0-5, etc.)
- value_position: Value inside the bar (
inside), to the right (outside) or hidden (none) - gradient_mode: Smooth transition (
interpolate) or color bands (steps) - use_gradient: Gradient colors or single color
- height: Height can be defined
- animate: CSS animation on load
๐ฉ๐ปโ๐ญ Installation
Step 1: Install the package
Step 2: Register Admin Assets
Add to assets/admin/package.json:
Step 3: Import the Bundle
Import in assets/admin/app.js:
Step 4: Rebuild Admin Assets
๐ง How It Works
When importing the bundle via import 'sulu-tweaks-bundle';, the following happens automatically:
- Configuration Hook: The bundle registers an update config hook for
sulu_tweaks - Transformer Registration: All list field transformers are registered in Sulu's
listFieldTransformerRegistry - Styles Applied: The included SCSS hides Sulu's default indicators/ghost locales and applies custom styling
Available Transformers
| Transformer | Type Name | Description |
|---|---|---|
PublishStateFieldTransformer |
publish_state_indicator |
Colored dots for publish status |
GhostLocaleFieldTransformer |
ghost_locale_indicator |
Separate column for fallback language |
StarRatingFieldTransformer |
star_rating |
Star rating display |
PercentBarFieldTransformer |
percent_bar |
Colored percent bar |
Only the transformers that should be used need to be added to the list XML configurations.
๐ Usage
Publish State Indicator
Add to list XML (e.g., config/lists/events.xml):
Tip: Place this property at the beginning of the list for better visibility.
Ghost Locale Indicator
Add to list XML:
Note: The ghostLocale field must be available in the list data. With Sulu 3.0 DimensionContent architecture, this field is typically provided automatically.
Star Rating
Add to list XML:
With XML parameters (overrides global config):
Percent Bar
Add to list XML:
Different scales via XML parameters:
๐งถ Configuration
Create config/packages/sulu_tweaks.yaml in the project:
Configuration vs. XML Parameters
| Option | Global (YAML) | Per List (XML) |
|---|---|---|
| Applies to | All lists | Single property |
| Priority | Lower | Higher (overrides) |
| Use case | Project defaults | Special requirements |
Example: Global max_value: 100, but one list needs max_value: 10 โ override via XML parameter.
๐ฃ๏ธ Translations
The bundle provides translations for English and German. They can be overridden in the project:
๐ Bundle Structure
๐ค Contributing
Contributions are welcome! Pull requests can be submitted.
๐ License
This bundle is under the MIT license.
All versions of sulu-tweaks-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
sulu/sulu Version ^2.6 || ^3.0
symfony/intl Version ^6.2 | ^7.0
symfony/translation Version ^6.2 | ^7.0
sulu/sulu-rector Version ^2.0