From 006061a1a7454f0b700b8d4d0c658f1d9107f7a0 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sun, 29 Aug 2004 17:35:35 +0000 Subject: [PATCH] support for simple pages (without menu and stuff) --- include/auto.prepend.inc.php | 2 + templates/skin/default.tpl | 134 +++++++++++++++++++++++-------------------- templates/skin/sharky.tpl | 134 +++++++++++++++++++++++-------------------- 3 files changed, 144 insertions(+), 126 deletions(-) diff --git a/include/auto.prepend.inc.php b/include/auto.prepend.inc.php index 0aa473c..1574302 100644 --- a/include/auto.prepend.inc.php +++ b/include/auto.prepend.inc.php @@ -32,7 +32,9 @@ function new_skinned_page($tpl_name, $min_auth, $popup=false, $tpl_head="") { } function new_simple_page($tpl_name, $min_auth, $popup=false, $tpl_head="") { + global $page; _new_page(SKINNED, $tpl_name, $tpl_head, $min_auth, $popup); + $page->assign('simple', true); } function new_nonhtml_page($tpl_name, $min_auth) { diff --git a/templates/skin/default.tpl b/templates/skin/default.tpl index e889f45..9798c9f 100644 --- a/templates/skin/default.tpl +++ b/templates/skin/default.tpl @@ -1,79 +1,87 @@ -{* $Id: default.tpl,v 1.11 2004-02-20 11:44:07 x2000habouzit Exp $ *} +{* $Id: default.tpl,v 1.12 2004-08-29 17:35:35 x2000habouzit Exp $ *} -{include file=skin/common.header.tpl} - -{if $xorg_head} -{include file=$xorg_head} -{/if} -{include file=skin/common.bandeau.head.tpl} + {include file=skin/common.header.tpl} + + {if $xorg_head} + {include file=$xorg_head} + {/if} + {include file=skin/common.bandeau.head.tpl} -{include file=skin/common.devel.tpl} + {include file=skin/common.devel.tpl} -{if $smarty.session.suid} + {if $smarty.session.suid} - - - + + +
- {dynamic} - {$smarty.session.suid} ({$smarty.session.username}) - {/dynamic} - [exit] -
+ {dynamic} + {$smarty.session.suid} ({$smarty.session.username}) + {/dynamic} + [exit] +
-{/if} + {/if} -{include file=skin/common.bandeau.tpl} + {if $simple} + +
+ {include file=$xorg_tpl} +
+ + {else} + + {include file=skin/common.bandeau.tpl} - - - - - - - - - - - + + + + + + + + + + +
- [ Polytechnique.org ] - - - - - -
- - {insert name="getNbIns"} polytechniciens sur le web
- [LES X SUR LE WEB] -
-{include_php file=menu.conf.php} -{foreach key=menu_title item=menu_list from=$menu} -{if $menu_title} - -{/if} -{foreach key=menu_item item=menu_url from=$menu_list} - -{/foreach} -{/foreach} -{perms level=admin}{insert name="mkStats"}{/perms} - -{include file=$xorg_tpl} -
-{include file=skin/common.footer.tpl} -
+ [ Polytechnique.org ] + + + + + +
+ + {insert name="getNbIns"} polytechniciens sur le web
+ [LES X SUR LE WEB] +
+ {include_php file=menu.conf.php} + {foreach key=menu_title item=menu_list from=$menu} + {if $menu_title} + + {/if} + {foreach key=menu_item item=menu_url from=$menu_list} + + {/foreach} + {/foreach} + {perms level=admin}{insert name="mkStats"}{/perms} + + {include file=$xorg_tpl} +
+ {include file=skin/common.footer.tpl} +
- + {/if} {* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/skin/sharky.tpl b/templates/skin/sharky.tpl index 210d95f..d2f6bfb 100644 --- a/templates/skin/sharky.tpl +++ b/templates/skin/sharky.tpl @@ -1,79 +1,87 @@ -{* $Id: sharky.tpl,v 1.1 2004-08-29 15:46:54 x2000habouzit Exp $ *} +{* $Id: sharky.tpl,v 1.2 2004-08-29 17:35:35 x2000habouzit Exp $ *} -{include file=skin/common.header.tpl} - - -{if $xorg_head} -{include file=$xorg_head} -{/if} -{include file=skin/common.bandeau.head.tpl} + {include file=skin/common.header.tpl} + + + {if $xorg_head} + {include file=$xorg_head} + {/if} + {include file=skin/common.bandeau.head.tpl} -{include file=skin/common.devel.tpl} + {include file=skin/common.devel.tpl} -{if $smarty.session.suid} + {if $smarty.session.suid} - - - + + +
- {dynamic} - {$smarty.session.suid} ({$smarty.session.username}) - {/dynamic} - [exit] -
+ {dynamic} + {$smarty.session.suid} ({$smarty.session.username}) + {/dynamic} + [exit] +
-{/if} + {/if} -{include file=skin/common.bandeau.tpl} + {if $simple} + +
+ {include file=$xorg_tpl} +
+ + {else} + + {include file=skin/common.bandeau.tpl} - - - - - - - - - - - + + + + + + + + + + +
- [ Polytechnique.org ] - - - - - -
- - {insert name="getNbIns"} polytechniciens sur le web
-
-{include_php file=menu.conf.php} -{foreach key=menu_title item=menu_list from=$menu} -{if $menu_title} - -{/if} -{foreach key=menu_item item=menu_url from=$menu_list} - -{/foreach} -{/foreach} -{perms level=admin}{insert name="mkStats"}{/perms} - -{include file=$xorg_tpl} -
-{include file=skin/common.footer.tpl} -
+ [ Polytechnique.org ] + + + + + +
+ + {insert name="getNbIns"} polytechniciens sur le web
+
+ {include_php file=menu.conf.php} + {foreach key=menu_title item=menu_list from=$menu} + {if $menu_title} + + {/if} + {foreach key=menu_item item=menu_url from=$menu_list} + + {/foreach} + {/foreach} + {perms level=admin}{insert name="mkStats"}{/perms} + + {include file=$xorg_tpl} +
+ {include file=skin/common.footer.tpl} +
- + {/if} {* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4