From 8b1f8e12d444062ef63a0db3a8fa94582a9778c3 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 18 Dec 2006 14:44:39 +0000 Subject: [PATCH] Arrange templates by module git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1286 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/platal.php | 6 ++--- classes/platalpage.php | 2 +- classes/pltableeditor.php | 2 +- classes/xdb.php | 2 +- htdocs/xnet.php | 2 +- htdocs/xorg.php | 2 +- include/vcard.inc.php | 2 +- modules/admin.php | 2 +- modules/core.php | 20 +++++++++++++-- modules/events.php | 24 +++-------------- modules/platal.php | 26 +++++++++---------- modules/profile.php | 26 +++++++++---------- modules/xnet.php | 16 ------------ modules/xnetgrp.php | 30 +++++++++++----------- templates/{ => admin}/logger-view.tpl | 0 templates/{ => core}/403.tpl | 0 templates/{ => core}/404.tpl | 0 templates/{ => core}/bug.tpl | 0 templates/{ => core}/password_prompt.tpl | 0 templates/{ => core}/password_prompt_logged.tpl | 0 templates/{ => core}/table-editor.tpl | 0 templates/{ => core}/vcard.tpl | 0 templates/{ => core}/wiki.tpl | 0 .../evenements.tpl => events/admin_events.tpl} | 0 templates/{login.tpl => events/index.tpl} | 0 templates/{ => events}/rss.tpl | 0 templates/{evenements.tpl => events/submit.tpl} | 0 templates/{ => platal}/acces_smtp.tpl | 0 templates/{ => platal}/changeLog.tpl | 0 templates/{ => platal}/exit.tpl | 0 templates/{ => platal}/filrss.tpl | 0 templates/{ => platal}/index.tpl | 0 templates/{ => platal}/motdepasse.success.tpl | 0 templates/{ => platal}/motdepasse.tpl | 0 templates/{ => platal}/preferences.tpl | 0 templates/{ => platal}/recovery.tpl | 0 templates/{ => platal}/skins.tpl | 0 templates/{ => platal}/tmpPWD.success.tpl | 0 templates/{ => platal}/webredirect.tpl | 0 .../gerer_decos.tpl => profile/admin_decos.tpl} | 0 templates/{admin => profile}/admin_trombino.tpl | 0 templates/{profil => profile}/adresses.tpl | 0 templates/{ => profile}/applis.js.tpl | 0 templates/{profil => profile}/deco.tpl | 0 templates/{profil.tpl => profile/edit.tpl} | 0 templates/{profil => profile}/emploi.tpl | 0 templates/{ => profile}/fiche_referent.tpl | 0 templates/{profil => profile}/general.tpl | 2 +- templates/{ => profile}/groupesx.tpl | 0 templates/{profil => profile}/mentor.tpl | 0 templates/{profil => profile}/naissance.tpl | 0 templates/{ => profile}/nomusage.tpl | 0 templates/{ => profile}/orange.tpl | 0 templates/{profil => profile}/poly.tpl | 0 templates/{fiche.tpl => profile/profile.tpl} | 0 templates/{ => profile}/referent.tpl | 0 templates/{profil => profile}/skill.tpl | 0 templates/{ => profile}/trombino.tpl | 0 templates/{ => profile}/trombipromo.tpl | 0 .../common.database-debug.tpl} | 0 templates/{xnet/groupe => xnetgrp}/alias-admin.tpl | 0 .../{xnet/groupe => xnetgrp}/alias-create.tpl | 0 .../{xnet/groupe => xnetgrp}/announce-admin.tpl | 0 .../{xnet/groupe => xnetgrp}/announce-edit.tpl | 0 .../{xnet/groupe => xnetgrp}/announce-rss.tpl | 0 .../{xnet/groupe => xnetgrp}/annuaire-admin.tpl | 0 templates/{xnet/groupe => xnetgrp}/annuaire.tpl | 0 templates/{xnet/groupe => xnetgrp}/asso.tpl | 0 templates/{xnet/groupe => xnetgrp}/edit.tpl | 0 .../{xnet/groupe => xnetgrp}/form.announce.tpl | 0 templates/{xnet/groupe => xnetgrp}/inscrire.tpl | 0 templates/{xnet/groupe => xnetgrp}/mail.tpl | 0 templates/{xnet/groupe => xnetgrp}/membres-add.tpl | 0 templates/{xnet/groupe => xnetgrp}/membres-del.tpl | 0 .../{xnet/groupe => xnetgrp}/membres-edit.tpl | 0 .../groupe => xnetgrp}/membres-new-search.tpl | 0 templates/{xnet/groupe => xnetgrp}/trombi.tpl | 0 77 files changed, 74 insertions(+), 90 deletions(-) rename templates/{ => admin}/logger-view.tpl (100%) rename templates/{ => core}/403.tpl (100%) rename templates/{ => core}/404.tpl (100%) rename templates/{ => core}/bug.tpl (100%) rename templates/{ => core}/password_prompt.tpl (100%) rename templates/{ => core}/password_prompt_logged.tpl (100%) rename templates/{ => core}/table-editor.tpl (100%) rename templates/{ => core}/vcard.tpl (100%) rename templates/{ => core}/wiki.tpl (100%) rename templates/{admin/evenements.tpl => events/admin_events.tpl} (100%) rename templates/{login.tpl => events/index.tpl} (100%) rename templates/{ => events}/rss.tpl (100%) rename templates/{evenements.tpl => events/submit.tpl} (100%) rename templates/{ => platal}/acces_smtp.tpl (100%) rename templates/{ => platal}/changeLog.tpl (100%) rename templates/{ => platal}/exit.tpl (100%) rename templates/{ => platal}/filrss.tpl (100%) rename templates/{ => platal}/index.tpl (100%) rename templates/{ => platal}/motdepasse.success.tpl (100%) rename templates/{ => platal}/motdepasse.tpl (100%) rename templates/{ => platal}/preferences.tpl (100%) rename templates/{ => platal}/recovery.tpl (100%) rename templates/{ => platal}/skins.tpl (100%) rename templates/{ => platal}/tmpPWD.success.tpl (100%) rename templates/{ => platal}/webredirect.tpl (100%) rename templates/{admin/gerer_decos.tpl => profile/admin_decos.tpl} (100%) rename templates/{admin => profile}/admin_trombino.tpl (100%) rename templates/{profil => profile}/adresses.tpl (100%) rename templates/{ => profile}/applis.js.tpl (100%) rename templates/{profil => profile}/deco.tpl (100%) rename templates/{profil.tpl => profile/edit.tpl} (100%) rename templates/{profil => profile}/emploi.tpl (100%) rename templates/{ => profile}/fiche_referent.tpl (100%) rename templates/{profil => profile}/general.tpl (99%) rename templates/{ => profile}/groupesx.tpl (100%) rename templates/{profil => profile}/mentor.tpl (100%) rename templates/{profil => profile}/naissance.tpl (100%) rename templates/{ => profile}/nomusage.tpl (100%) rename templates/{ => profile}/orange.tpl (100%) rename templates/{profil => profile}/poly.tpl (100%) rename templates/{fiche.tpl => profile/profile.tpl} (100%) rename templates/{ => profile}/referent.tpl (100%) rename templates/{profil => profile}/skill.tpl (100%) rename templates/{ => profile}/trombino.tpl (100%) rename templates/{ => profile}/trombipromo.tpl (100%) rename templates/{database-debug.tpl => skin/common.database-debug.tpl} (100%) rename templates/{xnet/groupe => xnetgrp}/alias-admin.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/alias-create.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/announce-admin.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/announce-edit.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/announce-rss.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/annuaire-admin.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/annuaire.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/asso.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/edit.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/form.announce.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/inscrire.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/mail.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/membres-add.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/membres-del.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/membres-edit.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/membres-new-search.tpl (100%) rename templates/{xnet/groupe => xnetgrp}/trombi.tpl (100%) diff --git a/classes/platal.php b/classes/platal.php index 31bbe83..e64e4c8 100644 --- a/classes/platal.php +++ b/classes/platal.php @@ -196,10 +196,10 @@ class Platal function force_login(&$page) { if (S::logged()) { - $page->changeTpl('password_prompt_logged.tpl'); + $page->changeTpl('core/password_prompt_logged.tpl'); $page->addJsLink('do_challenge_response_logged.js'); } else { - $page->changeTpl('password_prompt.tpl'); + $page->changeTpl('core/password_prompt.tpl'); $page->addJsLink('do_challenge_response.js'); } $page->run(); @@ -209,7 +209,7 @@ class Platal { global $page; - new_skinned_page('index.tpl'); + new_skinned_page('platal/index.tpl'); if (empty($this->path)) { $this->path = 'index'; diff --git a/classes/platalpage.php b/classes/platalpage.php index 01ec3b5..9998a97 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -106,7 +106,7 @@ class PlatalPage extends Smarty } if ($globals->debug & 1) { - $this->assign('db_trace', XDB::trace_format($this, 'database-debug.tpl')); + $this->assign('db_trace', XDB::trace_format($this, 'skin/common.database-debug.tpl')); } $this->assign('validate', true); diff --git a/classes/pltableeditor.php b/classes/pltableeditor.php index cad848a..d1dca33 100644 --- a/classes/pltableeditor.php +++ b/classes/pltableeditor.php @@ -153,7 +153,7 @@ class PLTableEditor { } // call when done function apply(&$page, $action, $id = false) { - $page->changeTpl('table-editor.tpl'); + $page->changeTpl('core/table-editor.tpl'); $list = true; if ($action == 'delete') { if (!isset($this->delete_action)) { diff --git a/classes/xdb.php b/classes/xdb.php index 9bda36c..34c10e8 100644 --- a/classes/xdb.php +++ b/classes/xdb.php @@ -139,7 +139,7 @@ class XDB } } - public static function trace_format(&$page, $template = 'database-debug.tpl') { + public static function trace_format(&$page, $template = 'skin/common.database-debug.tpl') { $page->assign('trace_data', @$GLOBALS['XDB::trace_data']); $page->assign('db_error', @$GLOBALS['XDB::error']); return $page->fetch($template); diff --git a/htdocs/xnet.php b/htdocs/xnet.php index 8e55c69..6cf1f7c 100644 --- a/htdocs/xnet.php +++ b/htdocs/xnet.php @@ -39,7 +39,7 @@ if (!$n) { pl_redirect(''); } -new_skinned_page('wiki.tpl'); +new_skinned_page('core/wiki.tpl'); $perms = wiki_get_perms($n); switch (Env::v('action')) { diff --git a/htdocs/xorg.php b/htdocs/xorg.php index 6261a36..753ae2d 100644 --- a/htdocs/xorg.php +++ b/htdocs/xorg.php @@ -42,7 +42,7 @@ if (!$n) { pl_redirect(''); } -new_skinned_page('wiki.tpl'); +new_skinned_page('core/wiki.tpl'); $perms = wiki_get_perms($n); if (Env::v('display') == 'light') { diff --git a/include/vcard.inc.php b/include/vcard.inc.php index 08c46c8..b5aa8a9 100644 --- a/include/vcard.inc.php +++ b/include/vcard.inc.php @@ -119,7 +119,7 @@ class VCard function do_page(&$page) { - $page->changeTpl('vcard.tpl', NO_SKIN); + $page->changeTpl('core/vcard.tpl', NO_SKIN); $page->register_modifier('vcard_enc', array($this, 'text_encode')); $page->register_function('format_adr', array($this, 'format_adr')); $page->assign_by_ref('users', $this->users); diff --git a/modules/admin.php b/modules/admin.php index 0f77284..ecb35d7 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -341,7 +341,7 @@ class AdminModule extends PLModule } } - $page->changeTpl('logger-view.tpl'); + $page->changeTpl('admin/logger-view.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Logs des sessions'); } diff --git a/modules/core.php b/modules/core.php index 78955b1..0fec9e2 100644 --- a/modules/core.php +++ b/modules/core.php @@ -26,6 +26,7 @@ class CoreModule extends PLModule return array( '403' => $this->make_hook('403', AUTH_PUBLIC), '404' => $this->make_hook('404', AUTH_PUBLIC), + 'send_bug' => $this->make_hook('bug', AUTH_COOKIE), 'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin'), 'get_rights' => $this->make_hook('get_rights', AUTH_MDP, 'admin'), @@ -43,7 +44,7 @@ class CoreModule extends PLModule function handler_403(&$page) { header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); - $page->changeTpl('403.tpl'); + $page->changeTpl('core/403.tpl'); } function handler_404(&$page) @@ -51,7 +52,7 @@ class CoreModule extends PLModule global $platal; header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); $page->assign('near', $platal->near_hook()); - $page->changeTpl('404.tpl'); + $page->changeTpl('core/404.tpl'); } function handler_favicon(&$page) @@ -86,6 +87,21 @@ class CoreModule extends PLModule pl_redirect('/'); } + + function handler_bug(&$page) + { + $page->changeTpl('core/bug.tpl',SIMPLE); + $page->addJsLink('close_on_esc.js'); + if (Env::has('send')) { + $page->assign('bug_sent',1); + $mymail = new PlMailer(); + $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>'); + $mymail->addTo('support+platal@polytechnique.org'); + $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary')); + $mymail->setTxtBody(Env::v('detailed_desc')); + $mymail->send(); + } + } } ?> diff --git a/modules/events.php b/modules/events.php index d584060..dfe3fd5 100644 --- a/modules/events.php +++ b/modules/events.php @@ -26,7 +26,6 @@ class EventsModule extends PLModule return array( 'events' => $this->make_hook('ev', AUTH_COOKIE), 'rss' => $this->make_hook('rss', AUTH_PUBLIC), - 'send_bug' => $this->make_hook('bug', AUTH_COOKIE), 'events/submit' => $this->make_hook('ev_submit', AUTH_MDP), 'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'), @@ -72,24 +71,9 @@ class EventsModule extends PLModule return $res->fetchOneAssoc(); } - function handler_bug(&$page) - { - $page->changeTpl('bug.tpl',SIMPLE); - $page->addJsLink('close_on_esc.js'); - if (Env::has('send')) { - $page->assign('bug_sent',1); - $mymail = new PlMailer(); - $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>'); - $mymail->addTo('support+platal@polytechnique.org'); - $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary')); - $mymail->setTxtBody(Env::v('detailed_desc')); - $mymail->send(); - } - } - function handler_ev(&$page, $action = 'list', $eid = null, $pound = null) { - $page->changeTpl('login.tpl'); + $page->changeTpl('events/index.tpl'); $page->addJsLink('ajax.js'); $page->assign('tips', $this->get_tips()); @@ -183,7 +167,7 @@ class EventsModule extends PLModule { require_once 'rss.inc.php'; - $uid = init_rss('rss.tpl', $user, $hash); + $uid = init_rss('events/rss.tpl', $user, $hash); $rss = XDB::iterator( 'SELECT e.id, e.titre, e.texte, e.creation_date, @@ -199,7 +183,7 @@ class EventsModule extends PLModule function handler_ev_submit(&$page) { - $page->changeTpl('evenements.tpl'); + $page->changeTpl('events/submit.tpl'); $titre = Post::v('titre'); $texte = Post::v('texte'); @@ -329,7 +313,7 @@ class EventsModule extends PLModule function handler_admin_events(&$page, $action = 'list', $eid = null) { - $page->changeTpl('admin/evenements.tpl'); + $page->changeTpl('events/admin_events.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Evenements'); $page->register_modifier('hde', 'html_entity_decode'); diff --git a/modules/platal.php b/modules/platal.php index 586b485..2db2fda 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -81,7 +81,7 @@ class PlatalModule extends PLModule function handler_changelog(&$page) { - $page->changeTpl('changeLog.tpl'); + $page->changeTpl('platal/changeLog.tpl'); $clog = htmlentities(file_get_contents(dirname(__FILE__).'/../ChangeLog')); $clog = preg_replace('!(#[0-9]+(,[0-9]+)*)!e', 'bugize("\1")', $clog); @@ -106,7 +106,7 @@ class PlatalModule extends PLModule function handler_prefs(&$page) { - $page->changeTpl('preferences.tpl'); + $page->changeTpl('platal/preferences.tpl'); $page->assign('xorg_title','Polytechnique.org - Mes préférences'); if (Post::has('mail_fmt')) { @@ -126,7 +126,7 @@ class PlatalModule extends PLModule function handler_webredir(&$page) { - $page->changeTpl('webredirect.tpl'); + $page->changeTpl('platal/webredirect.tpl'); $page->assign('xorg_title','Polytechnique.org - Redirection de page WEB'); @@ -158,7 +158,7 @@ class PlatalModule extends PLModule function handler_prefs_rss(&$page) { - $page->changeTpl('filrss.tpl'); + $page->changeTpl('platal/filrss.tpl'); $page->assign('goback', Env::v('referer', 'login')); @@ -187,18 +187,18 @@ class PlatalModule extends PLModule setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0); } - $page->changeTpl('motdepasse.success.tpl'); + $page->changeTpl('platal/motdepasse.success.tpl'); $page->run(); } - $page->changeTpl('motdepasse.tpl'); + $page->changeTpl('platal/motdepasse.tpl'); $page->addJsLink('motdepasse.js'); $page->assign('xorg_title','Polytechnique.org - Mon mot de passe'); } function handler_smtppass(&$page) { - $page->changeTpl('acces_smtp.tpl'); + $page->changeTpl('platal/acces_smtp.tpl'); $page->assign('xorg_title','Polytechnique.org - Acces SMTP/NNTP'); $uid = S::v('uid'); @@ -229,7 +229,7 @@ class PlatalModule extends PLModule { global $globals; - $page->changeTpl('recovery.tpl'); + $page->changeTpl('platal/recovery.tpl'); if (!Env::has('login') || !Env::has('birth')) { return; @@ -301,7 +301,7 @@ Mail envoy $res = XDB::query('SELECT uid FROM perte_pass WHERE certificat={?}', $certif); $ligne = $res->fetchOneAssoc(); if (!$ligne) { - $page->changeTpl('index.tpl'); + $page->changeTpl('platal/index.tpl'); $page->kill("Cette adresse n'existe pas ou n'existe plus sur le serveur."); } @@ -314,9 +314,9 @@ Mail envoy $password, $uid); XDB::query('DELETE FROM perte_pass WHERE certificat={?}', $certif); $logger->log("passwd",""); - $page->changeTpl('tmpPWD.success.tpl'); + $page->changeTpl('platal/tmpPWD.success.tpl'); } else { - $page->changeTpl('motdepasse.tpl'); + $page->changeTpl('platal/motdepasse.tpl'); $page->addJsLink('motdepasse.js'); } } @@ -325,7 +325,7 @@ Mail envoy { global $globals; - $page->changeTpl('skins.tpl'); + $page->changeTpl('platal/skins.tpl'); $page->assign('xorg_title','Polytechnique.org - Skins'); if (Env::has('newskin')) { // formulaire soumis, traitons les données envoyées @@ -383,7 +383,7 @@ Mail envoy if (Get::has('redirect')) { http_redirect(rawurldecode(Get::v('redirect'))); } else { - $page->changeTpl('exit.tpl'); + $page->changeTpl('platal/exit.tpl'); } } } diff --git a/modules/profile.php b/modules/profile.php index fe2aa43..7068623 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -116,7 +116,7 @@ class ProfileModule extends PLModule function handler_photo_change(&$page) { - $page->changeTpl('trombino.tpl'); + $page->changeTpl('profile/trombino.tpl'); require_once('validations.inc.php'); @@ -169,7 +169,7 @@ class ProfileModule extends PLModule global $globals; require_once 'user.func.inc.php'; - $page->changeTpl('fiche.tpl', SIMPLE); + $page->changeTpl('profile/fiche.tpl', SIMPLE); $view = 'private'; if (!S::logged() || Env::v('view') == 'public') $view = 'public'; @@ -258,7 +258,7 @@ class ProfileModule extends PLModule { global $globals; - $page->changeTpl('profil.tpl'); + $page->changeTpl('profile/edit.tpl'); $page->addCssLink('profil.css'); $page->assign('xorg_title', 'Polytechnique.org - Mon Profil'); @@ -340,7 +340,7 @@ class ProfileModule extends PLModule if($page->nb_errs()) { require_once "profil/assign_{$opened_tab}.inc.php"; $page->assign('onglet', $opened_tab); - $page->assign('onglet_tpl', "profil/$opened_tab.tpl"); + $page->assign('onglet_tpl', "profile/$opened_tab.tpl"); return; } @@ -375,14 +375,14 @@ class ProfileModule extends PLModule require_once "profil/assign_{$opened_tab}.inc.php"; $page->assign('onglet', $opened_tab); - $page->assign('onglet_tpl', "profil/$opened_tab.tpl"); + $page->assign('onglet_tpl', "profile/$opened_tab.tpl"); return; } function handler_p_orange(&$page) { - $page->changeTpl('orange.tpl'); + $page->changeTpl('profile/orange.tpl'); require_once 'validations.inc.php'; require_once 'xorg.misc.inc.php'; @@ -438,7 +438,7 @@ class ProfileModule extends PLModule return PL_NOT_FOUND; } - $page->changeTpl('fiche_referent.tpl', SIMPLE); + $page->changeTpl('profile/fiche_referent.tpl', SIMPLE); $res = XDB::query( "SELECT prenom, nom, user_id, promo, cv, a.alias AS bestalias @@ -496,7 +496,7 @@ class ProfileModule extends PLModule function handler_ref_search(&$page) { - $page->changeTpl('referent.tpl'); + $page->changeTpl('profile/referent.tpl'); $page->assign('xorg_title', 'Polytechnique.org - Conseil Pro'); @@ -608,7 +608,7 @@ class ProfileModule extends PLModule function handler_p_usage(&$page) { - $page->changeTpl('nomusage.tpl'); + $page->changeTpl('profile/nomusage.tpl'); require_once 'validations.inc.php'; require_once 'xorg.misc.inc.php'; @@ -648,7 +648,7 @@ class ProfileModule extends PLModule function handler_trombi(&$page, $promo = null) { - $page->changeTpl('trombipromo.tpl'); + $page->changeTpl('profile/trombipromo.tpl'); $page->assign('xorg_title', 'Polytechnique.org - Trombi Promo'); if (is_null($promo)) { @@ -671,7 +671,7 @@ class ProfileModule extends PLModule function handler_xnet(&$page) { - $page->changeTpl('groupesx.tpl'); + $page->changeTpl('profile/groupesx.tpl'); $page->assign('xorg_title', 'Polytechnique.org - Promo, Groupes X, Binets'); $req = XDB::query(' @@ -702,7 +702,7 @@ class ProfileModule extends PLModule } function handler_admin_trombino(&$page, $uid = null, $action = null) { - $page->changeTpl('admin/admin_trombino.tpl'); + $page->changeTpl('profile/admin_trombino.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Trombino'); $page->assign('uid', $uid); @@ -772,7 +772,7 @@ class ProfileModule extends PLModule $table_editor->describe('img', 'nom de l\'image', false); $table_editor->apply($page, $action, $id); if ($id && $action == 'edit') { - $page->changeTpl('admin/gerer_decos.tpl'); + $page->changeTpl('profile/admin_decos.tpl'); $mid = $id; diff --git a/modules/xnet.php b/modules/xnet.php index 95a9be6..812e9ed 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -32,7 +32,6 @@ class XnetModule extends PLModule 'groups' => $this->make_hook('groups', AUTH_PUBLIC), 'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC), 'plan' => $this->make_hook('plan', AUTH_PUBLIC), - 'send_bug' => $this->make_hook('bug', AUTH_MDP), 'photo' => $this->make_hook('photo', AUTH_MDP), ); } @@ -57,21 +56,6 @@ class XnetModule extends PLModule } exit; } - - function handler_bug(&$page) - { - $page->changeTpl('bug.tpl',SIMPLE); - $page->addJsLink('close_on_esc.js'); - if (Env::has('send')) { - $page->assign('bug_sent',1); - $mymail = new PlMailer(); - $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>'); - $mymail->addTo('support+platal@polytechnique.org'); - $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary')); - $mymail->setTxtBody(Env::v('detailed_desc')); - $mymail->send(); - } - } function handler_index(&$page) { diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 51662f1..5f7a8fe 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -113,7 +113,7 @@ class XnetGrpModule extends PLModule return PL_NOT_FOUND; } - new_group_open_page('xnet/groupe/asso.tpl'); + new_group_open_page('xnetgrp/asso.tpl'); if (S::logged()) { if (Env::has('read')) { @@ -208,7 +208,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnet/groupe/edit.tpl'); + new_groupadmin_page('xnetgrp/edit.tpl'); if (Post::has('submit')) { if (S::has_perms()) { @@ -273,7 +273,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnet/groupe/mail.tpl'); + new_groupadmin_page('xnetgrp/mail.tpl'); $mmlist = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); $page->assign('listes', $mmlist->get_lists()); @@ -297,7 +297,7 @@ class XnetGrpModule extends PLModule function handler_annuaire(&$page) { global $globals; - new_annu_page('xnet/groupe/annuaire.tpl'); + new_annu_page('xnetgrp/annuaire.tpl'); $sort = Env::v('order'); switch (Env::v('order')) { @@ -397,7 +397,7 @@ class XnetGrpModule extends PLModule function handler_trombi(&$page, $num = 1) { global $globals; - new_annu_page('xnet/groupe/trombi.tpl'); + new_annu_page('xnetgrp/trombi.tpl'); $page->assign('urlmainsite', "https://www.polytechnique.org/"); $trombi = new Trombi(array($this, '_trombi_getlist')); @@ -451,7 +451,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_group_open_page('xnet/groupe/inscrire.tpl'); + new_group_open_page('xnetgrp/inscrire.tpl'); if (!$globals->asso('inscriptible')) $page->kill("Il n'est pas possible de s'inscire en ligne à ce " @@ -602,7 +602,7 @@ class XnetGrpModule extends PLModule require_once 'xnet/mail.inc.php'; - new_groupadmin_page('xnet/groupe/annuaire-admin.tpl'); + new_groupadmin_page('xnetgrp/annuaire-admin.tpl'); $mmlist = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); $lists = $mmlist->get_lists(); @@ -647,7 +647,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnet/groupe/membres-add.tpl'); + new_groupadmin_page('xnetgrp/membres-add.tpl'); $page->addJsLink('ajax.js'); if (is_null($email)) { @@ -716,7 +716,7 @@ class XnetGrpModule extends PLModule function handler_admin_member_new_ajax(&$page) { header('Content-Type: text/html; charset="iso-8859-15"'); - $page->changeTpl('xnet/groupe/membres-new-search.tpl', NO_SKIN); + $page->changeTpl('xnetgrp/membres-new-search.tpl', NO_SKIN); list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::v('nom'), Env::v('prenom'))); $where = "perms = 'pending'"; if (!empty($nom)) { @@ -782,7 +782,7 @@ class XnetGrpModule extends PLModule function handler_unsubscribe(&$page) { - new_group_page('xnet/groupe/membres-del.tpl'); + new_group_page('xnetgrp/membres-del.tpl'); $user = get_infos(S::v('forlife')); if (empty($user)) { return PL_NOT_FOUND; @@ -804,7 +804,7 @@ class XnetGrpModule extends PLModule function handler_admin_member_del(&$page, $user = null) { - new_groupadmin_page('xnet/groupe/membres-del.tpl'); + new_groupadmin_page('xnetgrp/membres-del.tpl'); $user = get_infos($user); if (empty($user)) { return PL_NOT_FOUND; @@ -826,7 +826,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnet/groupe/membres-edit.tpl'); + new_groupadmin_page('xnetgrp/membres-edit.tpl'); $user = get_infos($user); if (empty($user)) { @@ -927,7 +927,7 @@ class XnetGrpModule extends PLModule global $globals; require_once('rss.inc.php'); require_once('url_catcher.inc.php'); - $uid = init_rss('xnet/groupe/announce-rss.tpl', $user, $hash, false); + $uid = init_rss('xnetgrp/announce-rss.tpl', $user, $hash, false); $page->register_modifier('url_catcher', 'url_catcher'); if ($uid) { @@ -954,7 +954,7 @@ class XnetGrpModule extends PLModule function handler_edit_announce(&$page, $aid = null) { global $globals, $platal; - new_groupadmin_page('xnet/groupe/announce-edit.tpl'); + new_groupadmin_page('xnetgrp/announce-edit.tpl'); $page->assign('new', is_null($aid)); $art = array(); @@ -1083,7 +1083,7 @@ class XnetGrpModule extends PLModule function handler_admin_announce(&$page) { global $globals; - new_groupadmin_page('xnet/groupe/announce-admin.tpl'); + new_groupadmin_page('xnetgrp/announce-admin.tpl'); if (Env::has('del')) { XDB::execute("DELETE FROM groupex.announces diff --git a/templates/logger-view.tpl b/templates/admin/logger-view.tpl similarity index 100% rename from templates/logger-view.tpl rename to templates/admin/logger-view.tpl diff --git a/templates/403.tpl b/templates/core/403.tpl similarity index 100% rename from templates/403.tpl rename to templates/core/403.tpl diff --git a/templates/404.tpl b/templates/core/404.tpl similarity index 100% rename from templates/404.tpl rename to templates/core/404.tpl diff --git a/templates/bug.tpl b/templates/core/bug.tpl similarity index 100% rename from templates/bug.tpl rename to templates/core/bug.tpl diff --git a/templates/password_prompt.tpl b/templates/core/password_prompt.tpl similarity index 100% rename from templates/password_prompt.tpl rename to templates/core/password_prompt.tpl diff --git a/templates/password_prompt_logged.tpl b/templates/core/password_prompt_logged.tpl similarity index 100% rename from templates/password_prompt_logged.tpl rename to templates/core/password_prompt_logged.tpl diff --git a/templates/table-editor.tpl b/templates/core/table-editor.tpl similarity index 100% rename from templates/table-editor.tpl rename to templates/core/table-editor.tpl diff --git a/templates/vcard.tpl b/templates/core/vcard.tpl similarity index 100% rename from templates/vcard.tpl rename to templates/core/vcard.tpl diff --git a/templates/wiki.tpl b/templates/core/wiki.tpl similarity index 100% rename from templates/wiki.tpl rename to templates/core/wiki.tpl diff --git a/templates/admin/evenements.tpl b/templates/events/admin_events.tpl similarity index 100% rename from templates/admin/evenements.tpl rename to templates/events/admin_events.tpl diff --git a/templates/login.tpl b/templates/events/index.tpl similarity index 100% rename from templates/login.tpl rename to templates/events/index.tpl diff --git a/templates/rss.tpl b/templates/events/rss.tpl similarity index 100% rename from templates/rss.tpl rename to templates/events/rss.tpl diff --git a/templates/evenements.tpl b/templates/events/submit.tpl similarity index 100% rename from templates/evenements.tpl rename to templates/events/submit.tpl diff --git a/templates/acces_smtp.tpl b/templates/platal/acces_smtp.tpl similarity index 100% rename from templates/acces_smtp.tpl rename to templates/platal/acces_smtp.tpl diff --git a/templates/changeLog.tpl b/templates/platal/changeLog.tpl similarity index 100% rename from templates/changeLog.tpl rename to templates/platal/changeLog.tpl diff --git a/templates/exit.tpl b/templates/platal/exit.tpl similarity index 100% rename from templates/exit.tpl rename to templates/platal/exit.tpl diff --git a/templates/filrss.tpl b/templates/platal/filrss.tpl similarity index 100% rename from templates/filrss.tpl rename to templates/platal/filrss.tpl diff --git a/templates/index.tpl b/templates/platal/index.tpl similarity index 100% rename from templates/index.tpl rename to templates/platal/index.tpl diff --git a/templates/motdepasse.success.tpl b/templates/platal/motdepasse.success.tpl similarity index 100% rename from templates/motdepasse.success.tpl rename to templates/platal/motdepasse.success.tpl diff --git a/templates/motdepasse.tpl b/templates/platal/motdepasse.tpl similarity index 100% rename from templates/motdepasse.tpl rename to templates/platal/motdepasse.tpl diff --git a/templates/preferences.tpl b/templates/platal/preferences.tpl similarity index 100% rename from templates/preferences.tpl rename to templates/platal/preferences.tpl diff --git a/templates/recovery.tpl b/templates/platal/recovery.tpl similarity index 100% rename from templates/recovery.tpl rename to templates/platal/recovery.tpl diff --git a/templates/skins.tpl b/templates/platal/skins.tpl similarity index 100% rename from templates/skins.tpl rename to templates/platal/skins.tpl diff --git a/templates/tmpPWD.success.tpl b/templates/platal/tmpPWD.success.tpl similarity index 100% rename from templates/tmpPWD.success.tpl rename to templates/platal/tmpPWD.success.tpl diff --git a/templates/webredirect.tpl b/templates/platal/webredirect.tpl similarity index 100% rename from templates/webredirect.tpl rename to templates/platal/webredirect.tpl diff --git a/templates/admin/gerer_decos.tpl b/templates/profile/admin_decos.tpl similarity index 100% rename from templates/admin/gerer_decos.tpl rename to templates/profile/admin_decos.tpl diff --git a/templates/admin/admin_trombino.tpl b/templates/profile/admin_trombino.tpl similarity index 100% rename from templates/admin/admin_trombino.tpl rename to templates/profile/admin_trombino.tpl diff --git a/templates/profil/adresses.tpl b/templates/profile/adresses.tpl similarity index 100% rename from templates/profil/adresses.tpl rename to templates/profile/adresses.tpl diff --git a/templates/applis.js.tpl b/templates/profile/applis.js.tpl similarity index 100% rename from templates/applis.js.tpl rename to templates/profile/applis.js.tpl diff --git a/templates/profil/deco.tpl b/templates/profile/deco.tpl similarity index 100% rename from templates/profil/deco.tpl rename to templates/profile/deco.tpl diff --git a/templates/profil.tpl b/templates/profile/edit.tpl similarity index 100% rename from templates/profil.tpl rename to templates/profile/edit.tpl diff --git a/templates/profil/emploi.tpl b/templates/profile/emploi.tpl similarity index 100% rename from templates/profil/emploi.tpl rename to templates/profile/emploi.tpl diff --git a/templates/fiche_referent.tpl b/templates/profile/fiche_referent.tpl similarity index 100% rename from templates/fiche_referent.tpl rename to templates/profile/fiche_referent.tpl diff --git a/templates/profil/general.tpl b/templates/profile/general.tpl similarity index 99% rename from templates/profil/general.tpl rename to templates/profile/general.tpl index e599401..6d5932b 100644 --- a/templates/profil/general.tpl +++ b/templates/profile/general.tpl @@ -21,7 +21,7 @@ {**************************************************************************} -{include file="applis.js.tpl"} +{include file="profile/applis.js.tpl"}
diff --git a/templates/groupesx.tpl b/templates/profile/groupesx.tpl similarity index 100% rename from templates/groupesx.tpl rename to templates/profile/groupesx.tpl diff --git a/templates/profil/mentor.tpl b/templates/profile/mentor.tpl similarity index 100% rename from templates/profil/mentor.tpl rename to templates/profile/mentor.tpl diff --git a/templates/profil/naissance.tpl b/templates/profile/naissance.tpl similarity index 100% rename from templates/profil/naissance.tpl rename to templates/profile/naissance.tpl diff --git a/templates/nomusage.tpl b/templates/profile/nomusage.tpl similarity index 100% rename from templates/nomusage.tpl rename to templates/profile/nomusage.tpl diff --git a/templates/orange.tpl b/templates/profile/orange.tpl similarity index 100% rename from templates/orange.tpl rename to templates/profile/orange.tpl diff --git a/templates/profil/poly.tpl b/templates/profile/poly.tpl similarity index 100% rename from templates/profil/poly.tpl rename to templates/profile/poly.tpl diff --git a/templates/fiche.tpl b/templates/profile/profile.tpl similarity index 100% rename from templates/fiche.tpl rename to templates/profile/profile.tpl diff --git a/templates/referent.tpl b/templates/profile/referent.tpl similarity index 100% rename from templates/referent.tpl rename to templates/profile/referent.tpl diff --git a/templates/profil/skill.tpl b/templates/profile/skill.tpl similarity index 100% rename from templates/profil/skill.tpl rename to templates/profile/skill.tpl diff --git a/templates/trombino.tpl b/templates/profile/trombino.tpl similarity index 100% rename from templates/trombino.tpl rename to templates/profile/trombino.tpl diff --git a/templates/trombipromo.tpl b/templates/profile/trombipromo.tpl similarity index 100% rename from templates/trombipromo.tpl rename to templates/profile/trombipromo.tpl diff --git a/templates/database-debug.tpl b/templates/skin/common.database-debug.tpl similarity index 100% rename from templates/database-debug.tpl rename to templates/skin/common.database-debug.tpl diff --git a/templates/xnet/groupe/alias-admin.tpl b/templates/xnetgrp/alias-admin.tpl similarity index 100% rename from templates/xnet/groupe/alias-admin.tpl rename to templates/xnetgrp/alias-admin.tpl diff --git a/templates/xnet/groupe/alias-create.tpl b/templates/xnetgrp/alias-create.tpl similarity index 100% rename from templates/xnet/groupe/alias-create.tpl rename to templates/xnetgrp/alias-create.tpl diff --git a/templates/xnet/groupe/announce-admin.tpl b/templates/xnetgrp/announce-admin.tpl similarity index 100% rename from templates/xnet/groupe/announce-admin.tpl rename to templates/xnetgrp/announce-admin.tpl diff --git a/templates/xnet/groupe/announce-edit.tpl b/templates/xnetgrp/announce-edit.tpl similarity index 100% rename from templates/xnet/groupe/announce-edit.tpl rename to templates/xnetgrp/announce-edit.tpl diff --git a/templates/xnet/groupe/announce-rss.tpl b/templates/xnetgrp/announce-rss.tpl similarity index 100% rename from templates/xnet/groupe/announce-rss.tpl rename to templates/xnetgrp/announce-rss.tpl diff --git a/templates/xnet/groupe/annuaire-admin.tpl b/templates/xnetgrp/annuaire-admin.tpl similarity index 100% rename from templates/xnet/groupe/annuaire-admin.tpl rename to templates/xnetgrp/annuaire-admin.tpl diff --git a/templates/xnet/groupe/annuaire.tpl b/templates/xnetgrp/annuaire.tpl similarity index 100% rename from templates/xnet/groupe/annuaire.tpl rename to templates/xnetgrp/annuaire.tpl diff --git a/templates/xnet/groupe/asso.tpl b/templates/xnetgrp/asso.tpl similarity index 100% rename from templates/xnet/groupe/asso.tpl rename to templates/xnetgrp/asso.tpl diff --git a/templates/xnet/groupe/edit.tpl b/templates/xnetgrp/edit.tpl similarity index 100% rename from templates/xnet/groupe/edit.tpl rename to templates/xnetgrp/edit.tpl diff --git a/templates/xnet/groupe/form.announce.tpl b/templates/xnetgrp/form.announce.tpl similarity index 100% rename from templates/xnet/groupe/form.announce.tpl rename to templates/xnetgrp/form.announce.tpl diff --git a/templates/xnet/groupe/inscrire.tpl b/templates/xnetgrp/inscrire.tpl similarity index 100% rename from templates/xnet/groupe/inscrire.tpl rename to templates/xnetgrp/inscrire.tpl diff --git a/templates/xnet/groupe/mail.tpl b/templates/xnetgrp/mail.tpl similarity index 100% rename from templates/xnet/groupe/mail.tpl rename to templates/xnetgrp/mail.tpl diff --git a/templates/xnet/groupe/membres-add.tpl b/templates/xnetgrp/membres-add.tpl similarity index 100% rename from templates/xnet/groupe/membres-add.tpl rename to templates/xnetgrp/membres-add.tpl diff --git a/templates/xnet/groupe/membres-del.tpl b/templates/xnetgrp/membres-del.tpl similarity index 100% rename from templates/xnet/groupe/membres-del.tpl rename to templates/xnetgrp/membres-del.tpl diff --git a/templates/xnet/groupe/membres-edit.tpl b/templates/xnetgrp/membres-edit.tpl similarity index 100% rename from templates/xnet/groupe/membres-edit.tpl rename to templates/xnetgrp/membres-edit.tpl diff --git a/templates/xnet/groupe/membres-new-search.tpl b/templates/xnetgrp/membres-new-search.tpl similarity index 100% rename from templates/xnet/groupe/membres-new-search.tpl rename to templates/xnetgrp/membres-new-search.tpl diff --git a/templates/xnet/groupe/trombi.tpl b/templates/xnetgrp/trombi.tpl similarity index 100% rename from templates/xnet/groupe/trombi.tpl rename to templates/xnetgrp/trombi.tpl -- 2.1.4