From 98dc6601fe83e43fcc37eaaedbf4d105c3ed51df Mon Sep 17 00:00:00 2001 From: purple Date: Thu, 20 Jul 2023 17:26:09 +0200 Subject: [PATCH] Add admin wrapper. Behaves similarly to dashboard wrapper. --- blueprint.sh | 6 ++++++ blueprint/data/internal/build/init/conf.yml | 1 + resources/views/layouts/admin.blade.php | 1 + 3 files changed, 8 insertions(+) diff --git a/blueprint.sh b/blueprint.sh index 3e5cd64..ae480a4 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -220,6 +220,7 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then admin_view=$conf_admin_view; admin_controller=$conf_admin_controller; #(optional) admin_css=$conf_admin_css; #(optional) + admin_wrapper=$conf_admin_wrapper; #(optional) dashboard_wrapper=$conf_dashboard_wrapper; #(optional) @@ -423,6 +424,11 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then sed -i "/<\!-- wrapper:insert -->/r .blueprint/tmp/$n/$dashboard_wrapper" resources/views/templates/wrapper.blade.php; fi; + # insert "admin_wrapper" into admin.blade.php + if [[ $dashboard_wrapper != "" ]]; then + sed -i "/<\!-- wrapper:insert -->/r .blueprint/tmp/$n/$admin_wrapper" resources/views/layouts/admin.blade.php; + fi; + rm .blueprint/data/internal/build/extensions/admin.blade.php.bak; if [[ $admin_controller == "" ]]; then rm .blueprint/data/internal/build/extensions/controller.php.bak; diff --git a/blueprint/data/internal/build/init/conf.yml b/blueprint/data/internal/build/init/conf.yml index 69844ef..40473c5 100644 --- a/blueprint/data/internal/build/init/conf.yml +++ b/blueprint/data/internal/build/init/conf.yml @@ -16,6 +16,7 @@ admin: view: "view.blade.php" controller: "" css: "" + wrapper: "" dashboard: wrapper: "" diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 42e3850..85267b7 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -235,4 +235,5 @@ @show +