From: Vincent Vanwaelscappel Date: Tue, 7 Nov 2023 16:48:11 +0000 (+0100) Subject: wait #6458 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=16609d9ad033955896cd43be6186949f96b9c33c;p=pmi.git wait #6458 @1.5 --- diff --git a/resources/views/vendor/backpack/crud/reorder.blade.php b/resources/views/vendor/backpack/crud/reorder.blade.php new file mode 100644 index 0000000..bd2dee3 --- /dev/null +++ b/resources/views/vendor/backpack/crud/reorder.blade.php @@ -0,0 +1,186 @@ +@extends('backpack::layout') + +@section('header') +
+

+ {!! $crud->getHeading() ?? $crud->entity_name_plural !!} + {!! $crud->getSubheading() ?? trans('backpack::crud.reorder').' '.$crud->entity_name_plural !!} + . +

+ +
+@endsection + +@section('content') + tree_element_shown)) { + // mark the element as shown + $all_entries[$key]->tree_element_shown = true; + $entry->tree_element_shown = true; + + // show the tree element + echo '
  • '; + echo '
    ' . object_get($entry, $crud->reorder_label) . '
    '; + + // see if this element has any children + $children = []; + foreach ($all_entries as $key => $subentry) { + if ($subentry->parent_id == $entry->getKey()) { + $children[] = $subentry; + } + } + + $children = collect($children)->sortBy('lft'); + + // if it does have children, show them + if (count($children)) { + echo '
      '; + foreach ($children as $key => $child) { + $children[$key] = tree_element($child, $child->getKey(), $all_entries, $crud); + } + echo '
    '; + } + echo '
  • '; + } + + return $entry; + } + + ?> + + @if ($crud->hasAccess('list')) + {{ trans('backpack::crud.back_to_all') }} + {{ $crud->entity_name_plural }} + @endif + +
    +
    + +
    + +
    + +
    +
    +

    {{ trans('backpack::crud.reorder_text') }}

    + +
      + all())->sortBy('lft')->keyBy($crud->getModel()->getKeyName()); + $root_entries = $all_entries->filter(function ($item) { + return $item->parent_id == 0; + }); + foreach ($root_entries as $key => $entry) { + $root_entries[$key] = tree_element($entry, $key, $all_entries, $crud); + } + ?> +
    +
    +
    + + + +
    + +
    +
    +
    +@endsection + + +@section('after_styles') + + + +@endsection + +@section('after_scripts') + + + + + + +@endsection