Add admin wrapper. Behaves similarly to dashboard wrapper.

This commit is contained in:
purple 2023-07-20 17:26:09 +02:00
parent 6146d6b655
commit 98dc6601fe
3 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -16,6 +16,7 @@ admin:
view: "view.blade.php"
controller: ""
css: ""
wrapper: ""
dashboard:
wrapper: ""

View file

@ -235,4 +235,5 @@
</script>
@show
</body>
<!-- wrapper:insert -->
</html>