Skip to content

A free open source IT asset/license management system

New link formatter for BS tables

snipef233bd2d01bc
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php
index 585d53c6ce..3bcab6f5dd 100644
--- a/resources/views/partials/bootstrap-table.blade.php
+++ b/resources/views/partials/bootstrap-table.blade.php
@@ -2154,6 +2154,14 @@
}
}
+ function companiesLinkObjFormatter(value, row) {
+ if (!value) {
+ return '';
+ }
+ var icon = (value.tag_color) ? '<i class="fa-solid fa-square" style="color: ' + value.tag_color + ';" aria-hidden="true"></i> ' : '';
+ return '<a href="{{ config('app.url') }}/companies/' + value.id + '" class="label label-light">' + icon + value.name + '</a>';
+ }
+
function companiesArrayLinkFormatter(value, row) {
if (!value || !value.length) {
return '';