mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added alt text to image formatter in bootstrap tables
This commit is contained in:
parent
9a2ee2638b
commit
a8f6bbd86a
|
@ -250,7 +250,7 @@
|
|||
item_icon = 'fa-map-marker';
|
||||
}
|
||||
|
||||
return '<nobr><a href="{{ url('/') }}/' + item_destination +'/' + value.id + '" data-tooltip="true" title="' + value.type + '"><i class="fa ' + item_icon + ' text-blue"></i> ' + value.name + '</a></nobr>';
|
||||
return '<nobr><a href="{{ url('/') }}/' + item_destination +'/' + value.id + '" data-tooltip="true" title="' + value.type + '"><i class="fa ' + item_icon + ' text-{{ $snipeSettings->skin!='' ? $snipeSettings->skin : 'blue' }} "></i> ' + value.name + '</a></nobr>';
|
||||
|
||||
} else {
|
||||
return '';
|
||||
|
@ -527,9 +527,19 @@
|
|||
}
|
||||
|
||||
|
||||
function imageFormatter(value) {
|
||||
function imageFormatter(value, row) {
|
||||
|
||||
|
||||
|
||||
if (value) {
|
||||
return '<a href="' + value + '" data-toggle="lightbox" data-type="image"><img src="' + value + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive"></a>';
|
||||
|
||||
if (row.name) {
|
||||
var altName = row.name;
|
||||
}
|
||||
else if ((row) && (row.model)) {
|
||||
var altName = row.model.name;
|
||||
}
|
||||
return '<a href="' + value + '" data-toggle="lightbox" data-type="image"><img src="' + value + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive" alt="' + altName + '"></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue