Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Easyadmin Plus Bundle Laravel Package

2lenet/easyadmin-plus-bundle

View on GitHub
Deep Wiki
Context7

advanced show view for easyadmin plus

EasyAdminPlus provides a way to have tabs and to group fields in the show view.

Sublist is also possible.


How to use it

Configure the show entity like this

    show:
        title: 'title.echeance.show'
        header_template : 'easy_admin/Controle/_show_header.html.twig'
        actions:
            - { name: edit, icon: edit }
            - { name: delete, icon: trash }
        fields:
            - { type: 'group', css_class: 'col-sm-6', label: 'Echeance', roles: ['ROLE_ADMIN'], close: true }
            - { property: libelle, label: label.libelle }
            - { property: commentaire, label: label.commentaire, type: raw }
            - { property: ressource, label: label.ressource }
            - { property: dateLimite, label: label.dateLimite }
            - { property: dateOk, label: label.dateOk }
            - { type: 'group', css_class: 'col-sm-6', label: 'Suivis' }
            - { property: etat, label: label.etat }
            - { property: dateRdv, label: label.dateRdv }
            - { property: delaiDateProche, label: label.delaiDateProche }
            - { property: validerPar, label: label.validerPar }
            - { property: responsableInterne, label: label.responsableInterne }
            - { property: responsableExterne, label: label.responsableExterne }

            - { type: 'sublist', id: 'echeances', label: 'tab.echeances', entity: 'Controle', property: 'Controles'}
            - { type: 'sublist', id: 'options', label: 'tab.options', entity: 'Ressource', property: 'Options'}
            - { type: 'sublist', id: 'paniers', label: 'tab.panier', property: 'paniers', entity: 'Panier',template_form: 'easy_admin/Helper/_sub_form.html.twig', add_form: 'App\Form\PanierType',add_route: 'app_admin_eleve_addpanier', with_add: true , 'with_delete': true, add_form_options: {'parent':'{parent}'}}
            - { type: 'sublist', id: 'eleves', 'repository_method': 'findByClassCurrentYears', label: 'tab.eleves', entity: 'Eleve' , ignore_fields: ['classe']}
            - { type: 'tab', id: 'historique', label: 'Historique', action: 'historyAction' }

For the group:

You can add role with options roles and minifie with options close .

For the sublist:

You have another options :

  • hidden_if_empty (bool) : hide onglet if sublist is empty
  • show_count (bool); show count in onglet

if repository_method in place of property ou can custom the list (the parent is first args you can change it with repository_method_args):

public function findByClassCurrentYear(Classe $classe){
        return $this->createQueryBuilder('e')->where('e.classe = :classe')
            ->andWhere('e.annee = :annee')
            ->setParameters([
                'annee' => $this->currentYear,
                'classe' => $classe
            ]);
    }

every group open and close a box (bootstrap). If their is a label it show it in the header box.

The tabs must alway be in the last positions.

Action can be a fool custom action like this : App\Controller\CustomController:indexAction

For the sublist it use the list config from the 'Foreign' Entity declared in the entity Params. Options it the property to get le associated list.

The show display also the "blame and timestamp" info on the record ( under the title ) if the property exist. So just add the BlamableTrait and Timestampable Trait to make it work

use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Blameable\Traits\BlameableEntity;
use Gedmo\Timestampable\Traits\TimestampableEntity;

/**
 * Ressource
 * 
 * [@Gedmo](https://github.com/Gedmo)\Loggable
 * [@ORM](https://github.com/ORM)\Table(name="ressource")
 * [@ORM](https://github.com/ORM)\Entity(repositoryClass="App\Repository\RessourceRepository")
 */
class Ressource
{
    use BlameableEntity;
    use TimestampableEntity;

header_template is used to add specific header under the title. Define the path of the twig template to include.


Dependency

EasyAdminPlus history tab need that the loggable exist and is activated ( the repo should exist )


Back to main readme

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui