sukreet
(Sukreet Roy Choudhury)
October 21, 2019, 5:36am
1
Hi All,
We are trying to group some links based on functionality for which we are trying to use a custom widget.
We have configured a custom widget to show a few links on a dashboard and there is a privilege check at a widget level.
The configuration used looks something like -
{
"id": "customLinks",
"label": "widget lable",
"icon": "icon-link",
"order": 10,
"extensions": [
{
"id": "customLinks.clinicianDashboardSecondColumn",
"appId": "customLinks",
"extensionPointId": "formsDashboard.secondColumnFragments",
"extensionParams": {
"fragment": "dashboardwidgets/customLinksWidget"
}
}
],
"config": {
"links": {
"Link One Title": "<the actual link>",
"Link two Title": "<the actual link>"
}
}
}
And I have a couple of questions around this.
Is there a way to show/hide links inside a widget based on privilege?
Is it possible to translate the link title?
Thanks.
@rrameshbtech @mksd @mddubey
mksd
(Dimitri R)
October 21, 2019, 10:12am
2
Hi @sukreet ,
The config provides the link titles to the widget, but not the links themselves? Then where are those configured?
About 2., of course you could localize the links titles, but it depends on the technology used for your widget. Is this GSP?
And same remark about 1., whether your new widget displays something based on some criteria is up to the implementation that you give to it.
sukreet
(Sukreet Roy Choudhury)
October 22, 2019, 5:26am
3
Hi @mksd ,
The links section in the config contains key value pairs, where the key is the link title and value is the url it points to.
There is a corresponding gsp for the custom links widget define here .
mksd
(Dimitri R)
October 22, 2019, 2:01pm
4
Oh I see, well it looks like this widget will have to modified so that:
By default the links show for the user carrying the widget’s privilege.
Each link can also be protected by its own ad-hoc privilege, overriding the default.
sukreet
(Sukreet Roy Choudhury)
November 5, 2019, 6:23am
5
@mksd
We have created the card for translation of the link title and added you as a watcher.
Can you please move the card and assign it to me .