Skip to content

Commit b729037

Browse files
committed
provide support for Backpack v6
1 parent 8958794 commit b729037

File tree

4 files changed

+21
-61
lines changed

4 files changed

+21
-61
lines changed

composer.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,18 @@
1212
"homepage": "https://github.com/laravel-backpack/revise-operation",
1313
"keywords": [
1414
"Laravel", "ReviseOperation", "Backpack", "Backpack for Laravel", "Backpack Operation",
15-
"Backpack Add-On", "Admin Panel", "Admin Interface", "Revision History", "Audit Log",
15+
"Backpack Add-On", "Admin Panel", "Admin Interface", "Revision History", "Audit Log",
1616
"Revisionable", "Revisions"
1717
],
1818
"require": {
19-
"backpack/crud": "^4.0|^5.0",
19+
"backpack/crud": "^6.0",
2020
"venturecraft/revisionable": "1.*"
2121
},
22-
"require-dev": {
23-
"phpunit/phpunit": "^8.0",
24-
"mockery/mockery": "^1.1",
25-
"orchestra/testbench": "~3|~4",
26-
"sempro/phpunit-pretty-print": "^1.0"
27-
},
2822
"autoload": {
2923
"psr-4": {
3024
"Backpack\\ReviseOperation\\": "src/"
3125
}
3226
},
33-
"autoload-dev": {
34-
"psr-4": {
35-
"Backpack\\ReviseOperation\\Tests\\": "tests"
36-
}
37-
},
3827
"extra": {
3928
"laravel": {
4029
"providers": [

phpunit.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

resources/views/revision_timeline.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
<div id="timeline">
33
@foreach($revisions as $revisionDate => $dateRevisions)
4-
<h5 class="text-primary">
5-
{{ Carbon\Carbon::parse($revisionDate)->isoFormat(config('backpack.base.default_date_format')) }}
6-
</h5>
4+
<h3 class="text-primary">
5+
{{ Carbon\Carbon::parse($revisionDate)->isoFormat(config('backpack.ui.default_date_format')) }}
6+
</h3>
77

88
@foreach($dateRevisions as $history)
9-
<div class="card timeline-item-wrap">
9+
<div class="card timeline-item-wrap mb-3">
1010

1111
@if($history->key == 'created_at' && !$history->old_value)
1212
<div class="card-header">
@@ -17,7 +17,7 @@
1717
<div class="card-header">
1818
<strong class="time"><i class="la la-clock"></i> {{ date('h:ia', strtotime($history->created_at)) }}</strong> -
1919
{{ $history->userResponsible()?$history->userResponsible()->name:trans('revise-operation::revise.guest_user') }} {{ trans('revise-operation::revise.changed_the') }} {{ $history->fieldName() }}
20-
<div class="card-header-actions">
20+
<div class="card-header-actions ms-1 float-end">
2121
<form class="card-header-action" method="post" action="{{ url(\Request::url().'/'.$history->id.'/restore') }}">
2222
{!! csrf_field() !!}
2323
<button type="submit" class="btn btn-outline-danger btn-sm restore-btn" data-entry-id="{{ $entry->id }}" data-revision-id="{{ $history->id }}" onclick="onRestoreClick(event)">

resources/views/revisions.blade.php

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@
1515
@endphp
1616

1717
@section('header')
18-
<div class="container-fluid">
19-
<h2>
20-
<span class="text-capitalize">{!! $heading !!}</span>
21-
<small>{!! $subheading !!}.</small>
22-
23-
@if ($crud->hasAccess('list'))
24-
<small><a href="{{ url($crud->route) }}" class="hidden-print font-sm"><i class="la la-angle-double-left"></i> {{ trans('backpack::crud.back_to_all') }} <span>{{ $crud->entity_name_plural }}</span></a></small>
25-
@endif
26-
</h2>
27-
</div>
18+
<section class="header-operation container-fluid animated fadeIn d-flex mb-2 align-items-end" bp-section="page-header">
19+
<h1 bp-section="page-heading" class="text-capitalize mb-2">
20+
{!! $heading !!}
21+
</h1>
22+
<p class="ms-2 ml-2 mb-2" bp-section="page-subheading">
23+
{!! $subheading !!}.
24+
</p>
25+
@if ($crud->hasAccess('list'))
26+
<p class="ms-2 ml-2 mb-2" bp-section="page-subheading-back-button">
27+
<small><a href="{{ url($crud->route) }}" class="hidden-print font-sm"><i class="la la-angle-double-left"></i> {{
28+
trans('backpack::crud.back_to_all') }} <span>{{ $crud->entity_name_plural }}</span></a></small>
29+
</p>
30+
@endif
31+
</section>
2832
@endsection
2933

3034
@section('content')
@@ -44,14 +48,3 @@
4448
</div>
4549
</div>
4650
@endsection
47-
48-
49-
@section('after_styles')
50-
<link rel="stylesheet" href="{{ asset('packages/backpack/crud/css/crud.css') }}">
51-
<link rel="stylesheet" href="{{ asset('packages/backpack/crud/css/revisions.css') }}">
52-
@endsection
53-
54-
@section('after_scripts')
55-
<script src="{{ asset('packages/backpack/crud/js/crud.js') }}"></script>
56-
<script src="{{ asset('packages/backpack/crud/js/revisions.js') }}"></script>
57-
@endsection

0 commit comments

Comments
 (0)