* Notifications :
- #63: Birthdays are now in the notifications ! -MC
+ - #215: The notifications use singular or plural. -Car
- #232: Add a link to the fiche. -MC/Car
* Profile :
EOF;
foreach($u['data'] as $cid=>$d) {
- $text .= " {$all->_cats[$cid]['mail']} :\n\n";
- $html .= "<h1 style='font-size: 120%'>{$all->_cats[$cid]['mail']} :</h1>\n<ul>\n";
+ $text .= " {$all->_cats[$cid][(count($d)==1)?'mail_sg':'mail']} :\n\n";
+ $html .= "<h1 style='font-size: 120%'>{$all->_cats[$cid][(count($d)?'mail_sg':'mail']} :</h1>\n<ul>\n";
foreach($d as $promo=>$x) {
require_once('../../plugins/modifier.date_format.php');
{foreach from=$notifs->_data item=c key=cid}
-<h2>{$notifs->_cats[$cid].mail} :</h2>
+<h2>{if ($c|@count) > 1}
+{$notifs->_cats[$cid].mail} :
+{else}
+ {foreach from=$c item=promo}
+ {if ($promo|@count) > 1}
+ {$notifs->_cats[$cid].mail} :
+ {else}
+ {$notifs->_cats[$cid].mail_sg} :
+ {/if}
+ {/foreach}
+{/if}</h2>
<br />
alter table watch_cat add column type enum('basic', 'near', 'often') not null default 'basic';
update watch_cat set type='often' where frequent=1;
alter table watch_cat drop column frequent;
-insert into watch_cat (id, short, mail, type) values(4, 'Anniversaires', 'Ces camarades ont feté leur anniversaire cette semaine', 'near');
+insert into watch_cat (id, short, mail, type) values(4, 'Anniversaires', 'Ces camarades ont fêté leur anniversaire cette semaine', 'near');
replace into watch_sub (uid, cid) select user_id, 4 from auth_user_md5 where perms in ('admin', 'user') and deces=0;
+alter table watch_cat add mail_sg varchar(80) default NULL after mail;
+update watch_cat set mail_sg = 'Ce camarade a mis sa fiche à jour' where id = 1;
+update watch_cat set mail_sg = 'Ce camarade s\'est inscrit' where id = 2;
+update watch_cat set mail_sg = 'Ce camarade nous a quitté' where id = 3;
+update watch_cat set mail_sg = 'Ce camarade a fêté son anniversaire la semaine dernère' where id = 4;
+