diff --git a/core/class/autoload.php b/core/class/autoload.php index bf408d67..8c7e95e6 100644 --- a/core/class/autoload.php +++ b/core/class/autoload.php @@ -6,7 +6,6 @@ class autoload { require_once 'core/class/router.class.php'; require_once 'core/class/helper.class.php'; require_once 'core/class/template.class.php'; - require_once 'core/class/layout.class.php'; require_once 'core/class/sitemap/Runtime.class.php'; require_once 'core/class/sitemap/FileSystem.class.php'; require_once 'core/class/sitemap/SitemapGenerator.class.php'; diff --git a/core/class/layout.class.php b/core/class/layout.class.php deleted file mode 100644 index 6c4ae788..00000000 --- a/core/class/layout.class.php +++ /dev/null @@ -1,1314 +0,0 @@ -core = $core; - } - - /** - * Affiche le consentement aux cookies - */ - public function showCookies() - { - // La gestion des cookies est externalisée - if ($this->getData(['config', 'cookieConsent']) === false) { - return; - } - // Le cookie est déjà validé - if ($this->getInput('ZWII_COOKIE_CONSENT') === 'true') { - return; - } - $item = '
'; - // Bouton de fermeture - $item .= '
'; - $item .= template::ico('cancel'); - $item .= '
'; - // Texte de la popup - $item .= '

' . $this->getData(['locale', 'cookies', 'titleLabel']) . '

'; - $item .= '

' . $this->getData(['locale', 'cookies', 'mainLabel']) . '

'; - // Formulaire de réponse - if ( - $this->getData(['locale', 'homePageId']) === $this->getUrl(0) - ) { - $item .= '
'; - } else { - $item .= ''; - } - $item .= '

'; - $item .= ''; - $item .= '
'; - // mentions légales si la page est définie - $legalPage = $this->getData(['locale', 'legalPageId']); - if ($legalPage !== 'none') { - $item .= '

' . $this->getData(['locale', 'cookies', 'linkLegalLabel']) . '

'; - } - $item .= '
'; - echo $item; - } - - /** - * Formate le contenu de la page selon les gabarits - * @param Page par defaut - */ - public function showMain() - { - echo '
'; - // Récupérer la config de la page courante - $blocks = is_null($this->getData(['page', $this->getUrl(0), 'block'])) ? '12' : $this->getData(['page', $this->getUrl(0), 'block']); - $blocks = explode('-', $blocks); - // Initialiser - $blockleft = ''; - $blockright = ''; - switch (sizeof($blocks)) { - case 1: // une colonne - $content = 'col' . $blocks[0]; - break; - case 2: // 2 blocs - if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne - $blockleft = 'col' . $blocks[0]; - $content = 'col' . $blocks[1]; - } else { - $content = 'col' . $blocks[0]; - $blockright = 'col' . $blocks[1]; - } - break; - case 3: // 3 blocs - $blockleft = 'col' . $blocks[0]; - $content = 'col' . $blocks[1]; - $blockright = 'col' . $blocks[2]; - } - // Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog - $pattern = ['config', 'edit', 'add', 'comment', 'data']; - if ( - (sizeof($blocks) === 1 || - in_array($this->getUrl(1), $pattern)) - ) { // Pleine page en mode configuration - if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'top' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'top') { - $this->showNavButtons('top'); - } - $this->showContent(); - if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'bottom' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'bottom') { - $this->showNavButtons('bottom'); - } - } else { - echo '
'; - /** - * Barre gauche - */ - if ($blockleft !== '') { - echo '
"; - } - /** - * Contenu de page - */ - echo '
'; - $this->showNavButtons('top'); - $this->showContent(); - $this->showNavButtons('bottom'); - echo '
'; - /** - * Barre droite - */ - if ($blockright !== '') { - echo '
'; - } - echo '
'; - } - echo '
'; - } - - /** - * Affiche le contenu - * @param Page par défaut - */ - public function showContent() - { - - if ( - $this->core->output['title'] - and ($this->getData(['page', $this->getUrl(0)]) === null - or $this->getData(['page', $this->getUrl(0), 'hideTitle']) === false - or $this->getUrl(1) === 'config' - ) - ) { - echo '

' . $this->core->output['title'] . '

'; - } - - echo $this->core->output['content']; - } - - /** - * Affiche le pied de page - */ - public function showFooter() - { - // Déterminer la position - $positionFixed = ''; - if ( - $this->getData(['theme', 'footer', 'position']) === 'site' - // Affiche toujours le pied de page pour l'édition du thème - or ($this->getData(['theme', 'footer', 'position']) === 'hide' - and $this->getUrl(0) === 'theme' - ) - ) { - $position = 'site'; - } else { - $position = 'body'; - if ($this->getData(['theme', 'footer', 'fixed']) === true) { - $positionFixed = ' footerbodyFixed'; - } - // Sortir de la division précédente - echo ''; - } - - echo $this->getData(['theme', 'footer', 'position']) === 'hide' ? '