Changeset 5991


Ignore:
Timestamp:
Apr 29, 2010, 2:45:27 PM (15 years ago)
Author:
patdenice
Message:

feature 1502: Add $themeconfload_parent_css parameter

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/header.tpl

    r5284 r5991  
    1515
    1616{foreach from=$themes item=theme}
     17{if $theme.load_css}
     18<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.id}/theme.css">
     19{/if}
    1720{if isset($theme.local_head)}{include file=$theme.local_head}{/if}
    18 <link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/{$theme.id}/theme.css">
    1921{/foreach}
    2022
  • trunk/include/template.class.php

    r5985 r5991  
    103103   * Load theme's parameters.
    104104   */
    105   function set_theme($root, $theme, $path)
     105  function set_theme($root, $theme, $path, $load_css=true)
    106106  {
    107107    $this->set_template_dir($root.'/'.$theme.'/'.$path);
     
    111111    if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
    112112    {
    113       $this->set_theme($root, $themeconf['parent'], $path);
    114     }
    115 
    116     $tpl_var = array('id' => $theme);
     113      if (!isset($themeconf['load_parent_css']))
     114      {
     115        $themeconf['load_parent_css'] = true;
     116      }
     117      $this->set_theme($root, $themeconf['parent'], $path, $themeconf['load_parent_css']);
     118    }
     119
     120    $tpl_var = array(
     121      'id' => $theme,
     122      'load_css' => $load_css,
     123    );
    117124    if (!empty($themeconf['local_head']) )
    118125    {
  • trunk/themes/default/template/header.tpl

    r5923 r5991  
    3232
    3333{foreach from=$themes item=theme}
     34{if $theme.load_css}
    3435<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/{$theme.id}/theme.css">
     36{/if}
    3537{if isset($theme.local_head)}{include file=$theme.local_head}{/if}
    3638{/foreach}
Note: See TracChangeset for help on using the changeset viewer.