Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14529

Channel Manager - developer option to disable the Component Delete button

    XMLWordPrintable

Details

    • New Feature
    • Status: Open
    • High
    • Resolution: Unresolved
    • None
    • None
    • None
    • Orion
    • BrXM Backlog

    Description

      It would be great if a developer may set a container item component node to "non-deletable".

      An example, candidate solution idea (as a low-hanging fruit possibly) is as follows:

      1. Add a new property to the hst:containeritemcomponent node type:
        [hst:containeritemcomponent] > hst:abstractcomponent
          orderable
          //...
          - hst:deletedisabled (boolean) // false by default
        
      2. The channel manager code for the editComponentMainController.js can check the property, hst:deletedisabled, and if it's set to true, then the UI js code simply disable the "Delete" button. For example,
        brxm/community/channel-manager/frontend-ng/src/app/channel/sidePanels/rightSidePanel/editComponent/editComponentMain/editComponentMain.controller.js
          // The existing function to disable the delete button for some other cases.
          isDeleteDisabled() { 
            // TODO: check the hst:deletedisabled property too to disable the deletion if set to true.
            return this.isReadOnly() || !this.EditComponentService.isReadyForUser();
          }
        

      This simple improvement provides great solutions to many many real use cases:

      • Editors may not delete a core component in the component container area but they may do for other components, even changing the orders.
      • The flag property, hst:deletedisabled, can be set only by developers, not to allow an accidental mistakes by users to delete a core components while editing others in the same container area.

      Attachments

        Issue Links

          Activity

            People

              deniz.ergun Deniz Ergun
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: