Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2lenet/cruditbundle
Crudit is a symfony complete crud system
https://github.com/2lenet/cruditbundle
admin-panel crud-generator rad symfony
Last synced: about 1 month ago
JSON representation
Crudit is a symfony complete crud system
- Host: GitHub
- URL: https://github.com/2lenet/cruditbundle
- Owner: 2lenet
- License: mit
- Created: 2021-02-21T18:07:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T10:17:09.000Z (3 months ago)
- Last Synced: 2024-10-29T11:02:48.091Z (3 months ago)
- Topics: admin-panel, crud-generator, rad, symfony
- Language: PHP
- Homepage:
- Size: 17.6 MB
- Stars: 13
- Watchers: 5
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CruditBundle
![](doc/img/crudit.png)
[![Build Status](https://github.com/2lenet/CruditBundle/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/2lenet/CruditBundle/actions)
[![Build Status](https://github.com/2lenet/CruditBundle/actions/workflows/validate.yml/badge.svg?branch=main)](https://github.com/2lenet/CruditBundle/actions)Crudit bundle for 2le.
## Installation
Webpack Encore is required and you need to have a security on your application.
```bash
require 2lenet/crudit-bundle
npm install bootstrap@5 sass sass-loader @fortawesome/fontawesome-free easymde --save
```Just add the following lines in your template/base.html.twig
```twig
{% extends '@LleCrudit/layout/sb_admin/layout.html.twig' %}{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('app') }}
{% endblock %}
```Then, in your assets/js/app.js, you have to add this line :
```js
import '../styles/app.scss';
```And in your assets/styles/app.scss, add this :
```scss
@import '../../vendor/2lenet/crudit-bundle/assets/sb-admin/css/app.scss';
```All new SCSS files must be imported before the import of Crudit SCSS.
## Recipes
- [Setup Webpack Encore](doc/webpack_encore.md)
- [Create a CRUD](doc/crud.md)
- [Brick](doc/brick.md)
- [Menu](doc/menu.md)
- [Setup brand](doc/brand.md)
- [Filters](doc/filter.md)
- [Sublist](doc/sublist.md)
- [Use a FilterSet in your own Controller](doc/filterset_controller.md)
- [Form types](doc/form_types.md)
- [Add a map to a list or to a show](doc/map_config.md)
- [How to export data](doc/export.md)
- [Workflows](doc/workflow.md)
- [ProgressBarField](doc/progressbar_field.md)
- [Markdown](doc/markdown.md)
- [Color list](doc/color_list.md)
- [Twig extensions](doc/twig.md)
- [Test your application](doc/test_your_application.md)## Principle
A crud is composed by
- an independent controller
- a crud config class
- a datasource
- a filterset if neededThe layout and menu are independent from the crud. You can integrate easily your own controller in a Crudit Layout
## Feature
### List view
![](doc/img/list.png)
The list view has the following features :- Pagination
- Sorting
- Item Actions ( Show, Edit and Delete as standard )
- List Actions ( Add and Export csv and excel as standard )
- List grouping ( to save space in repeating values )
- Batch Action ( see [Batch actions](doc/batch_action.md) )
- Possibility to color the lines according to a class passed to the entity (
see [Coloring the rows in a list](doc/color_list.md) )
- Layout customisation is possible ( doc TODO / Block principle )The list view need a Datasource but is not bounded to Doctrine or any ORM.
### Show view
![](doc/img/show.png)
The show view has the following feature :- Show all fields
- Title can use the entity to title the object by its name
- Tabs (see [Tabs](doc/tabs.md))
- Sublists to show related data ( see [Sublist](doc/sublist.md) )
- Possibility to color the main card and the title of the show view ( the principle is the same as for the list
view: [Coloring the rows in a list](doc/color_list.md) )
- Layout customisation is possible ( doc TODO / Block principle )### Form view
![](doc/img/edit.png)
The edit view is a classical Symfony Form. You write your own FormTypeCrudit provides some help to be nicely integrated :
- Many FormType ( Datetime, Entity, etc ...)
- Entity Dropdown based on TomSelect with autocomplete
- DoctrineFormGuesser to automatically use Crudit FormType.
- Markdown editor based on EasyMDE
- Layout customisation is possible ( doc TODO / Block principle )## JS Format input helper
Some help to check the input validity ( upper, email, ip, etc... )
- [inputFormat](doc/input_format.md)
## Dependencies
Crudit wants to minimise dependencies on not really popular bundles or components
in order to be able to maintain this bundle for many years and to follow the Symfony Stack development without
dependency problems.The layout is inspired by [SB Admin 2](https://startbootstrap.com/theme/sb-admin-2) but partially rewritten. Many of the
features of SB Admin wasn't useful for this project.The CSS framework used is [Bootstrap 5](https://getbootstrap.com/docs/5.1/getting-started/introduction/).
Excel export uses phpoffice/phpspreadsheet.
Doctrine is needed for the pre-version but the project is designed to work without it. Feel free to contact us if you
want to use other dataprovider.# Development
TO COMPLETE
- [Design principle](doc/design.md)
## JS / CSS Developpement
To update the JS or the CSS please run in the bundle
```bash
npm install
npm run build
```