From: Pierre Habouzit (MadCoder Date: Mon, 18 Apr 2005 10:06:01 +0000 (+0000) Subject: list my groups X-Git-Tag: xorg/old~198 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3be301e6e15c26a03c6d073a7930153a638195d1;p=platal.git list my groups git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-564 --- diff --git a/htdocs.net/css/xnet.css b/htdocs.net/css/xnet.css index f9abaec..4578767 100644 --- a/htdocs.net/css/xnet.css +++ b/htdocs.net/css/xnet.css @@ -82,14 +82,20 @@ td#perso ul { font-size: 90%; } +td#perso a.gp { + display: block; + margin: 2px 1em; + font-weight: bold; + font-size: 85%; + float: left; + text-align: center; +} + td#search { text-align: right; + width: 300px; } -/*************************************************************************** - * CLASSES - ***************************************************************************/ - #content { width: 100%; } @@ -115,6 +121,13 @@ td#menu { width: 150px; } vertical-align: middle; } +/*************************************************************************** + * CLASSES + ***************************************************************************/ + +.erreur { color: red; } +.error { color: red; } + .descr { text-align: justify; @@ -140,7 +153,6 @@ table.links a { font-weight: bold; } - /*************************************************************************** * Special pages ***************************************************************************/ diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 85b21d8..d17c39f 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -29,10 +29,13 @@ class XnetPage extends PlatalPage function XnetPage($tpl, $type=SKINNED) { + global $globals; $this->PlatalPage($tpl, $type); if (Get::has('auth')) { $_SESSION['session']->doAuthX($this); } + require_once('xnet/smarty.plugins.inc.php'); + $this->register_function('list_all_my_groups', 'list_all_my_groups'); } // }}} diff --git a/include/xnet/smarty.plugins.inc.php b/include/xnet/smarty.plugins.inc.php new file mode 100644 index 0000000..1144fe5 --- /dev/null +++ b/include/xnet/smarty.plugins.inc.php @@ -0,0 +1,45 @@ +xdb->iterRow( + "SELECT a.nom, a.diminutif + FROM groupex.asso AS a + INNER JOIN groupex.membres AS m ON m.asso_id = a.id + WHERE m.uid={?}", Session::getInt('uid')); + $html = ''; + while (list($nom, $mini) = $res->next()) { + $html .= "• $nom"; + } + return $html; +} + +// }}} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +?> diff --git a/templates/xnet/skin.tpl b/templates/xnet/skin.tpl index 65cd040..25b9f85 100644 --- a/templates/xnet/skin.tpl +++ b/templates/xnet/skin.tpl @@ -94,6 +94,7 @@
  • extérieur
  • {/only_public} + {list_all_my_groups}