This commit is contained in:
Klaus J. Mueller 2021-11-22 17:58:26 +01:00
parent b058d84f2c
commit a85fa14f9c

View file

@ -145,7 +145,7 @@
function genericRowLinkFormatter(destination) {
return function (value,row) {
if (value) {
return '<a href="{{ url('/') }}/' + destination + '/' + row.id + '"> ' + value + '</a>';
return '<a href="{{ url('/') }}/' + destination + '/' + row.id + '">' + value + '</a>';
}
};
}
@ -196,7 +196,7 @@
var dpolymorphicItemFormatterest = 'fields/';
}
return '<nobr><a href="{{ url('/') }}/' + dpolymorphicItemFormatterest + dest + '/' + value.id + '"> ' + value.name + '</a></span>';
return '<nobr><a href="{{ url('/') }}/' + dpolymorphicItemFormatterest + dest + '/' + value.id + '">' + value.name + '</a></span>';
}
};
}
@ -466,7 +466,7 @@
if (value) {
var groups = '';
for (var index in value.rows) {
groups += '<a href="{{ url('/') }}/admin/groups/' + value.rows[index].id + '" class="label label-default"> ' + value.rows[index].name + '</a> ';
groups += '<a href="{{ url('/') }}/admin/groups/' + value.rows[index].id + '" class="label label-default">' + value.rows[index].name + '</a> ';
}
return groups;
}
@ -495,20 +495,20 @@
function deployedLocationFormatter(row, value) {
if ((row) && (row!=undefined)) {
return '<a href="{{ url('/') }}/locations/' + row.id + '"> ' + row.name + '</a>';
return '<a href="{{ url('/') }}/locations/' + row.id + '">' + row.name + '</a>';
} else if (value.rtd_location) {
return '<a href="{{ url('/') }}/locations/' + value.rtd_location.id + '" data-toggle="tooltip" title="Default Location"> ' + value.rtd_location.name + '</a>';
return '<a href="{{ url('/') }}/locations/' + value.rtd_location.id + '" data-toggle="tooltip" title="Default Location">' + value.rtd_location.name + '</a>';
}
}
function groupsAdminLinkFormatter(value, row) {
return '<a href="{{ url('/') }}/admin/groups/' + row.id + '"> ' + value + '</a>';
return '<a href="{{ url('/') }}/admin/groups/' + row.id + '">' + value + '</a>';
}
function assetTagLinkFormatter(value, row) {
if ((row.asset) && (row.asset.id)) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.asset_tag + '</a>';
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '">' + row.asset.asset_tag + '</a>';
}
return '';
@ -516,14 +516,14 @@
function departmentNameLinkFormatter(value, row) {
if ((row.assigned_user) && (row.assigned_user.department) && (row.assigned_user.department.name)) {
return '<a href="{{ url('/') }}/department/' + row.assigned_user.department.id + '"> ' + row.assigned_user.department.name + '</a>';
return '<a href="{{ url('/') }}/department/' + row.assigned_user.department.id + '">' + row.assigned_user.department.name + '</a>';
}
}
function assetNameLinkFormatter(value, row) {
if ((row.asset) && (row.asset.name)) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.name + '</a>';
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '">' + row.asset.name + '</a>';
}
}
@ -550,31 +550,31 @@
function emailFormatter(value) {
if (value) {
return '<a href="mailto:' + value + '"> ' + value + '</a>';
return '<a href="mailto:' + value + '">' + value + '</a>';
}
}
function linkFormatter(value) {
if (value) {
return '<a href="' + value + '"> ' + value + '</a>';
return '<a href="' + value + '">' + value + '</a>';
}
}
function assetCompanyFilterFormatter(value, row) {
if (value) {
return '<a href="{{ url('/') }}/hardware/?company_id=' + row.id + '"> ' + value + '</a>';
return '<a href="{{ url('/') }}/hardware/?company_id=' + row.id + '">' + value + '</a>';
}
}
function assetCompanyObjFilterFormatter(value, row) {
if ((row) && (row.company)) {
return '<a href="{{ url('/') }}/hardware/?company_id=' + row.company.id + '"> ' + row.company.name + '</a>';
return '<a href="{{ url('/') }}/hardware/?company_id=' + row.company.id + '">' + row.company.name + '</a>';
}
}
function usersCompanyObjFilterFormatter(value, row) {
if (value) {
return '<a href="{{ url('/') }}/users/?company_id=' + row.id + '"> ' + value + '</a>';
return '<a href="{{ url('/') }}/users/?company_id=' + row.id + '">' + value + '</a>';
} else {
return value;
}
@ -583,13 +583,13 @@
function employeeNumFormatter(value, row) {
if ((row) && (row.assigned_to) && ((row.assigned_to.employee_number))) {
return '<a href="{{ url('/') }}/users/' + row.assigned_to.id + '"> ' + row.assigned_to.employee_number + '</a>';
return '<a href="{{ url('/') }}/users/' + row.assigned_to.id + '">' + row.assigned_to.employee_number + '</a>';
}
}
function orderNumberObjFilterFormatter(value, row) {
if (value) {
return '<a href="{{ url('/') }}/hardware/?order_number=' + row.order_number + '"> ' + row.order_number + '</a>';
return '<a href="{{ url('/') }}/hardware/?order_number=' + row.order_number + '">' + row.order_number + '</a>';
}
}