From a91fb58440b6dbe3a4ba023520fff0e2be5f5000 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 2 Apr 2007 20:48:41 +0000 Subject: [PATCH] Merge %grp/annuaire, %grp/trombi and %grp/geoloc git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1660 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 2 ++ modules/geoloc.php | 1 - modules/xnetgrp.php | 24 +++++++++++++++++++----- templates/xnetgrp/annuaire.tpl | 6 ++++++ templates/xnetgrp/trombi.tpl | 33 --------------------------------- 5 files changed, 27 insertions(+), 39 deletions(-) delete mode 100644 templates/xnetgrp/trombi.tpl diff --git a/ChangeLog b/ChangeLog index 5e83097..eb687ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ New: - New Backtrace tool -FRU - New Upload manager -FRU - #641: Miniwiki syntax -Car/FRU + - New PlSet: Model/View tool for displaying a set of user -FRU * Events: - #642: Can add an image -FRU @@ -36,6 +37,7 @@ Bug/Wish: - #407: RSS feed -FRU * Carnet: + - #448: Geoloc for contacts -FRU - #510: Use RSS hash to get iCal -FRU * Core: diff --git a/modules/geoloc.php b/modules/geoloc.php index 0336637..cc437ea 100644 --- a/modules/geoloc.php +++ b/modules/geoloc.php @@ -25,7 +25,6 @@ class GeolocModule extends PLModule { return array( 'geoloc' => $this->make_hook('default', AUTH_COOKIE), - '%grp/geoloc' => $this->make_hook('default',AUTH_COOKIE), 'admin/geoloc' => $this->make_hook('admin', AUTH_MDP, 'admin'), 'admin/geoloc/dynamap' => $this->make_hook('admin_dynamap', AUTH_MDP, 'admin'), ); diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 9049d47..a226054 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -83,6 +83,7 @@ class XnetGrpModule extends PLModule '%grp/annuaire' => $this->make_hook('annuaire', AUTH_MDP, 'groupannu'), '%grp/annuaire/vcard' => $this->make_hook('vcard', AUTH_MDP, 'groupmember:groupannu'), '%grp/trombi' => $this->make_hook('trombi', AUTH_MDP, 'groupannu'), + '%grp/geoloc' => $this->make_hook('geoloc', AUTH_MDP, 'groupannu'), '%grp/subscribe' => $this->make_hook('subscribe', AUTH_MDP), '%grp/unsubscribe' => $this->make_hook('unsubscribe', AUTH_MDP, 'groupmember'), @@ -323,9 +324,19 @@ class XnetGrpModule extends PLModule run_banana($page, 'ForumsBanana', $get); } - function handler_annuaire(&$page) + function handler_annuaire(&$page, $action = null, $subaction = null) { global $globals; + + if ($action == 'geoloc' || $action == 'trombi') { + $view = new UserSet(); + $view->addMod('trombi', 'Trombinoscope'); + $view->addMod('geoloc', 'Planisphère'); + $view->apply('annuaire', $page, $action, $subaction); + if ($action == 'geoloc' && $subaction) { + return; + } + } $page->changeTpl('xnetgrp/annuaire.tpl'); $sort = Env::v('order'); @@ -426,11 +437,14 @@ class XnetGrpModule extends PLModule $page->jsonAssign('ann', $ann); } - function handler_trombi(&$page, $action = null, $subaction = null) + function handler_trombi(&$page) + { + pl_redirect('annuaire/trombi'); + } + + function handler_geoloc(&$page) { - $view = new UserSet(); - $view->addMod('trombi', 'Trombinoscope', true, array('with_admin' => false, 'with_promo' => true)); - $view->apply('trombi', $page, 'trombi', $action, $subaction); + pl_redirect('annuaire/geoloc'); } function handler_vcard(&$page, $photos = null) diff --git a/templates/xnetgrp/annuaire.tpl b/templates/xnetgrp/annuaire.tpl index fede4cc..28bdbd7 100644 --- a/templates/xnetgrp/annuaire.tpl +++ b/templates/xnetgrp/annuaire.tpl @@ -57,6 +57,10 @@ Tu peux également : +{if $plset_base} +{include file="core/plset.tpl"} +{else} +

[tous les membres] [administrateurs]
@@ -143,4 +147,6 @@ Tu peux également :

{/if} +{/if} + {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/xnetgrp/trombi.tpl b/templates/xnetgrp/trombi.tpl deleted file mode 100644 index 1b3e489..0000000 --- a/templates/xnetgrp/trombi.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{**************************************************************************} -{* *} -{* Copyright (C) 2003-2007 Polytechnique.org *} -{* http://opensource.polytechnique.org/ *} -{* *} -{* This program is free software; you can redistribute it and/or modify *} -{* it under the terms of the GNU General Public License as published by *} -{* the Free Software Foundation; either version 2 of the License, or *} -{* (at your option) any later version. *} -{* *} -{* This program is distributed in the hope that it will be useful, *} -{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} -{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} -{* GNU General Public License for more details. *} -{* *} -{* You should have received a copy of the GNU General Public License *} -{* along with this program; if not, write to the Free Software *} -{* Foundation, Inc., *} -{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} -{* *} -{**************************************************************************} - -

- Trombinoscope du groupe -

-

-{if $trombi} - -{$trombi->show()|smarty:nodefaults} - -{/if} - -{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} -- 2.1.4