From de73ffdd603d01f4729920d1210242ee46db500f Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 7 May 2020 12:16:12 +0200 Subject: [PATCH] Rework on template files to use blocks --- src/css/default/base.css | 1 + src/includes/class/class.LSsession.php | 17 +++++++++-- src/includes/class/class.LStemplate.php | 25 +++++++++++++---- src/includes/routes.php | 2 +- .../default/LSaccessRightsMatrixView.tpl | 5 ++-- src/templates/default/accueil.tpl | 3 -- src/templates/default/{blank.tpl => base.tpl} | 7 ++++- .../default/{top.tpl => base_connected.tpl} | 25 ++++++----------- src/templates/default/bottom.tpl | 6 ---- src/templates/default/create.tpl | 7 +++-- src/templates/default/empty.tpl | 2 -- src/templates/default/error.tpl | 28 +++++++------------ src/templates/default/global_search.tpl | 7 ++--- src/templates/default/homepage.tpl | 4 +++ src/templates/default/import.tpl | 5 ++-- src/templates/default/login.tpl | 25 +++++------------ src/templates/default/modify.tpl | 8 +++--- src/templates/default/question.tpl | 7 +++-- src/templates/default/recoverpassword.tpl | 24 +++++----------- src/templates/default/view.tpl | 5 ++-- src/templates/default/viewSearch.tpl | 5 ++-- 21 files changed, 106 insertions(+), 112 deletions(-) delete mode 100644 src/templates/default/accueil.tpl rename src/templates/default/{blank.tpl => base.tpl} (85%) rename src/templates/default/{top.tpl => base_connected.tpl} (79%) delete mode 100644 src/templates/default/bottom.tpl delete mode 100644 src/templates/default/empty.tpl create mode 100644 src/templates/default/homepage.tpl diff --git a/src/css/default/base.css b/src/css/default/base.css index c81b470c..208f435f 100644 --- a/src/css/default/base.css +++ b/src/css/default/base.css @@ -393,4 +393,5 @@ input[type='submit'].LSview_search { max-width: 50%; border-radius: 1em; font-weight: bold; + white-space: pre-wrap; } diff --git a/src/includes/class/class.LSsession.php b/src/includes/class/class.LSsession.php index 102664e4..257b9ba5 100644 --- a/src/includes/class/class.LSsession.php +++ b/src/includes/class/class.LSsession.php @@ -651,7 +651,7 @@ class LSsession { self :: displayLoginForm(); } else { - self :: setTemplate('blank.tpl'); + self :: setTemplate('base.tpl'); LSerror :: addErrorCode('LSsession_10'); } return; @@ -934,6 +934,19 @@ class LSsession { return self :: $LSuserObject; } + /** + * Check if user is connected + * + * @author Benjamin Renard

{$pagetitle}