Note saving, revert buttons in review page

This commit is contained in:
2018-08-11 11:02:56 +02:00
parent b1d1fa4880
commit 58c28b776b
10 changed files with 184 additions and 51 deletions
+43 -7
View File
@@ -37,15 +37,27 @@
@if($anyRowChanges)
@if($numChangedRows)
<div class="text-info"><b>{{ $numChangedRows }}</b> changed</div>
<div class="text-info">
<b>{{ $numChangedRows }}</b> changed
<a href="{{$table->draftUpdateRoute}}?action=reset.row-update" class="ml-2"
data-confirm="Revert all row changes?">Reset</a>
</div>
@endif
@if($numNewRows)
<div class="text-success"><b>{{ $numNewRows }}</b> new</div>
<div class="text-success">
<b>{{ $numNewRows }}</b> new
<a href="{{$table->draftUpdateRoute}}?action=reset.row-add" class="ml-2"
data-confirm="Discard all added rows?">Reset</a>
</div>
@endif
@if($numRemovedRows)
<div class="text-danger"><b>{{ $numRemovedRows }}</b> removed</div>
<div class="text-danger">
<b>{{ $numRemovedRows }}</b> removed
<a href="{{$table->draftUpdateRoute}}?action=reset.row-remove" class="ml-2"
data-confirm="Undo row removals?">Reset</a>
</div>
@endif
@else
@@ -62,19 +74,35 @@
@if($anyColChanges)
@if($numChangedColumns)
<div class="text-info"><b>{{ $numChangedColumns }}</b> changed</div>
<div class="text-info">
<b>{{ $numChangedColumns }}</b> changed
<a href="{{$table->draftUpdateRoute}}?action=reset.col-update" class="ml-2"
data-confirm="Revert all column changes?">Reset</a>
</div>
@endif
@if($numNewColumns)
<div class="text-success"><b>{{ $numNewColumns }}</b> new</div>
<div class="text-success">
<b>{{ $numNewColumns }}</b> new
<a href="{{$table->draftUpdateRoute}}?action=reset.col-add" class="ml-2"
data-confirm="Discard all added columns?">Reset</a>
</div>
@endif
@if($numRemovedColumns)
<div class="text-danger"><b>{{ $numRemovedColumns }}</b> removed</div>
<div class="text-danger">
<b>{{ $numRemovedColumns }}</b> removed
<a href="{{$table->draftUpdateRoute}}?action=reset.col-remove" class="ml-2"
data-confirm="Undo column removals?">Reset</a>
</div>
@endif
@if($colsReordered)
<div class="text-info">Order changed</div>
<div class="text-info">
Order changed
<a href="{{$table->draftUpdateRoute}}?action=reset.col-order" class="ml-2"
data-confirm="Reset column order changes?">Reset</a>
</div>
@endif
@else
@@ -109,3 +137,11 @@
</div>
</div>
@stop
@push('scripts')
<script>
ready(function () {
app.DraftNotePage(@json($table->draftUpdateRoute))
})
</script>
@endpush