LePatron.email icon indicating copy to clipboard operation
LePatron.email copied to clipboard

Custom block

Open the2ne opened this issue 3 years ago • 1 comments

Description

As a user of LePatron, I want to be able to save an existing block after customising it, so that I can add it to my predefined block library and reuse it.

Rules

New custom block

Custom blocks are created from existing blocks after they have been modified (in the central part of the editor)

Custom block attributes

  • Name
    • defined by user at creation
    • editable by admin group
  • Category
    • defined by user at creation
    • editable by admin group
  • Creator (user name)
  • Preview image (generated when block is saved)

Custom block creation

from the central block, when editing, add a save button (top right, same as duplication Use Font Awesome for pictograms). At submit, open a panel with attributes settings :

  • name (mandatory)
  • category (optional)

cta-save

Custom blocks library

In the sidebar (left column) we have access to a library of blocks. It contains two tabs in order to distinguish the default blocks of the master template from those created by the users (custom blocks).

Default blocks tab (active)

tab-default

Custom blocks tab (active)

tab-custom

Custom blocks actions

in the custom blocks tab, we have two additional actions:

  • Edit button: name and category image (role: only Group admin)
  • Delete button with confirmation (role: only Group admin )
  • The name of the block is displayed over the preview in the list of available blocks

custom-actions

Custom block edition

in the modalbox, after clicking on the edit button of the block

  • Input text for the name
  • Input text for the category
  • don't change the associated user name

edit-attributes

Custom blocks sort

In the custom block library, have a "full text" search field. I can filter blocks by :

  • name
  • category
  • user name

the2ne avatar Jun 14 '21 14:06 the2ne