From: Raphaël Barrois Date: Tue, 23 Aug 2011 22:58:07 +0000 (+0200) Subject: Use a different skin for the X.org auth-groupe-x page when performing group login. X-Git-Tag: xorg/1.1.3~13 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bdbe352c3c2dab7e918f6219cbb3a053be4cf781;p=platal.git Use a different skin for the X.org auth-groupe-x page when performing group login. Signed-off-by: Raphaël Barrois --- diff --git a/modules/auth.php b/modules/auth.php index 85d86d0..fde9de5 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -120,6 +120,17 @@ class AuthModule extends PLModule { if (!S::logged()) { $page->assign('referer', true); + $page->setTitle('Authentification'); + $page->setDefaultSkin('group_login'); + + if (Get::has('group')) { + $res = XDB::query('SELECT nom + FROM groups + WHERE diminutif = {?}', Get::s('group')); + $page->assign('group', $res->fetchOneCell()); + } else { + $page->assign('group', null); + } return PL_DO_AUTH; } diff --git a/templates/skin/group_login.tpl b/templates/skin/group_login.tpl new file mode 100644 index 0000000..047629e --- /dev/null +++ b/templates/skin/group_login.tpl @@ -0,0 +1,62 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2011 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 *} +{* *} +{**************************************************************************} + +{include file=skin/common.doctype.tpl} + + {include file=skin/common.header.tpl} + + + {include core=plpage.devel.tpl} + {if !$simple} + {include file=skin/common.bandeau.tpl} + {/if} + {if t($smarty.session.suid)} + + {/if} + + {if $simple} +
+ {include core=plpage.content.tpl} +
+ {else} + + + + + + + +
+ [ LOGO ] + [ Polytechnique.org ]
+ [LES X SUR LE WEB] +
+ {include core=plpage.content.tpl} +
+ {/if} + + +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}