Ticket #528 (closed Task: fixed)

Opened 7 years ago

Last modified 7 years ago

how to: suppress default topic-command "Edit" button

Reported by: Malte Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc:
Complexity: 3 Area:
Module:

Description

I dont the "Edit"-Button to be rendered (neither in the Page Panel nor in the Context-Menu) cause my Topic repesents remotely stored information which cannot be edited from within DM. Is there a mechanism to do that or do I just manipulate the DOM?

Thanks for the hint.

Change History

comment:1 Changed 7 years ago by jri

In the type's View Configuration you could set the "Locked" setting to true. The instances of locked types are not editable in principal, regardless of access control.

You can do this either interactively, programmatically (in a migration), or declaratively (in a migration). As a declarative example see the "File" type (part of the Files module), which is not editable:

{
    topic_types: [
        {
            value: "File",
            uri: "dm4.files.file",
            data_type_uri: "dm4.core.composite",
            ...
            view_config_topics: [
                {
                    type_uri: "dm4.webclient.view_config",
                    composite: {
                        dm4.webclient.locked: true
                    }
                }
            ]
        }
    ]
}

Does this help with your case?

comment:2 Changed 7 years ago by Malte

  • Status changed from new to closed
  • Resolution set to fixed

Ah yes, I forgot about that. This did the trick. Thank you very much.

Note: See TracTickets for help on using tickets.