closes FS#176
authorx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 06:46:48 +0000 (06:46 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 06:46:48 +0000 (06:46 +0000)
htdocs/listes/trombi.php
htdocs/mescontacts.php
include/trombi.inc.php
templates/include/trombi.tpl

index 5aaa120..34f5e18 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: trombi.php,v 1.10 2004-10-31 14:42:36 x2000habouzit Exp $
+        $Id: trombi.php,v 1.11 2004-11-02 06:46:49 x2000habouzit Exp $
  ***************************************************************************/
 
 if(empty($_REQUEST['liste'])) header('Location: index.php');
@@ -76,6 +76,7 @@ if(is_array($owners)) {
     $page->assign_by_ref('owners',  $moderos);
     
     $trombi = new Trombi('getList');
+    $trombi->showPromo();
     $page->assign_by_ref('trombi',$trombi);
 } else
     $page->assign('no_list',true);
index 9490f5b..e6fe45c 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts.php,v 1.23 2004-10-31 17:40:01 x2000chevalier Exp $
+        $Id: mescontacts.php,v 1.24 2004-11-02 06:46:48 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -82,6 +82,7 @@ if(isset($_GET['trombi'])) {
     
     $trombi = new Trombi('getList');
     $trombi->setNbRows(4);
+    $trombi->showPromo();
     $page->assign_by_ref('trombi',$trombi);
 } else {
     $sql = "SELECT contact AS id,
index a225416..5290c33 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
- $Id: trombi.inc.php,v 1.2 2004-10-29 01:51:32 x2000habouzit Exp $
+ $Id: trombi.inc.php,v 1.3 2004-11-02 06:46:49 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once('xorg.plugin.inc.php');
@@ -27,9 +27,11 @@ class Trombi extends XOrgPlugin {
     var $_get_vars = Array('offset');
     var $limit = 24;
     var $admin = false;
+    var $showpromo = false;
 
     function setNbRows($row) { $this->limit = $row*3; }
     function setAdmin() { $this->admin = true; }
+    function showPromo() { $this->showpromo = true; }
     
     function show() {
        /* this point is nasty...  but since show() is called from the template ...
@@ -52,6 +54,7 @@ class Trombi extends XOrgPlugin {
            $links[] = Array ('u' => $this->make_url($offset+1), 'i' => $offset+1, 'text' => 'suivant');
        }
 
+       $page->assign_by_ref('trombi_show_promo', $this->showpromo);
        $page->assign_by_ref('trombi_list', $list);
        $page->assign_by_ref('trombi_links', $links);
        $page->assign('trombi_admin', $this->admin);
index 74f5987..d07978f 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: trombi.tpl,v 1.3 2004-10-29 02:16:43 x2000habouzit Exp $
+        $Id: trombi.tpl,v 1.4 2004-11-02 06:46:50 x2000habouzit Exp $
  ***************************************************************************}
 
 {dynamic}
@@ -39,7 +39,7 @@
       {/if}
       <br />
       <a href="javascript:x()" onclick="popWin('{"fiche.php"|url}?user={$p.forlife}')">
-        {$p.prenom} {$p.nom} ({$p.promo})
+        {$p.prenom} {$p.nom}{if $trombi_show_promo}({$p.promo}){/if}
       </a>
     </td>
   {if $loop eq "3"}