Adds 'More information' in the reminders.
authorStéphane Jacob <sj@m4x.org>
Tue, 14 Jul 2009 11:41:32 +0000 (13:41 +0200)
committerStéphane Jacob <sj@m4x.org>
Tue, 14 Jul 2009 11:41:32 +0000 (13:41 +0200)
include/reminder.inc.php
include/reminder/ax_letter.inc.php
include/reminder/email_backup.inc.php
include/reminder/gapps.inc.php
include/reminder/no_redirection.inc.php
templates/reminder/base.tpl

index bc1334b..cede617 100644 (file)
@@ -148,6 +148,9 @@ abstract class Reminder
         return 'ajax/reminder/' . $this->name;
     }
 
+    // Returns the url for the information page.
+    public function info() { return ''; }
+
     // Static status update methods -------------------------------------------
 
     // Marks the candidate reminder as having been accepted for user |user_id|.
index b0b112e..c7f62c9 100644 (file)
@@ -47,6 +47,10 @@ class ReminderAxLetter extends Reminder
     {
         return "Inscription à la lettre de l'AX";
     }
+    public function info()
+    {
+        return 'Xorg/MailsAX';
+    }
 
     public static function IsCandidate(User &$user, $candidate)
     {
index cdf266e..76108f7 100644 (file)
@@ -50,6 +50,10 @@ class ReminderEmailBackup extends Reminder
     {
         return 'Sauvegarde de tes emails';
     }
+    public function info()
+    {
+        return 'Xorg/IMAP';
+    }
 
     public static function IsCandidate(User &$user, $candidate)
     {
index 8df4c46..de0c0e9 100644 (file)
@@ -50,6 +50,10 @@ class ReminderGapps extends Reminder
     {
         return "Création d'un compte Google Apps";
     }
+    public function info()
+    {
+        return 'Xorg/GoogleApps';
+    }
 
     public static function IsCandidate(User &$user, $candidate)
     {
index 706bfb2..dd936fa 100644 (file)
@@ -40,6 +40,10 @@ class ReminderNoRedirection extends Reminder
     {
         return true;
     }
+    public function info()
+    {
+        return 'Xorg/MesAdressesDeRedirection';
+    }
 
     public static function IsCandidate(User &$user, $candidate)
     {
index 477cbc8..55bc847 100644 (file)
@@ -47,6 +47,9 @@
         <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/dismiss'); return false" style="text-decoration: none">
           {icon name=cross} Décider plus tard
         </a>
+        {if $reminder->info()}
+          - <a class="popup2" href="{$reminder->info()}">{icon name=information} En savoir plus</a>
+        {/if}
       </div>
     {/if}
   </fieldset>