From 11fbae770c910b94430f5fd132f31075aaed7ec8 Mon Sep 17 00:00:00 2001 From: Bjverde Date: Tue, 21 Apr 2020 14:49:05 -0300 Subject: [PATCH] =?UTF-8?q?:memo:=20melhorando=20documenta=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework_puro/bootstrap_theme_formdin.md | 48 ++++--------------- 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/documents/framework_puro/bootstrap_theme_formdin.md b/documents/framework_puro/bootstrap_theme_formdin.md index 84324d9..21e3a07 100644 --- a/documents/framework_puro/bootstrap_theme_formdin.md +++ b/documents/framework_puro/bootstrap_theme_formdin.md @@ -55,9 +55,8 @@ Edite o arquivo `/app/lib/menu/AdiantiMenuBuilder.php` incluido as linh ```php case 'theme_formdin': ob_start(); - $callback = array('SystemPermission', 'checkPermission'); $xml = new SimpleXMLElement(file_get_contents($file)); - $menu = new TMenu($xml, $callback, 1,'dropdown-menu','nav-item dropdown','nav-link dropdown-toggle'); + $menu = new TMenu($xml,null, 1,'dropdown-menu','nav-item dropdown','nav-link dropdown-toggle'); $menu->id = 'main-menu-top'; $menu->show(); $menu_string = ob_get_clean(); @@ -71,42 +70,11 @@ Edite o arquivo `/app/lib/menu/AdiantiMenuBuilder.php` incluido as linh ### Etapa 03 Edite o arquivo `/index.php` incluido as linhas abaixo: ```php -if ( TSession::getValue('logged') ){ - $content = file_get_contents("app/templates/{$theme}/layout.html"); - $menu = AdiantiMenuBuilder::parse('menu.xml', $theme); - $content = str_replace('{MENU}', $menu, $content); - - //Novas linhas para theme_formdin - $system_version = $ini['system']['version']; - $head_title = $ini['system']['head_title'].' - v'.$system_version; - $content = str_replace('{head_title}', $head_title, $content); - $content = str_replace('{system_version}', $system_version, $content); - $content = str_replace('{logo-mini}', $ini['general']['application'], $content); - $content = str_replace('{logo-lg}', $ini['system']['logo-lg'], $content); - $content = str_replace('{logo-link-class}', $ini['system']['logo-link-class'], $content); -}else{ - if (isset($ini['general']['public_view']) && $ini['general']['public_view'] == '1') - { - $content = file_get_contents("app/templates/{$theme}/public.html"); - $menu = AdiantiMenuBuilder::parse('menu-public.xml', $theme); - $content = str_replace('{MENU}', $menu, $content); - - //Novas linhas para theme_formdin - $system_version = $ini['system']['version']; - $head_title = $ini['system']['head_title'].' - v'.$system_version; - $content = str_replace('{head_title}', $head_title, $content); - $content = str_replace('{system_version}', $system_version, $content); - $content = str_replace('{logo-mini}', $ini['general']['application'], $content); - $content = str_replace('{logo-lg}', $ini['system']['logo-lg'], $content); - $content = str_replace('{logo-link-class}', $ini['system']['logo-link-class'], $content); - }else{ - $content = file_get_contents("app/templates/{$theme}/login.html"); - - //Novas linhas para theme_formdin - $system_version = $ini['system']['version']; - $head_title = $ini['system']['head_title'].' - v'.$system_version; - $content = str_replace('{head_title}', $head_title, $content); - $content = str_replace('{login-link}', $ini['system']['login-link'], $content); - } -} +$system_version = $ini['system']['version']; +$head_title = $ini['system']['head_title'].' - v'.$system_version; +$content = str_replace('{head_title}', $head_title, $content); +$content = str_replace('{system_version}', $system_version, $content); +$content = str_replace('{logo-mini}', $ini['general']['application'], $content); +$content = str_replace('{logo-lg}', $ini['system']['logo-lg'], $content); +$content = str_replace('{logo-link-class}', $ini['system']['logo-link-class'], $content); ``` \ No newline at end of file