From 43a424857c4a6bbae6d7d41efe337f2c16b86d64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 22 Apr 2012 18:54:27 +0200 Subject: [PATCH] Fixes count in group directory title (Closes #1580). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- ChangeLog | 1 + include/userset.inc.php | 6 ++++++ templates/xnetgrp/annuaire.tpl | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 30ddc7a..f9a113d 100644 --- 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 diff --git a/include/userset.inc.php b/include/userset.inc.php index 9d8d7df..f3286dd 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -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); } } diff --git a/templates/xnetgrp/annuaire.tpl b/templates/xnetgrp/annuaire.tpl index e4200ed..de0d47e 100644 --- a/templates/xnetgrp/annuaire.tpl +++ b/templates/xnetgrp/annuaire.tpl @@ -23,7 +23,7 @@

{$asso->nom} : Annuaire du groupe

-Le groupe {$asso->nom} compte {$plset_total_count} membres : +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}