X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxnet%2Fpage.inc.php;h=8e19fa2bb4a878e8dede63b0c6d4fed06418e94f;hb=493b6abebf3d6c35691f66fd1bfdc063efaab576;hp=7bb8971c63b0723813f03ffbd73db41dd911a7b2;hpb=59ff13cf84e8b465220e0183c93053756cfeaf63;p=platal.git diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 7bb8971..8e19fa2 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -1,6 +1,6 @@ nomenu) { + $this->useMenu(); + } $this->_run('xnet/skin.tpl'); } @@ -63,32 +66,29 @@ class XnetPage extends PlatalPage $menu = array(); - if (S::logged()) { - $sub = array(); - $sub['déconnexion'] = 'exit'; - $menu['no_title'] = $sub; - } - $sub = array(); - $sub['accueil'] = ''; $sub['liste des groupes'] = 'plan'; - $menu["Menu Principal"] = $sub; - - if (S::logged() && (is_member() || may_update())) { + $sub['documentation'] = 'Xnet'; + $sub['signaler un bug'] = array('href' => 'send_bug', 'class' => 'popup_840x600'); + $menu["no_title"] = $sub; + + if (S::logged() && $globals->asso()) { $sub = array(); $dim = $globals->asso('diminutif'); - $sub['présentation'] = "$dim/"; - if (may_update() || $globals->asso('pub') == 'public') { + $sub['présentation'] = "login/$dim/"; + if (may_update() || (is_member() && $globals->asso('pub') == 'public') + || $globals->asso('cat') == 'Promotions') { $sub['annuaire du groupe'] = "$dim/annuaire"; - if ($globals->xnet->geoloc) - $sub['carte'] = "$dim/geoloc.php"; + $sub['trombinoscope'] = "$dim/trombi"; + $sub['carte'] = "$dim/geoloc"; } - if ($globals->asso('mail_domain')) { + if ((is_member() || may_update()) && $globals->asso('mail_domain')) { $sub['listes de diffusion'] = "$dim/lists"; - $sub['envoyer un mail'] = "$dim/mail"; } - $sub['événement'] = "$dim/events"; - $sub['télépaiement'] = "$dim/paiement"; + $sub['événement'] = "$dim/events"; + if (may_update() || is_member()) { + $sub['télépaiement'] = "$dim/payment"; + } $menu[$globals->asso('nom')] = $sub; } @@ -96,14 +96,22 @@ class XnetPage extends PlatalPage if (S::logged() && may_update()) { $sub = array(); $sub['modifier l\'accueil'] = "$dim/edit"; + $sub['gérer les annonces'] = "$dim/admin/announces"; if ($globals->asso('mail_domain')) { - $sub['créer une liste'] = "$dim/lists/create"; - $sub['créer un alias'] = "$dim/alias/create"; + $sub['envoyer un mail'] = "$dim/mail"; + $sub['créer une liste'] = "$dim/lists/create"; + $sub['créer un alias'] = "$dim/alias/create"; } if (S::has_perms()) { - $sub['gérer les groupes'] = 'admin'; + $sub['gérer les groupes'] = array('href' => 'admin', 'style' => 'color: gray;'); + $sub['clear cache'] = array('href' => 'purge_cache', 'style' => 'color: gray;'); } $menu['Administrer'] = $sub; + } elseif (S::has_perms()) { + $sub = array(); + $sub['gérer les groupes'] = 'admin'; + $sub['clear cache'] = 'purge_cache'; + $menu['Administrer'] = $sub; } $this->assign('menu', $menu); @@ -124,9 +132,10 @@ function list_all_my_groups($params) FROM groupex.asso AS a INNER JOIN groupex.membres AS m ON m.asso_id = a.id WHERE m.uid={?}", S::v('uid')); - $html = '
Mes groupes :
'; + $links = 'déconnexion'; + $html = '
Mes groupes (' . $links . ') :
'; while (list($nom, $mini) = $res->next()) { - $html .= "• $nom"; + $html .= "$nom"; } return $html; } @@ -148,5 +157,5 @@ function cat_pp($cat) // }}} -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>