diff --git a/docs/src/content/docs/reference/views/models/global-actions.md b/docs/src/content/docs/reference/views/models/global-actions.md index ef5ca82..3d6d314 100644 --- a/docs/src/content/docs/reference/views/models/global-actions.md +++ b/docs/src/content/docs/reference/views/models/global-actions.md @@ -40,6 +40,23 @@ Here is the code needed to add those two buttons to the user interface return { message: 'Suppression effectuée' } }, }, + { + type: 'link', + name: 'link-to-filtered-ideas', + tooltip: 'Voir les idées filtrées', + icon: 'link', + iconColor: 'blue', + href: '/backoffice/models/Idea?pageIndex=2&pageSize=5', + }, + { + type: 'link', + name: 'link-to-google', + tooltip: 'Voir Google', + icon: 'brand-google', + iconColor: 'green', + href: 'https://www.google.com', + openInNewTab: true, + }, ] } ``` @@ -70,8 +87,14 @@ You can browse the list of available icons at: https://tabler.io/icons Color of the icon, this will be passed as the css color property, so you can use any valid css color +### type + +Must be one of `backend-action` or `link` + ### action +Only when type = `backend-action` + Function to execute when the action is triggered It will be called with the http context as a parameter @@ -95,3 +118,21 @@ return response.badRequest({ error: 'Error message' }) ``` ::: + +### href + +Only when type = `link` + +Link to open, this can be a relative or absolute link + +e.g. `/backoffice/models/Idea?pageIndex=2&pageSize=5` and `https://www.google.com` will both work + +### openInNewTab + +Only when type = `link` + +Whether or not to open the link in a new tab + +:::tip +You can use a `link` action to show pre-filtered Model views +::: diff --git a/docs/src/content/docs/reference/views/models/instance-actions.md b/docs/src/content/docs/reference/views/models/instance-actions.md index 1e62e6b..ed6622b 100644 --- a/docs/src/content/docs/reference/views/models/instance-actions.md +++ b/docs/src/content/docs/reference/views/models/instance-actions.md @@ -62,8 +62,14 @@ You can browse the list of available icons at: https://tabler.io/icons Color of the icon, this will be passed as the css color property, so you can use any valid css color +### type + +Must be one of `backend-action` or `link` + ### action +Only when type = `backend-action` + Function to execute when the action is triggered It will be called with the http context as a parameter @@ -97,3 +103,21 @@ return response.badRequest({ error: 'Error message' }) ``` ::: + +### href + +Only when type = `link` + +Link to open, this can be a relative or absolute link + +e.g. `/backoffice/models/Idea?pageIndex=2&pageSize=5` and `https://www.google.com` will both work + +### openInNewTab + +Only when type = `link` + +Whether or not to open the link in a new tab + +:::tip +You can use a `link` action to show pre-filtered Model views +:::