From: Pierre Habouzit (MadCoder Date: Mon, 25 Apr 2005 15:17:51 +0000 (+0000) Subject: better navigation X-Git-Tag: xorg/old~173 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a8ca34ec58ea2e0f52a51fa52e12546719748c23;p=platal.git better navigation git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-589 --- diff --git a/htdocs.net/css/xnet.css b/htdocs.net/css/xnet.css index 59a4fa2..7abac4b 100644 --- a/htdocs.net/css/xnet.css +++ b/htdocs.net/css/xnet.css @@ -130,6 +130,12 @@ td#menu { * CLASSES ***************************************************************************/ +div.breadcrumb { + font-weight: bold; + font-size: 90%; + padding: 0.5em 0em; +} + .erreur { color: red; } .error { color: red; } .center { text-align: center; } diff --git a/htdocs.net/groupes.php b/htdocs.net/groupes.php index e2f73c4..ab2aeff 100644 --- a/htdocs.net/groupes.php +++ b/htdocs.net/groupes.php @@ -8,11 +8,11 @@ new_page('xnet/groupes.tpl', AUTH_PUBLIC); - $res = $globals->xdb->iterator("SELECT id,nom FROM groupex.dom WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); - $page->assign('doms', $res); - $page->assign('hasdom', $res->total()!=0); + $res = $globals->xdb->query("SELECT id,nom FROM groupex.dom WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); + $doms = $res->fetchAllAssoc(); + $page->assign('doms', $doms); - if (!$res->total()) { + if (empty($doms)) { $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat); } elseif (Get::has('dom')) { $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) AND dom={?} ORDER BY nom", $cat, Get::getInt('dom')); diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index f821395..6d83970 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -79,14 +79,6 @@ class XnetPage extends PlatalPage $sub['telepaiement'] = "$dim/telepaiement.php"; $menu[$globals->asso('nom')] = $sub; - } else { - $sub = array(); - $sub['Groupes X'] = "groupes.php?cat=groupesx"; - $sub['Binets'] = "groupes.php?cat=binets"; - $sub['Promotions'] = "groupes.php?cat=promotions"; - $sub['Institutions'] = "groupes.php?cat=institutions"; - - $menu['Navigation'] = $sub; } if (logged() && may_update()) { @@ -108,6 +100,7 @@ class XnetPage extends PlatalPage function doAuth() { $this->register_function('list_all_my_groups', 'list_all_my_groups'); + $this->register_modifier('cat_pp', 'cat_pp'); $this->assign('it_is_xnet', true); if (!logged() && Get::has('auth')) { $_SESSION['session']->doAuthX($this); diff --git a/include/xnet/smarty.plugins.inc.php b/include/xnet/smarty.plugins.inc.php index cd55390..a035207 100644 --- a/include/xnet/smarty.plugins.inc.php +++ b/include/xnet/smarty.plugins.inc.php @@ -42,6 +42,21 @@ function list_all_my_groups($params) } // }}} +// {{{ cat_pp + +function cat_pp($cat) +{ + $trans = array( + 'groupesx' => 'Groupes X' , + 'binets' => 'Binets' , + 'institutions' => 'Institutions' , + 'promotions' => 'Promotions' + ); + + return $trans[strtolower($cat)]; +} + +// }}} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker: ?> diff --git a/templates/xnet/groupe/asso.tpl b/templates/xnet/groupe/asso.tpl index 3c7866f..802bf92 100644 --- a/templates/xnet/groupe/asso.tpl +++ b/templates/xnet/groupe/asso.tpl @@ -20,59 +20,46 @@

{$asso.nom} : Accueil

- - - - - -
- {if $asso.site} - LOGO - {else} - LOGO - {/if} +{if $asso.site} +LOGO +{else} +LOGO +{/if} - {if $asso.site} -

- Site Web: {$asso.site} -

- {/if} +{if $asso.site} +

+Site Web: {$asso.site} +

+{/if} - {if $asso.resp && $asso.mail} -

- Contact: {mailto address=$asso.mail text=$asso.resp encode=javascript} -

- {elseif $asso.resp} -

- Contact: {$asso.resp} -

- {/if} +{if $asso.resp && $asso.mail} +

+Contact: {mailto address=$asso.mail text=$asso.resp encode=javascript} +

+{elseif $asso.resp} +

+Contact: {$asso.resp} +

+{/if} - {if $asso.forum} -

- Forum: - par le web ou - par nntp -

- {/if} +{if $asso.forum} +

+Forum: +par le web ou +par nntp +

+{/if} - TODO: INSCRIPTION +TODO: INSCRIPTION - {if $asso.ax} -

- groupe agrée par l'AX -

- {/if} +{if $asso.ax} +

+groupe agrée par l'AX +

+{/if} -
- {$asso.descr|smarty:nodefaults} -
-
- {iterate from=$gps item=g} -
- {$g.nom} -
- {/iterate} -
+
+ {$asso.descr|smarty:nodefaults} +
{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/xnet/groupes.tpl b/templates/xnet/groupes.tpl index 099dbb2..707ce28 100644 --- a/templates/xnet/groupes.tpl +++ b/templates/xnet/groupes.tpl @@ -20,31 +20,39 @@ - + - {if $hasdom} + {if !$doms || !$gps} + {/if} + + {if $doms} + {/if} + + {if $gps} + {/if}
{include file="xnet/include/descr.tpl" cat=$smarty.get.cat}
- {iterate from=$doms item=g} + + + + + + {foreach from=$doms item=g} - {/iterate} + {/foreach} - {if $gps} {iterate from=$gps item=g} - +
{$g.nom}
{$g.nom}
{/iterate} - {else} - logos_associations - {/if}
diff --git a/templates/xnet/include/descr.tpl b/templates/xnet/include/descr.tpl index 0c241b9..0b383f9 100644 --- a/templates/xnet/include/descr.tpl +++ b/templates/xnet/include/descr.tpl @@ -39,25 +39,31 @@ renseignements aupr {elseif $cat eq binets} +

Les binets sont les associations des élèves polytechniciens effectuant leur scolarité à l'X (sur le plateau). Cette appellation, qui peut sembler étrange, est, pour certains, simplement un diminutif de "cabinet". Pour d'autres, elle aurait pour origine un certain général Binet, commandant l'Ecole Polytechnique, qui aurait le premier autorisé ces regroupements d'élèves. Les binets présents à l'Ecole n'ont pas tous leur site web présenté ici. Vous pouvez voir tous les sites des binets en cliquant ici. +

{elseif $cat eq institutions} +

De nombreuses organismes officiels sont liés à l'Ecole Polytechnique: le collège de l'Ecole Polytechnique, l'amicale des anciens élèves, le site des X sur le web Polytechnique.org, etc... Cette liste n'est pas exhaustive. Vous pouvez découvrir chacun de ces organismes en cliquant sur les liens correspondants: +

{elseif $cat eq promotions} +

Quelques promotions de polytechniciens ont mis au point leur propre site web, qui permet aux élèves de ces promotions d'organiser des repas promos, de faire partager des souvenirs photographiques, de se retrouver sur internet... En voici des exemples: +

{/if} diff --git a/templates/xnet/skin.tpl b/templates/xnet/skin.tpl index 2fec408..d454aaa 100644 --- a/templates/xnet/skin.tpl +++ b/templates/xnet/skin.tpl @@ -93,6 +93,22 @@ {/only_public} + {include file="skin/common.content.tpl"}