Fixes count in group directory title (Closes #1580).
authorStéphane Jacob <sj@m4x.org>
Sun, 22 Apr 2012 16:54:27 +0000 (18:54 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 22 Apr 2012 16:54:27 +0000 (18:54 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
include/userset.inc.php
templates/xnetgrp/annuaire.tpl

index 30ddc7a..f9a113d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@ Bug/Wish:
         - #1603: Fixes Xnet events edition for users without profile       -JAC
 
     * XnetGrp:
+        - #1580: Fixes count in group directory title                      -JAC
         - #1596, #1598: Lists non-X accounts awaiting validation           -JAC
         - #1609: Adds link to account on Xnet account validation           -JAC
 
index 9d8d7df..f3286dd 100644 (file)
@@ -327,8 +327,13 @@ class ListMemberView extends MixedView
 
 class TrombiView extends MixedView
 {
+    private $full_count;
+
     public function __construct(PlSet $set, array $params)
     {
+        $set->getIds();
+        $this->full_count = $set->count();
+
         $this->entriesPerPage = 24;
         $this->defaultkey = 'name';
         if (@$params['with_score']) {
@@ -359,6 +364,7 @@ class TrombiView extends MixedView
             global $globals;
             $page->assign('mainsiteurl', 'https://' . $globals->core->secure_domain . '/');
         }
+        $page->assign('full_count', $this->full_count);
         return parent::apply($page);
     }
 }
index e4200ed..de0d47e 100644 (file)
@@ -23,7 +23,7 @@
 <h1>{$asso->nom}&nbsp;: Annuaire du groupe </h1>
 
 <p class="descr">
-Le groupe {$asso->nom} compte {$plset_total_count} membres&nbsp;:
+Le groupe {$asso->nom} compte {if t($full_count)}{$full_count}{elseif $plset_total_count}{$plset_total_count}{else}{$plset_count}{/if} membres{if !t($full_count)}.{else}, dont {if $plset_total_count}{$plset_total_count}{else}{$plset_count}{/if} dans le {$plset_mods.$plset_mod|lower}.{/if}
 </p>
 
 <ul class="descr">