From 6d20fb1df94dbf2fbada3aa1cb41e2f7596c0e9b Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 17 Aug 2008 21:57:09 +0200 Subject: [PATCH] Move more templates to the core. Signed-off-by: Florent Bruneau --- core | 2 +- include/banana/hooks.inc.php | 2 +- modules/platal.php | 2 +- modules/profile.php | 2 +- templates/core/plwizard.tpl | 106 ------------------------------------- templates/skin/common.content.tpl | 2 +- templates/skin/common.triggers.tpl | 35 ------------ 7 files changed, 5 insertions(+), 146 deletions(-) delete mode 100644 templates/core/plwizard.tpl delete mode 100644 templates/skin/common.triggers.tpl diff --git a/core b/core index 7cb40d8..9b41ca2 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 7cb40d85a05eb9d16218b9504ee484741e2e92e3 +Subproject commit 9b41ca2c58fdac3cf09f6a89051d9bc5e81c11d2 diff --git a/include/banana/hooks.inc.php b/include/banana/hooks.inc.php index aa44917..71e4aff 100644 --- a/include/banana/hooks.inc.php +++ b/include/banana/hooks.inc.php @@ -290,7 +290,7 @@ class PlatalBananaPage extends BananaPage { $tpl = parent::prepare(); global $wiz; - $wiz = new PlWizard('Banana', 'core/plwizard.tpl', true, false); + $wiz = new PlWizard('Banana', PlPage::getCoreTpl('plwizard.tpl'), true, false); foreach ($this->pages as $name=>&$mpage) { $wiz->addPage($this->handler, $mpage['text'], $name); } diff --git a/modules/platal.php b/modules/platal.php index d72c110..767c63e 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -456,7 +456,7 @@ Adresse de secours : " . Post::v('email') : "")); } $wp = new PlWikiPage($dom . '.Admin'); $conf = explode('%0a', $wp->getField('text')); - $wiz = new PlWizard('Tour d\'horizon', 'core/plwizard.tpl', true); + $wiz = new PlWizard('Tour d\'horizon', PlPage::getCoreTpl('plwizard.tpl'), true); foreach ($conf as $line) { $list = preg_split('/\s*[*|]\s*/', $line, -1, PREG_SPLIT_NO_EMPTY); $wiz->addPage('ReviewPage', $list[0], $list[1]); diff --git a/modules/profile.php b/modules/profile.php index 5e1a3cf..224d9ce 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -317,7 +317,7 @@ class ProfileModule extends PLModule $page->addJsLink('grades.js'); $page->addJsLink('profile.js'); $page->addJsLink('jquery.autocomplete.js'); - $wiz = new PlWizard('Profil', 'core/plwizard.tpl', true, true); + $wiz = new PlWizard('Profil', PlPage::getCoreTpl('plwizard.tpl'), true, true); require_once dirname(__FILE__) . '/profile/page.inc.php'; $wiz->addPage('ProfileGeneral', 'Général', 'general'); $wiz->addPage('ProfileAddresses', 'Adresses personnelles', 'adresses'); diff --git a/templates/core/plwizard.tpl b/templates/core/plwizard.tpl deleted file mode 100644 index df409dd..0000000 --- a/templates/core/plwizard.tpl +++ /dev/null @@ -1,106 +0,0 @@ -{**************************************************************************} -{* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} -{* http://opensource.polytechnique.org/ *} -{* *} -{* This program is free software; you can redistribute it and/or modify *} -{* it under the terms of the GNU General Public License as published by *} -{* the Free Software Foundation; either version 2 of the License, or *} -{* (at your option) any later version. *} -{* *} -{* This program is distributed in the hope that it will be useful, *} -{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} -{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} -{* GNU General Public License for more details. *} -{* *} -{* You should have received a copy of the GNU General Public License *} -{* along with this program; if not, write to the Free Software *} -{* Foundation, Inc., *} -{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} -{* *} -{**************************************************************************} - - - -
-
- {foreach from=$pages item=title key=id} - {if $stateless || $id gt $current} - {assign var=tag value="a"} - {else} - {assign var=tag value="div"} - {/if} - <{$tag} class="wiz_tab {if $id eq $current}active{/if} {if !$stateless && $current gt $id}grayed{/if}" - style="display: block; float: left; width: {$tab_width}%; vertical-align: middle" - id="wiz_tab_{$lookup[$id]}" - {if $tag eq "a"} - href="{$wiz_baseurl}/{$lookup[$id]}" - onclick="return changePage(this, '{$lookup[$id]}')" - {/if} - > - {$title} - - {/foreach} -
-
-
- {include file="skin/common.triggers.tpl"} - {include file=$wiz_page} -
-
- - - -{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/skin/common.content.tpl b/templates/skin/common.content.tpl index 4781db6..7823905 100644 --- a/templates/skin/common.content.tpl +++ b/templates/skin/common.content.tpl @@ -38,7 +38,7 @@ Nous conseillons très vivement d'utiliser des navigateurs récents, tels {/if} {if !$pl_no_errors || $pl_failure} -{include file="skin/common.triggers.tpl"} +{include core=triggers.tpl} {/if} {if !$pl_failure && $pl_tpl}{include file=$pl_tpl}{/if} diff --git a/templates/skin/common.triggers.tpl b/templates/skin/common.triggers.tpl deleted file mode 100644 index 9a507a2..0000000 --- a/templates/skin/common.triggers.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{**************************************************************************} -{* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} -{* http://opensource.polytechnique.org/ *} -{* *} -{* This program is free software; you can redistribute it and/or modify *} -{* it under the terms of the GNU General Public License as published by *} -{* the Free Software Foundation; either version 2 of the License, or *} -{* (at your option) any later version. *} -{* *} -{* This program is distributed in the hope that it will be useful, *} -{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} -{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} -{* GNU General Public License for more details. *} -{* *} -{* You should have received a copy of the GNU General Public License *} -{* along with this program; if not, write to the Free Software *} -{* Foundation, Inc., *} -{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} -{* *} -{**************************************************************************} - -{foreach from=$pl_triggers key=type item=triggers} -{if $triggers|@count} -
-
    - {foreach from=$triggers item=err} -
  • {$err|smarty:nodefaults}
  • - {/foreach} -
-
-{/if} -{/foreach} - -{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} -- 2.1.4