Changeset 1363


Ignore:
Timestamp:
Jun 18, 2006, 2:04:59 PM (18 years ago)
Author:
nikrou
Message:

Issue 426: first step; separation of admin and public into two templates
Need to simplify and delete files not needed

Location:
trunk
Files:
116 added
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r1303 r1363  
    202202// TODO : replace initial $user['template'] by $user['layout']
    203203
     204if (IN_ADMIN)
     205{
     206  $template_root = 'admin';
     207}
     208else
     209{
     210  $template_root = 'public';
     211}
    204212include(
    205213  PHPWG_ROOT_PATH
    206   .'template/'.$user['template']
     214  .'template/'.$template_root.'/'.$user['template']
    207215  .'/theme/'.$user['theme']
    208216  .'/themeconf.inc.php'
  • trunk/include/functions.inc.php

    r1361 r1363  
    598598 * returns available template/theme
    599599 */
    600 function get_pwg_themes()
     600function get_pwg_themes($template_root = 'public')
    601601{
    602602  $themes = array();
    603603
    604   $template_dir = PHPWG_ROOT_PATH.'template';
     604  $template_dir = PHPWG_ROOT_PATH.'template'.'/'.$template_root;
    605605
    606606  foreach (get_dirs($template_dir) as $template)
  • trunk/include/page_header.php

    r1303 r1363  
    2929// Start output of page
    3030//
    31 $template->set_filenames(array('header'=>'header.tpl'));
     31if (IN_ADMIN)
     32{
     33  $template->set_rootdir(PHPWG_ROOT_PATH.'template/admin/'.$user['template']);
     34  $template->set_filenames(array('header'=>'header.tpl'));
     35}
     36else
     37{
     38  $template->set_rootdir(PHPWG_ROOT_PATH.'template/public/'.$user['template']);
     39  $template->set_filenames(array('header'=>'header.tpl'));
     40}
    3241
    3342$template->assign_vars(
  • trunk/template/public/yoga/header.tpl

    r1303 r1363  
    55<meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
    66<link rel="shortcut icon" type="image/x-icon" href="{pwg_root}template-common/favicon.ico">
    7 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/layout.css">
     7<link rel="stylesheet" type="text/css" href="{pwg_root}template/public/{themeconf:template}/layout.css">
    88<!-- the next css is used to fix khtml (Konqueror/Safari) issue
    99the "text/nonsense" prevents gecko based browsers to load it -->
    10 <link rel="stylesheet" type="text/nonsense" href="{pwg_root}template/{themeconf:template}/fix-khtml.css">
     10<link rel="stylesheet" type="text/nonsense" href="{pwg_root}template/public/{themeconf:template}/fix-khtml.css">
    1111<!--[if lt IE 7]>
    12 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/fix-ie5-ie6.css">
     12<link rel="stylesheet" type="text/css" href="{pwg_root}template/public/{themeconf:template}/fix-ie5-ie6.css">
    1313<![endif]-->
    14 <link rel="stylesheet" type="text/css" media="print" href="{pwg_root}template/{themeconf:template}/print.css">
    15 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-colors.css">
    16 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
     14<link rel="stylesheet" type="text/css" media="print" href="{pwg_root}template/public/{themeconf:template}/print.css">
     15<link rel="stylesheet" type="text/css" href="{pwg_root}template/public/{themeconf:template}/default-colors.css">
     16<link rel="stylesheet" type="text/css" href="{pwg_root}template/public/{themeconf:template}/theme/{themeconf:theme}/theme.css">
    1717<!-- BEGIN next -->
    1818<link rel="prefetch" href="{next.U_IMG_SRC}">
  • trunk/template/public/yoga/layout.css

    r1138 r1363  
    1010@import "local-layout.css";
    1111/* common css */
    12 @import "../../template-common/layout.css";
     12@import "../../../template-common/layout.css";
    1313
  • trunk/template/public/yoga/theme/clear/themeconf.inc.php

    r1092 r1363  
    33  'template' => 'yoga',
    44  'theme' => 'clear',
    5   'icon_dir' => 'template/yoga/icon',
    6   'admin_icon_dir' => 'template/yoga/icon/admin',
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
     5  'icon_dir' => 'template/public/yoga/icon',
     6  'admin_icon_dir' => 'template/public/yoga/icon/admin',
     7  'mime_icon_dir' => 'template/public/yoga/icon/mimetypes/'
    88);
    99?>
  • trunk/template/public/yoga/theme/dark/themeconf.inc.php

    r1092 r1363  
    33  'template' => 'yoga',
    44  'theme' => 'dark',
    5   'icon_dir' => 'template/yoga/icon',
    6   'admin_icon_dir' => 'template/yoga/icon/admin',
    7   'mime_icon_dir' => 'template/yoga/icon/mimetypes/'
     5  'icon_dir' => 'template/public/yoga/icon',
     6  'admin_icon_dir' => 'template/public/yoga/icon/admin',
     7  'mime_icon_dir' => 'template/public/yoga/icon/mimetypes/'
    88);
    99?>
Note: See TracChangeset for help on using the changeset viewer.