File tree 2 files changed +15
-6
lines changed
formwidgets/logbook/partials
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 34
34
< ?php if ($changes-> isTypeUpdated()): ?>
35
35
: < br />
36
36
< ?php foreach ($changes-> getChangedAttributes() as $attribute): ?>
37
- < ?= e(trans('jacob.logbook::lang.changes.column', [
37
+ < ?php
38
+ $from = $currentModel-> changeLogBookDisplayValue($attribute-> getColumn(), $attribute-> getOld()) ?? '-';
39
+ $from = $from instanceof Illuminate\Contracts\Support\Htmlable ? $from-> toHtml() : e($from);
40
+
41
+ $to = $currentModel-> changeLogBookDisplayValue($attribute-> getColumn(), $attribute-> getNew()) ?? '-';
42
+ $to = $from instanceof Illuminate\Contracts\Support\Htmlable ? $to-> toHtml() : e($to);
43
+ ?>
44
+
45
+ < ?= trans('jacob.logbook::lang.changes.column', [
38
46
'column' => trans($currentModel-> changeLogBookDisplayColumn($attribute-> getColumn())),
39
- 'from' => $currentModel- > changeLogBookDisplayValue($attribute- > getColumn(), $attribute- > getOld()) ?? '-' ,
40
- 'to' => $currentModel- > changeLogBookDisplayValue($attribute- > getColumn(), $attribute- > getNew()) ?? '-'
41
- ])) ?>
42
- < br />
47
+ 'from' => $from ,
48
+ 'to' => $to
49
+ ]) ?>
50
+ < br />
43
51
< ?php endforeach ?>
44
52
< ?php endif; ?>
45
53
</ td >
Original file line number Diff line number Diff line change 5
5
use Backend \Classes \AuthManager ;
6
6
use Backend \Models \User ;
7
7
use Illuminate \Contracts \Pagination \LengthAwarePaginator ;
8
+ use Illuminate \Contracts \Support \Htmlable ;
8
9
use Jacob \LogBook \Classes \LoadRelation ;
9
10
use Jacob \Logbook \Models \Log ;
10
11
use Jacob \LogBook \Classes \Entities \Attribute ;
@@ -62,7 +63,7 @@ trait LogChanges
62
63
*
63
64
* @param $column
64
65
* @param $value
65
- * @return string
66
+ * @return string|Htmlable
66
67
*/
67
68
public static function changeLogBookDisplayValue ($ column , $ value )
68
69
{
You can’t perform that action at this time.
0 commit comments