From f2900e2505b80b5c72dbb4d3de5265e566779eb1 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Tue, 14 Nov 2006 13:23:16 +0000 Subject: [PATCH] Can get the list of the administrators of a group git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1079 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 1 + modules/xnetgrp.php | 6 +++--- templates/xnet/groupe/annuaire.tpl | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ec0f54..54d31b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ New: * Xnet: - Add a vcard of all the members of a group -FRU - Add a full announce system -FRU + - Add a list of the administrators of the group -FRU * Xnet/Events: - Events can be archived -FRU diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 66eef6d..8e70782 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -296,8 +296,6 @@ class XnetGrpModule extends PLModule { global $globals; - define('NB_PER_PAGE', 25); - if ($globals->asso('pub') == 'public') { new_group_page('xnet/groupe/annuaire.tpl'); } else { @@ -346,6 +344,7 @@ class XnetGrpModule extends PLModule } $page->assign('group', $group); $page->assign('request_group', Env::v($group)); + $page->assign('only_admin', Env::has('admin')); $page->assign('alphabet', $alphabet); $page->assign('nb_tot', $nb_tot); @@ -374,6 +373,8 @@ class XnetGrpModule extends PLModule } elseif (Env::has('promo')) { $ini = 'AND IF(m.origine="X", u.promo, "extérieur") = "' .addslashes(Env::v('promo')).'"'; + } elseif (Env::has('admin')) { + $ini = 'AND m.perms = "admin"'; } $ann = XDB::iterator( @@ -394,7 +395,6 @@ class XnetGrpModule extends PLModule AND (m.origine = 'ext' OR u.perms != 'pending' OR m.email IS NOT NULL) ORDER BY $tri LIMIT {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE); - $page->assign('ann', $ann); } diff --git a/templates/xnet/groupe/annuaire.tpl b/templates/xnet/groupe/annuaire.tpl index a99fb63..3c77b36 100644 --- a/templates/xnet/groupe/annuaire.tpl +++ b/templates/xnet/groupe/annuaire.tpl @@ -58,16 +58,17 @@ Tu peux

-[tout] +[tous les membres] +[administrateurs]
{foreach from=$alphabet item=c} -[{$c}] +[{$c}] {/foreach}

- + {if $sort eq 'alpha'} {elseif $sort eq 'alpha_inv'} -- 2.1.4