Skip to content

POC to study the possible support of tree display for relation form fields

Notifications You must be signed in to change notification settings

Hounddd/wn-enhancedrelation-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enhanced Relation form widget

The aim of this plugin is to study the possible support of tree display for relation form fields.

Winter relation formWidget with tree

Prerequisites

The model associated with the field must use the Winter\Storm\Database\Traits\NestedTree trait.

Installation

Let assume you're in the root of your wintercms installation

Using composer

Just run this command

composer require hounddd/wn-enhancedrelation-plugin

Clone

Clone this repo into your winter plugins folder.

cd plugins
mkdir hounddd && cd hounddd
git clone https://github.com/Hounddd/wn-enhancedrelation-plugin enhancedrelation

Note: In both cases, run php artisan migrate command to run plugin's migrations

Usage

Replace the type relation with enhanced-relation in your form field definition.

categories:
    label: 'Categories'
    nameFrom: name
    # type: relation
    type: enhanced-relation
    quickselect: true
    displayTree: true
    quickTreeActions: true

New options

  • displayTree : Display the tree structure of the relation.
  • quickTreeActions : Display buttons on the top of the widget to open all, closse all or open only selected nodes.

About

POC to study the possible support of tree display for relation form fields

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published