|
@@ -37,7 +37,7 @@ discard block |
|
|
block discarded – undo |
|
37
|
37
|
$translation = $translation->translate($request->get('locale')); |
|
38
|
38
|
|
|
39
|
39
|
if (null === $translation) { |
|
40
|
|
- return response()->json(['<tr><td>' . trans('translation::translations.No Revisions yet') . '</td></tr>']); |
|
|
40
|
+ return response()->json([ '<tr><td>' . trans('translation::translations.No Revisions yet') . '</td></tr>' ]); |
|
41
|
41
|
} |
|
42
|
42
|
|
|
43
|
43
|
return response()->json($this->formatRevisionHistory($translation->revisionHistory)); |
|
@@ -45,12 +45,12 @@ discard block |
|
|
block discarded – undo |
|
45
|
45
|
|
|
46
|
46
|
private function formatRevisionHistory(Collection $revisionHistory) |
|
47
|
47
|
{ |
|
48
|
|
- $formattedHistory = []; |
|
|
48
|
+ $formattedHistory = [ ]; |
|
49
|
49
|
|
|
50
|
50
|
foreach ($revisionHistory as $history) { |
|
51
|
51
|
$timeAgo = $history->created_at->diffForHumans(); |
|
52
|
|
- $revertRoute = route('admin.translation.translation.update', [$history->revisionable_id, 'oldValue' => $history->oldValue()]); |
|
53
|
|
- $formattedHistory[] = <<<HTML |
|
|
52
|
+ $revertRoute = route('admin.translation.translation.update', [ $history->revisionable_id, 'oldValue' => $history->oldValue() ]); |
|
|
53
|
+ $formattedHistory[ ] = <<<HTML |
|
54
|
54
|
<tr> |
|
55
|
55
|
<td>{$history->oldValue()}</td> |
|
56
|
56
|
<td>{$history->userResponsible()->first_name} {$history->userResponsible()->last_name}</td> |
Please login to merge, or discard this patch.