nova-tab icon indicating copy to clipboard operation
nova-tab copied to clipboard

Add title to ressource edit

Open bernhardh opened this issue 6 years ago • 2 comments

The default title of a ressource edit view is "Edit RESSOURCE_NAME". So if you would edit an artikel you see "Edit Article", but you don't know, which article you are currently editing. Normally you would have a field like Text::make("name") or Text::make("title") to identify your article. But if you are using tabs, you see this "name"-field only in one tab. Let me illustrate it by an example:

I have 5 tabs. If you are on the first one, you see the "Name" Field and know which article you are currently editing:

image

But if you switch to another tab, you can't see the name of the article anymore:

image

Is there maybe a way, to add the name of the ressource somewhere, where it is visible every time, somehow like so:

image

bernhardh avatar Oct 17 '18 15:10 bernhardh

This should be possible by overriding label method in your resource class.

shabbirbharmal avatar Oct 18 '18 14:10 shabbirbharmal

I don't think this is possible - how should that work? The public static function label is a static method. So you don't have access to the model data itself, so no access to the model name/title field.

bernhardh avatar Oct 18 '18 15:10 bernhardh