add item link

This commit is contained in:
Matthias 2021-11-28 01:33:13 +01:00
parent 7d71a04eaa
commit a57c634cfd
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -58,6 +58,20 @@ function loadNotificationTable(table, options={}) {
title: '{% trans "Category" %}',
sortable: 'true',
},
{
field: 'target',
title: '{% trans "Item" %}',
sortable: 'true',
formatter: function(value, row, index, field) {
if (value == null) {
return '';
}
var html = `${value.model}: ${value.name}`;
if (value.link ) {html = `<a href='${value.link}'>${html}</a>`;}
return html;
}
},
{
field: 'name',
title: '{% trans "Name" %}',