Adds explanations for the different types of names.
authorStéphane Jacob <jacou@melix.net>
Thu, 8 Jan 2009 15:04:56 +0000 (16:04 +0100)
committerStéphane Jacob <jacou@melix.net>
Fri, 9 Jan 2009 00:23:39 +0000 (01:23 +0100)
modules/profile.php
templates/profile/general.tpl
templates/profile/name_info.tpl [new file with mode: 0644]
upgrade/newdirectory-0.0.1/00_names.sql

index 386dca6..7ae3acf 100644 (file)
@@ -46,6 +46,7 @@ class ProfileModule extends PLModule
             'javascript/education.js'    => $this->make_hook('education_js',               AUTH_COOKIE),
             'javascript/grades.js'       => $this->make_hook('grades_js',                  AUTH_COOKIE),
             'profile/medal'              => $this->make_hook('medal',                      AUTH_PUBLIC),
+            'profile/name_info'          => $this->make_hook('name_info',                  AUTH_PUBLIC),
             'profile/orange'             => $this->make_hook('p_orange',                   AUTH_MDP),
             'profile/usage'              => $this->make_hook('p_usage',                    AUTH_MDP),
 
@@ -139,6 +140,19 @@ class ProfileModule extends PLModule
         exit;
     }
 
+    function handler_name_info(&$page)
+    {
+        header('Content-Type: text/html; charset=utf-8');
+        $page->changeTpl('profile/name_info.tpl', SIMPLE);
+        $res = XDB::iterator("SELECT  name, explanations,
+                                      FIND_IN_SET('public', flags) AS public,
+                                      FIND_IN_SET('has_particle', flags) AS has_particle
+                                FROM  profile_name_search_enum
+                               WHERE  NOT FIND_IN_SET('not_displayed', flags)
+                            ORDER BY  NOT FIND_IN_SET('public', flags)");
+        $page->assign('types', $res);
+    }
+
     function handler_networking(&$page, $mid)
     {
         $res = XDB::query("SELECT  icon
index ac1df2c..7827677 100644 (file)
@@ -47,7 +47,7 @@
   </tr>
   <tr>
     <td>
-      <span class="titre">Comment t'appeller</span>
+      <span class="titre">Comment t'appeller</span><br />
       <span class="smaller">sur le site, dans la lettre mensuelle...</span>
     </td>
     <td>
@@ -61,7 +61,7 @@
       <span class="smaller">Ils déterminent la façon dont ton nom apparaît sur les annuaires
       en ligne et papier et ta fiche apparaitra quand on cherche un de ces noms. Pour plus
       d'explications sur l'icône suivante
-      <a href="profile/name_info">{icon name="information" title="Plus d'infos"}</a>.</span><br/>
+      <a href="profile/name_info" class="popup3">{icon name="information" title="Plus d'infos"}</a>.</span><br/>
       <div class="small center">Si un de tes noms commence par une particule,
       coche la case en bout de ligne.</div>
     </td>
diff --git a/templates/profile/name_info.tpl b/templates/profile/name_info.tpl
new file mode 100644 (file)
index 0000000..8e6244d
--- /dev/null
@@ -0,0 +1,57 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Les différents types de noms</h1>
+<table class="bicol" style="margin-bottom: 1em" summary="Explications sur les différents types de noms">
+  <tr>
+    <th>Type</th>
+    <th>Description</th>
+    <th>Confidentialité&nbsp;&sup1;</th>
+    <th>Prise en compte de la particule&nbsp;&sup2;</th>
+  <tr>
+  </tr>
+  {iterate from=$types item=type}
+  <tr>
+    <td>{$type.name}</td>
+    <td>{$type.explanations}</td>
+    <td class="center">
+      {if $type.public}
+        {icon name="flag_green" title="site public"}
+      {else}
+        {icon name="flag_red" title="site privé"}
+      {/if}
+    </td>
+    <td class="center">{if $type.has_particle}Oui{else}Non{/if}</td>
+  </tr>
+  {/iterate}
+</table>
+
+<h2>Légende :</h2>
+<ul>
+<li>&sup1;&nbsp;{icon name="flag_green" title="site public"} signifie que les données sont visibles
+  sur la partie publique du site alors que {icon name="flag_red" title="site privé"} indique
+  qu'elles sont cantonnées au site privé.</li>
+<li>&sup2;&nbsp;Pour les types concernés, il faut cocher la case en bout de ligne si le nom débute
+  par une particule, comme cela tu seras correctement classé dans l'ordre alphabétique.</li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 5359a9e..fdbea10 100644 (file)
@@ -33,18 +33,21 @@ CREATE TABLE IF NOT EXISTS profile_name_search_enum (
   UNIQUE (name)
 ) CHARSET=utf8;
 
-INSERT INTO  profile_name_search_enum (name, flags)
-     VALUES  ('Nom patronymique', 'has_particle,always_displayed,public'),
-             ('Nom marital', 'has_particle,always_displayed,public'),
-             ('Nom usuel', 'has_particle,always_displayed,public'),
-             ('Prénom', 'always_displayed,public'),
-             ('Pseudonyme (nom de plume)', 'always_displayed,public'),
-             ('Surnom', ''),
-             ('Prénom usuel', 'public'),
-             ('Autre prénom', ''),
-             ('Autre nom', ''),
-             ('Nom initial', 'has_particle,not_displayed,public'),
-             ('Prénom initial', 'has_particle,not_displayed,public');
+INSERT INTO  profile_name_search_enum (name, flags, explanations)
+     VALUES  ('Nom patronymique', 'has_particle,always_displayed,public', 'Le nom de famille avec lequel tu es né'),
+             ('Nom marital', 'has_particle,always_displayed,public',
+              'Ton nom d\'épouse ou d\'époux'),
+             ('Nom usuel', 'has_particle,always_displayed,public',
+              'Le nom de famille que tu utilises usuellement s\'il est différent du nom patronymique, ce peut-être une  version racourcie de celui-ci, ton nom marital, une combianaison de ces deux noms...'),
+             ('Prénom', 'always_displayed,public', 'Ton prénom'),
+             ('Pseudonyme (nom de plume)', 'always_displayed,public',
+              'Pseudonyme pour les artistes, gens de lettres'),
+             ('Surnom', '', 'Surnom à l\'École ou ailleurs'),
+             ('Prénom usuel', 'public', 'Si tu utilises une version raccourcie, francisée... de ton prénom'),
+             ('Autre prénom', '', 'Si tu as d\'autres prénoms et que tu souhaites les faire apparaître'),
+             ('Autre nom', '', 'Si tu as d\'autres noms et que tu souhaites les faire apparaître'),
+             ('Nom initial', 'has_particle,not_displayed,public', ''),
+             ('Prénom initial', 'has_particle,not_displayed,public', '');
 
 
 DROP TABLE IF EXISTS profile_name_search;