From: x2003bruneau Date: Thu, 30 Nov 2006 21:28:54 +0000 (+0000) Subject: Add the logo of the groups in "My groups" page X-Git-Tag: xorg/0.9.13~244 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=46e1d3ba7b97df8946513fae961b7898b6e9acdd;p=platal.git Add the logo of the groups in "My groups" page git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1213 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/profile.php b/modules/profile.php index 66d5c31..fe2aa43 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -675,11 +675,12 @@ class ProfileModule extends PLModule $page->assign('xorg_title', 'Polytechnique.org - Promo, Groupes X, Binets'); $req = XDB::query(' - SELECT m.asso_id, a.nom, diminutif, COUNT(e.eid) AS events, mail_domain AS lists - FROM groupex.membres AS m - INNER JOIN groupex.asso AS a ON(m.asso_id = a.id) - LEFT JOIN groupex.evenements AS e ON(e.asso_id = m.asso_id) - WHERE uid = {?} GROUP BY m.asso_id ORDER BY a.nom', S::i('uid')); + SELECT m.asso_id, a.nom, diminutif, a.logo IS NOT NULL AS has_logo, + COUNT(e.eid) AS events, mail_domain AS lists + FROM groupex.membres AS m + INNER JOIN groupex.asso AS a ON(m.asso_id = a.id) + LEFT JOIN groupex.evenements AS e ON(e.asso_id = m.asso_id AND e.archive = 0) + WHERE uid = {?} GROUP BY m.asso_id ORDER BY a.nom', S::i('uid')); $page->assign('assos', $req->fetchAllAssoc()); } diff --git a/templates/groupesx.tpl b/templates/groupesx.tpl index aeced6e..1f17951 100644 --- a/templates/groupesx.tpl +++ b/templates/groupesx.tpl @@ -26,6 +26,10 @@
{$asso.nom} + {if $asso.has_logo} + [ LOGO ] + {/if}