some improvements in search + contacts. closes FS#110
authorx2000habouzit <x2000habouzit>
Mon, 25 Oct 2004 12:41:03 +0000 (12:41 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 25 Oct 2004 12:41:03 +0000 (12:41 +0000)
ChangeLog
htdocs/images/man.png [new file with mode: 0644]
htdocs/images/woman.png [new file with mode: 0644]
htdocs/mescontacts.php
htdocs/search.php
include/search.classes.inc.php
templates/include/minifiche.tpl
templates/include/minifiche_pvt.tpl
templates/search.form.tpl

index 2de86ff..a6b7710 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,41 +4,42 @@ VERSION 0.9.1                                                                                                          25 Oct 2004
 Changes :
 
        * Lists :
-               - auto-moderate/discard mails detected as SPAM by bogofilter.           -MC
-               - improve header/subject decoding.                                                                      -MC
-               - alpha-sort on listes/admin.php + msgs for each operations.            -MC
+               - Auto-moderate/discard mails detected as SPAM by bogofilter.           -MC
+               - Improve header/subject decoding.                                                                      -MC
+               - Alpha-sort on listes/admin.php + msgs for each operations.            -MC
                - 1-click moderation for accept and reject cases.                                       -MC
        
        * Usability :
-               - all <a><img ... /></a> now have title (closes: FS#99).                        -MC
+               - All <a><img ... /></a> now have title (closes: FS#99).                        -MC
 
        * NewsLetter :
                - Brand New NewsLetter module.                                                                          -MC
                - Convert old archive to new model.                                                                     -FAL
 
        * Search+Contacts :
-               - better things done for married women.                                                         -MC
-               - deceased members and non-subscribers special treatments.                      -MC
+               - Added sex icons.                                                                                                      -MC
+               - Better things done for married women.                                                         -MC
+               - Deceased members and non-subscribers special treatments.                      -MC
                - Mobile is now printed too.                                                                            -MC
                - People names are clickable.                                                                           -MC
                - Unified template.                                                                                                     -JS
 
        * Skins:
-               - liteskin.                                                                                                                     -XdX
+               - Liteskin.                                                                                                                     -XdX
 
 Fixes (from 0.9.0 branch) :
 
        * Lists :
-               - corrects problem about mails that have non text/* parts.                      -MC
-               - rpc daemon can live everywhere.                                                                       -MC
-               - moderation : refusing/rejecting a mail informs other moderators.      -MC
+               - Corrects problem about mails that have non text/* parts.                      -MC
+               - Rpc daemon can live everywhere.                                                                       -MC
+               - Moderation : refusing/rejecting a mail informs other moderators.      -MC
        
        * Fiche + Search :
-               - corrects bad handling of firms.                                                                       -MC
-               - we used the bad table to search functions names.                                      -MC
+               - Corrects bad handling of firms.                                                                       -MC
+               - We used the bad table to search functions names.                                      -MC
 
        * Skins :
-               - minor updates.                                                                                                        -FRU
+               - Minor updates.                                                                                                        -FRU
 
 ================================================================================
 VERSION 0.9.0                                                                                                       15 Oct 2004
diff --git a/htdocs/images/man.png b/htdocs/images/man.png
new file mode 100644 (file)
index 0000000..07698a1
Binary files /dev/null and b/htdocs/images/man.png differ
diff --git a/htdocs/images/woman.png b/htdocs/images/woman.png
new file mode 100644 (file)
index 0000000..aa0f3c3
Binary files /dev/null and b/htdocs/images/woman.png differ
index 5284abf..0c760af 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: mescontacts.php,v 1.16 2004-10-22 12:12:23 x2000habouzit Exp $
+        $Id: mescontacts.php,v 1.17 2004-10-25 12:41:04 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -59,7 +59,7 @@ if (isset($_REQUEST['action'])) {
 
 $sql = "SELECT contact AS id,
                a.*, l.alias AS forlife,
-               i.deces != 0 AS dcd, i.deces, i.matricule_ax,
+               i.deces != 0 AS dcd, i.deces, i.matricule_ax, FIND_IN_SET('femme', i.flags) AS sexe,
                e.entreprise, es.label AS secteur, ef.fonction_fr AS fonction,
                n.text AS nat,
                ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type,
index cd3bec4..a04f024 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.php,v 1.33 2004-10-24 14:21:30 x2000bedo Exp $
+        $Id: search.php,v 1.34 2004-10-25 12:41:04 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -50,7 +50,8 @@ if (array_key_exists('rechercher', $_REQUEST)) {
     }
     $promo1Field = new PromoSField('promo1','egal1',array('r.promo'),'');
     $promo2Field = new PromoSField('promo2','egal2',array('r.promo'),'');
-    $fields = new SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field));
+    $womanField = new RefSField('woman',array('FIND_IN_SET(i.flags,\'femme\')+1'),'','','');
+    $fields = new SFieldGroup(true,array($nameField,$firstnameField,$promo1Field,$promo2Field,$womanField));
     
     if ($nameField->length()<2 && $firstnameField->length()<2 && 
         (!logged() || !$promo1Field->is_a_single_promo()))
index 97e2f0b..c4bdb21 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.classes.inc.php,v 1.24 2004-10-24 14:21:35 x2000bedo Exp $
+        $Id: search.classes.inc.php,v 1.25 2004-10-25 12:41:05 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("xorg.misc.inc.php");
@@ -29,6 +29,7 @@ require_once("xorg.misc.inc.php");
 $globals->search_result_fields = '
                 u.epouse,u.date,u.web,u.mobile,
                 i.deces!=0 AS dcd,i.deces,
+               FIND_IN_SET(\'femme\', i.flags) AS sexe,
                 ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type,
                 ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type,
                 e.entreprise, es.label AS secteur, ef.fonction_fr AS fonction,
index 7cd1ad3..f2e5f94 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: minifiche.tpl,v 1.3 2004-10-25 11:55:00 x2000habouzit Exp $
+        $Id: minifiche.tpl,v 1.4 2004-10-25 12:41:05 x2000habouzit Exp $
  ***************************************************************************}
 
 
 <div class="contact" {min_auth level='cookie'}title="fiche mise à jour le {$c.date|date_format:"%d %b %Y"}"{/min_auth}>
   <div class="nom">
+    {if $c.sexe}
+    <img src="{"images/woman.png"|url}" alt="[femme]" style='margin-right: 4px;' />
+    {else}
+    <img src="{"images/man.png"|url}" alt="[homme]" style='margin-right: 4px;' />
+    {/if}
     {min_auth level="cookie"}
     {if !$c.dcd && $inscrit}
     <a href="javascript:x()" onclick="popWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">
index 833292f..dd88ca3 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: minifiche_pvt.tpl,v 1.4 2004-10-25 11:55:00 x2000habouzit Exp $
+        $Id: minifiche_pvt.tpl,v 1.5 2004-10-25 12:41:05 x2000habouzit Exp $
  ***************************************************************************}
 
 
@@ -84,9 +84,8 @@
       <tr>
         <td class="lt">Profession:</td>
         <td class="rt">
-          {$c.entreprise}
-          {if $c.secteur}( {$c.secteur} ){/if}
-          {if $c.fonction}<br />( {$c.fonction} ){/if}
+          {$c.entreprise} {if $c.secteur}({$c.secteur}){/if}
+          {if $c.fonction}<br />{$c.fonction}{/if}
         </td>
       </tr>
       {/if}
index 558dae4..e3b55b7 100644 (file)
@@ -17,7 +17,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.form.tpl,v 1.21 2004-10-24 14:41:11 x2000habouzit Exp $
+        $Id: search.form.tpl,v 1.22 2004-10-25 12:41:05 x2000habouzit Exp $
  ***************************************************************************}
 
 <h1>
@@ -69,7 +69,6 @@
         <input type="text" name="promo2" size="4" maxlength="4" value="{$smarty.request.promo2}" />
       </td>
     </tr>
-{if $advanced eq "1"}
     <tr>
       <td>Sexe</td>
       <td>
@@ -78,6 +77,7 @@
         <input type="radio" name="woman" value="2" />Femme
       </td>
     </tr>
+{if $advanced eq "1"}
     <tr>
       <th colspan="2">Géographie</th>
     </tr>