From e5b0f0670e72ae5bb677fff0ac6b7a684de86221 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 11 Feb 2020 15:53:02 +0100 Subject: [PATCH] Extract sidebar and footer to separate templates --- app/Http/Controllers/BasePageController.php | 4 + resources/views/themes/Gentele/basepage.tpl | 259 ++++++-------------- resources/views/themes/Gentele/footer.tpl | 9 + resources/views/themes/Gentele/sidebar.tpl | 101 ++++++++ 4 files changed, 192 insertions(+), 181 deletions(-) diff --git a/app/Http/Controllers/BasePageController.php b/app/Http/Controllers/BasePageController.php index d741dc824..89c58e6e1 100644 --- a/app/Http/Controllers/BasePageController.php +++ b/app/Http/Controllers/BasePageController.php @@ -300,6 +300,10 @@ class BasePageController extends Controller $this->smarty->assign('header_menu', $header_menu); $notification = $this->smarty->fetch('notification.tpl'); $this->smarty->assign('notification', $notification); + $sidebar = $this->smarty->fetch('sidebar.tpl'); + $this->smarty->assign('sidebar', $sidebar); + $footer = $this->smarty->fetch('footer.tpl'); + $this->smarty->assign('footer', $footer); } /** diff --git a/resources/views/themes/Gentele/basepage.tpl b/resources/views/themes/Gentele/basepage.tpl index 99a3b8cf4..9b610465d 100755 --- a/resources/views/themes/Gentele/basepage.tpl +++ b/resources/views/themes/Gentele/basepage.tpl @@ -2,195 +2,92 @@ - - - + + + - {$meta_title}{if $meta_title != "" && $site->metatitle != ""} - {/if}{$site->metatitle} - {{Html::style("{{asset('/assets/css/all-css.css')}}")}} + {$meta_title}{if $meta_title != "" && $site->metatitle != ""} - {/if}{$site->metatitle} + {{Html::style("{{asset('/assets/css/all-css.css')}}")}}
-
-
-
- -
- - {if Auth::check()} -
-
- User Image -
-
- Welcome, -

{{Auth::user()->username}}

-
-
- {/if} - -
-
- - - -
-
- - {if Auth::check()} -
- -
- {/if} - +
+
+
+ +
+ + {if Auth::check()} +
+
+ User Image +
+
+ Welcome, +

{{Auth::user()->username}}

+
+
+ {/if} + +
+
+ + - -
-
-
-
- {$notification} - {$content} -
-
-
-
- -
+ +
+
+ + {if Auth::check()} +
+ +
+ {/if} + + + +
+
+
+
+ {$notification} + {$content} +
+
+
+
+ +
- +{$footer} diff --git a/resources/views/themes/Gentele/footer.tpl b/resources/views/themes/Gentele/footer.tpl index e69de29bb..b9d74c014 100644 --- a/resources/views/themes/Gentele/footer.tpl +++ b/resources/views/themes/Gentele/footer.tpl @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/resources/views/themes/Gentele/sidebar.tpl b/resources/views/themes/Gentele/sidebar.tpl index e69de29bb..f533b0e1c 100644 --- a/resources/views/themes/Gentele/sidebar.tpl +++ b/resources/views/themes/Gentele/sidebar.tpl @@ -0,0 +1,101 @@ + + + + + + + + Sign Out + \ No newline at end of file