Ignore:
Timestamp:
04/23/10 10:41:56 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Organizando o HTML do template default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r2616 r2623  
    399399                                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'cookieManager', 'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] ); 
    400400 
    401                                         $this -> phpgw_header( ); 
     401                                        $this -> phpgw_header( $module_content ); 
    402402                                } 
    403403                                else 
     404                                { 
    404405                                        echo $this -> get_java_script( ); 
    405  
    406                                 echo $module_content; 
     406                                        echo $module_content; 
     407                                } 
    407408 
    408409                                /*if (is_object($GLOBALS['phpgw']->accounts)) 
     
    12071208                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'about') 
    12081209                        { 
    1209                                 $app = $app_title = 'eGroupWare'; 
     1210                                $app = $app_title = ':: ExpressoLivre ::'; 
    12101211                        } 
    12111212                        else 
     
    12501251                @abstract load the phpgw header 
    12511252                */ 
    1252                 function phpgw_header() 
     1253                function phpgw_header( $content ) 
    12531254                { 
    12541255                        // add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv) 
    1255                         header('Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset()); 
     1256                        header( "Content-type: text/html; charset={$GLOBALS[ 'phpgw' ] -> translation -> charset( )}" ); 
    12561257 
    12571258                        $path = PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']; 
    12581259 
    1259                         include_once( "{$path}/head.inc.php" ); 
    1260  
    12611260                        $this -> navbar( false ); 
    12621261 
    12631262                        include_once( "{$path}/navbar.inc.php" ); 
    12641263 
    1265                         if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) 
    1266                                 echo parse_navbar(); 
     1264                        if ( ! @$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) 
     1265                        { 
     1266                                parse_navbar( ); 
     1267                                $content = ob_get_contents( ) . $content; 
     1268                                ob_clean( ); 
     1269 
     1270                                parse_navbar_end( ); 
     1271                                $content .= ob_get_contents( ) . "\t"; 
     1272                                ob_clean( ); 
     1273                        } 
     1274 
     1275                        require_once "{$path}/head.inc.php"; 
    12671276                } 
    12681277 
    12691278                function phpgw_footer() 
    12701279                { 
    1271                         if (!defined('PHPGW_FOOTER')) 
    1272                         { 
    1273                                 define('PHPGW_FOOTER',True); 
    1274                                 if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter']) 
    1275                                 { 
    1276                                         include(PHPGW_API_INC . '/footer.inc.php'); 
    1277                                 } 
     1280                        if ( ! defined( 'PHPGW_FOOTER' ) ) 
     1281                        { 
     1282                                define( 'PHPGW_FOOTER', true ); 
     1283                                if ( ! isset( $GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter'] ) 
     1284                                        include_once PHPGW_API_INC . '/footer.inc.php'; 
    12781285                        } 
    12791286                } 
     
    12941301                        $tpl->set_var($GLOBALS['phpgw_info']['theme']); 
    12951302                        $app_css = ''; 
     1303 
    12961304                        if(@isset($_GET['menuaction'])) 
    12971305                        { 
     
    13031311                                } 
    13041312                        } 
    1305                         if (isset($GLOBALS['phpgw_info']['flags']['css'])) 
    1306                         { 
     1313 
     1314                        if ( isset( $GLOBALS['phpgw_info']['flags']['css'] ) ) 
    13071315                                $app_css .= $GLOBALS['phpgw_info']['flags']['css']; 
    1308                         } 
    1309                         $tpl->set_var('app_css', $app_css); 
     1316 
     1317                        $tpl->set_var( 'app_css', $app_css ); 
    13101318 
    13111319                        // search for app specific css file 
     
    13181326                                $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 
    13191327 
    1320                                 $link = '<LINK href="%s" type="text/css" rel="StyleSheet">'; 
    1321                                 $link = sprintf( $link, 
     1328                                $link = '<link href="%s" type="text/css" rel="StyleSheet" />'; 
     1329                                $link = "\n\t\t" . sprintf( $link, 
    13221330                                        "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 
    13231331                                ); 
     
    13471355                        } 
    13481356 
    1349                         return $tpl -> subst('css'); 
     1357                        return $tpl -> subst( 'css' ); 
    13501358                } 
    13511359 
     
    13621370                function get_java_script( ) 
    13631371                { 
    1364                         $java_script = ''; 
     1372                        $java_script = "\t\t"; 
    13651373 
    13661374                        /* this flag is for all javascript code that has to be put before other jscode.  
Note: See TracChangeset for help on using the changeset viewer.