Merge %grp/annuaire, %grp/trombi and %grp/geoloc
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 2 Apr 2007 20:48:41 +0000 (20:48 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 2 Apr 2007 20:48:41 +0000 (20:48 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1660 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
modules/geoloc.php
modules/xnetgrp.php
templates/xnetgrp/annuaire.tpl
templates/xnetgrp/trombi.tpl [deleted file]

index 5e83097..eb687ab 100644 (file)
--- 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:
index 0336637..cc437ea 100644 (file)
@@ -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'),
         );
index 9049d47..a226054 100644 (file)
@@ -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)
index fede4cc..28bdbd7 100644 (file)
@@ -57,6 +57,10 @@ Tu peux également :
   </li>
 </ul>
 
+{if $plset_base}
+{include file="core/plset.tpl"}
+{else}
+
 <p class="center">
 [<a href="{$platal->ns}annuaire?order={$smarty.request.order}" {if !$only_admin}class="erreur"{/if}>tous les membres</a>]
 [<a href="{$platal->ns}annuaire?order={$smarty.request.order}&amp;admin=1" {if $only_admin}class="erreur"{/if}>administrateurs</a>]<br/>
@@ -143,4 +147,6 @@ Tu peux également :
 </p>
 {/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 (file)
index 1b3e489..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{**************************************************************************}\r
-{*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
-{*  http://opensource.polytechnique.org/                                  *}\r
-{*                                                                        *}\r
-{*  This program is free software; you can redistribute it and/or modify  *}\r
-{*  it under the terms of the GNU General Public License as published by  *}\r
-{*  the Free Software Foundation; either version 2 of the License, or     *}\r
-{*  (at your option) any later version.                                   *}\r
-{*                                                                        *}\r
-{*  This program is distributed in the hope that it will be useful,       *}\r
-{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}\r
-{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}\r
-{*  GNU General Public License for more details.                          *}\r
-{*                                                                        *}\r
-{*  You should have received a copy of the GNU General Public License     *}\r
-{*  along with this program; if not, write to the Free Software           *}\r
-{*  Foundation, Inc.,                                                     *}\r
-{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}\r
-{*                                                                        *}\r
-{**************************************************************************}\r
-\r
-<h1>\r
-  Trombinoscope du groupe\r
-</h1>\r
-<p>\r
-{if $trombi}\r
-\r
-{$trombi->show()|smarty:nodefaults}\r
-\r
-{/if}\r
-\r
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}\r