From a8589433382a236968a97ba755b03bbdd595c4bf Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 23 Jan 2014 00:25:33 +0100 Subject: [PATCH] =?UTF-8?q?sidebar=20s=C3=A9par=C3=A9e=20du=20reste=20des?= =?UTF-8?q?=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/lib/DNSManager.pm | 4 +--- www/views/administration.tt | 23 +------------------- www/views/details.tt | 19 +---------------- www/views/home.tt | 16 +------------- www/views/index.tt | 36 +------------------------------ www/views/sidebar.tt | 42 +++++++++++++++++++++++++++++++++++++ www/views/subscribe.tt | 16 +------------- 7 files changed, 48 insertions(+), 108 deletions(-) create mode 100644 www/views/sidebar.tt diff --git a/www/lib/DNSManager.pm b/www/lib/DNSManager.pm index b834613..d1383a9 100644 --- a/www/lib/DNSManager.pm +++ b/www/lib/DNSManager.pm @@ -46,8 +46,7 @@ get '/' => sub { if( $success ) { template index => { - logged => true - , login => session('login') + login => session('login') , admin => session('admin') , domains => [ @domains ] }; } @@ -222,7 +221,6 @@ any ['get', 'post'] => '/admin' => sub { unless ( $auth_ok && $isadmin ) { redirect '/ '; - return; } else { diff --git a/www/views/administration.tt b/www/views/administration.tt index d57a138..5ea01ac 100644 --- a/www/views/administration.tt +++ b/www/views/administration.tt @@ -1,25 +1,4 @@ - +<% include sidebar.tt %>

Bienvenue sur la page d'administration

diff --git a/www/views/details.tt b/www/views/details.tt index bc9b02e..4f40026 100644 --- a/www/views/details.tt +++ b/www/views/details.tt @@ -1,21 +1,4 @@ - +<% include sidebar.tt %>
diff --git a/www/views/home.tt b/www/views/home.tt index 896488f..4eef770 100644 --- a/www/views/home.tt +++ b/www/views/home.tt @@ -1,18 +1,4 @@ - +<% include sidebar.tt %>
diff --git a/www/views/index.tt b/www/views/index.tt index ab1723b..fa3863d 100644 --- a/www/views/index.tt +++ b/www/views/index.tt @@ -1,38 +1,4 @@ - +<% include sidebar.tt %>
diff --git a/www/views/sidebar.tt b/www/views/sidebar.tt new file mode 100644 index 0000000..3cd2904 --- /dev/null +++ b/www/views/sidebar.tt @@ -0,0 +1,42 @@ + diff --git a/www/views/subscribe.tt b/www/views/subscribe.tt index 404b5fa..859e2f7 100644 --- a/www/views/subscribe.tt +++ b/www/views/subscribe.tt @@ -1,18 +1,4 @@ - +<% include sidebar.tt %>