Wiki for CV and add wiki preview for user freetext
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 26 Mar 2007 15:39:45 +0000 (15:39 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 26 Mar 2007 15:39:45 +0000 (15:39 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1613 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/platalpage.php
modules/profile.php
templates/profile/emploi.tpl
templates/profile/general.tpl
templates/profile/profile.tpl

index e3cf01f..3cb32a2 100644 (file)
@@ -54,6 +54,7 @@ class PlatalPage extends Smarty
         $this->_failure   = false;
 
         $this->register_prefilter('at_to_globals');
+        $this->addJsLink('xorg.js');
     }
 
     // }}}
@@ -87,7 +88,6 @@ class PlatalPage extends Smarty
 
         $this->register_prefilter('trimwhitespace');
         $this->register_prefilter('form_force_encodings');
-        $this->addJsLink('xorg.js');
         $this->assign('xorg_errors', $this->_errors);
         $this->assign('xorg_failure', $this->_failure);
         $this->assign('globals', $globals);
index c80edf7..63102d6 100644 (file)
@@ -206,6 +206,7 @@ class ProfileModule extends PLModule
         $new   = Env::v('modif') == 'new';
         $user  = get_user_details($login, S::v('uid'), $view);
         $user['freetext'] = MiniWiki::WikiToHTML($user['freetext']);
+        $user['cv']       = MiniWiki::WikiToHTML($user['cv']);
         $title = $user['prenom'] . ' ' . empty($user['nom_usage']) ? $user['nom'] : $user['nom_usage'];
         $page->assign('xorg_title', $title);
 
index 98545dd..3867049 100644 (file)
       <td class="dcolg">
         <span class="titre">Curriculum vitae</span><br />
         <span class="comm">Le CV n'est <strong>jamais</strong> public.<br />
-          <a href="Xorg/FAQ?display=light#cv" class="popup_800x480">Comment remplir mon CV ?</a></span>
+          <a href="Xorg/FAQ?display=light#cv" class="popup_800x480">Comment remplir mon CV ?</a></span><br />
+        <span class="comm"><a href="wiki_help" class="popup3">{icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki</a></span>
       </td>
       <td class="dcold">
-        <textarea name="cv" rows="15" cols="33">{$cv}</textarea>
+        <script type="text/javascript" src="javascript/ajax.js"></script>
+        <div id="cv_preview" style="display: none"></div>
+        <textarea name="cv" id="cv" rows="15" cols="40">{$cv}</textarea><br />
+        <input type="submit" name="preview" value="Aperçu" onclick="previewWiki('cv',  'cv_preview', true, 'cv_preview'); return false;" />
       </td>
     </tr>
   </table>
index 8b6b737..227f20d 100644 (file)
         <span class="comm">Commentaire ? ICQ ? etc...</span>
       </td>
       <td class="dcold">
-        <textarea name="freetext" rows="3" cols="29" >{$freetext}</textarea>
+        <script type="text/javascript" src="javascript/ajax.js"></script>
+        <div id="ft_preview" style="display: none"></div>
+        <textarea name="freetext" id="freetext" rows="3" cols="29" >{$freetext}</textarea>
         <br/>
         <span class="smaller">
           <a href="wiki_help/notitle" class="popup3">
             {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour le commentaire
           </a>
-        </span>
+        </span><br />
+        <input type="submit" name="preview" value="Aperçu" onclick="previewWiki('freetext', 'ft_preview', true, 'ft_preview'); return false;" />
       </td>
     </tr>
   </table>
index 2d62265..9891c95 100644 (file)
@@ -127,7 +127,7 @@ function chgMainWinLoc(strPage) {
       {if $x.gpxs_join}<div><em class="intitule">Groupe(s) X : </em><span>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
       {/if}
       {if $x.web}<div><em class="intitule">Site Web : </em><a href="{$x.web}" class='popup'>{$x.web}</a></div>{/if}
-      {if $x.freetext}<div><em class="intitule">Commentaires : </em><br /><span>{$x.freetext|nl2br|smarty:nodefaults}</span></div>{/if}
+      {if $x.freetext}<div><em class="intitule">Commentaires : </em><br /><span>{$x.freetext|smarty:nodefaults}</span></div>{/if}
     </td>
   </tr>
   {if $x.adr}
@@ -185,7 +185,7 @@ function chgMainWinLoc(strPage) {
   <tr>
     <td>
       <h2>Curriculum Vitae :</h2>
-      {$x.cv|nl2br}
+      {$x.cv|smarty:nodefaults}
     </td>
   </tr>
   {/if}