From: Stéphane Jacob Date: Thu, 16 Jul 2009 23:15:29 +0000 (+0200) Subject: Fixes the gapps reminder. X-Git-Tag: xorg/0.10.1~13 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d7942b96c59fcdfe1d0345b360b7197f29d9fadb;p=platal.git Fixes the gapps reminder. --- diff --git a/include/reminder/gapps.inc.php b/include/reminder/gapps.inc.php index de0c0e9..a420070 100644 --- a/include/reminder/gapps.inc.php +++ b/include/reminder/gapps.inc.php @@ -25,7 +25,7 @@ class ReminderGapps extends Reminder { switch ($action) { case 'yes': - $this->UpdateOnYes(); + $this->UpdateOnDismiss(); pl_redirect('googleapps'); break; @@ -39,12 +39,9 @@ class ReminderGapps extends Reminder } } - public function text() + public function template() { - return "Polytechnique.org te fournit un compte Google Apps qui te permet - de disposer des applications web de Google (GMail, Google Calendar, - Google Docs, et bien d'autres) sur ton adresse Polytechnique.org - habituelle (en savoir plus)."; + return 'reminder/gapps.tpl'; } public function title() { @@ -59,6 +56,9 @@ class ReminderGapps extends Reminder { require_once 'googleapps.inc.php'; $isSubscribed = GoogleAppsAccount::account_status($user->id()); + if ($isSubscribed == 'disabled') { + $isSubscribed = false; + } if ($isSubscribed) { Reminder::MarkCandidateAsAccepted($user->id(), $candidate); } diff --git a/templates/reminder/gapps.tpl b/templates/reminder/gapps.tpl new file mode 100644 index 0000000..1320861 --- /dev/null +++ b/templates/reminder/gapps.tpl @@ -0,0 +1,42 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2009 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 *} +{* *} +{**************************************************************************} + +
+ Polytechnique.org te fournit un compte Google Apps qui te permet + de disposer des applications web de Google (GMail, Google Calendar, + Google Docs, et bien d'autres) sur ton adresse Polytechnique.org + habituelle (en savoir plus). +
+
+ + {icon name=add} M'inscrire + - + + {icon name=delete} Ne pas m'inscrire + - + + {icon name=cross} Décider plus tard + - + {icon name=information} En savoir plus +
+ +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}