add a new compilation plugin named 'icon'
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 23 Jul 2006 13:19:40 +0000 (13:19 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 23 Jul 2006 13:19:40 +0000 (13:19 +0000)
replace retirer.gif with famfamfam cross.png as a proof of concept

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@590 839d8a87-29fc-0310-9880-83ba4fa771e5

14 files changed:
htdocs/css/openweb.css
htdocs/images/icons/cross.gif [new file with mode: 0644]
htdocs/images/retirer.gif [deleted file]
plugins/compiler.icon.php [new file with mode: 0644]
templates/carnet/notifs.tpl
templates/fiche.tpl
templates/include/minifiche.tpl
templates/listes/admin.tpl
templates/listes/index.tpl
templates/listes/listes.inc.tpl
templates/listes/members.tpl
templates/listes/options.tpl
templates/listes/trombi.tpl
templates/login.tpl

index 269f730..65e6eb4 100644 (file)
@@ -35,7 +35,7 @@ body {
 a:link, a:visited { color: #f60; background: transparent; }
 a:active, a:hover { color: #369; background: transparent; }
 
-img   { vertical-align: middle; }
+img   { vertical-align: text-top; }
 a img { border: 0px; }
 td    { vertical-align: top; }
 li    { padding: 0em 1em; text-align: justify; }
diff --git a/htdocs/images/icons/cross.gif b/htdocs/images/icons/cross.gif
new file mode 100644 (file)
index 0000000..7008fdc
Binary files /dev/null and b/htdocs/images/icons/cross.gif differ
diff --git a/htdocs/images/retirer.gif b/htdocs/images/retirer.gif
deleted file mode 100644 (file)
index e368a3a..0000000
Binary files a/htdocs/images/retirer.gif and /dev/null differ
diff --git a/plugins/compiler.icon.php b/plugins/compiler.icon.php
new file mode 100644 (file)
index 0000000..f7478c6
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2006 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                *
+ ***************************************************************************/
+
+function smarty_compiler_icon($tag_attrs, &$compiler)
+{
+    extract($compiler->_parse_attrs($tag_attrs));
+
+    if (isset($title)) {
+        $title = 'title="'.htmlentities(trim($title, '\'"'), ENT_QUOTES).'" ';
+    }
+
+    $name = htmlentities(trim($name, '\'"'), ENT_QUOTES);
+
+    return "?><img src='images/icons/$name.gif' alt='' $title /><?php";
+}
+
+/* vim: set expandtab: */
+
+?>
index 38c7dbb..c34b4c5 100644 (file)
@@ -115,7 +115,7 @@ et cliquer sur les icones <img src="images/ajouter.gif" alt="Ajouter" /> pour le
       <ul>
         {foreach from=$watch->nonins() item=p}
         <li>
-        {$p.prenom} {$p.nom} ({$p.promo}) <a href="carnet/notifs/del_nonins/{$p.user_id}"><img src="images/retirer.gif" alt="retirer" /></a>
+        {$p.prenom} {$p.nom} ({$p.promo}) <a href="carnet/notifs/del_nonins/{$p.user_id}">{icon name='cross' title='retirer'}</a>
         </li>
         {/foreach}
       </ul>
index 4659747..0f3fa2f 100644 (file)
@@ -53,7 +53,7 @@ function chgMainWinLoc( strPage ) {
         </a>
         {else}
         <a href="javascript:x()"  onclick="chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}')">
-          <img src="images/retirer.gif" alt="Retirer de mes contacts" title="Retirer de mes contacts" />
+          {icon name=cross title="Retirer de mes contacts"}
         </a>
         {/if}
         {if $smarty.session.perms eq admin}
index b16f168..19f4b3a 100644 (file)
@@ -53,7 +53,7 @@
         *}<img src="images/ajouter.gif" alt="Ajouter à la liste de mes surveillances" title="Ajouter à la liste de mes surveillances" /></a>
       {else}
         <a href="carnet/notifs/del_nonins/{$c.user_id}">{*
-        *}<img src="images/retirer.gif" alt="Retirer de la liste de mes surveillances" title="Retirer de la liste de mes surveillances" /></a>
+        *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
       {/if}
     {elseif $c.wasinscrit}
         <a href="profile/{$c.forlife}" class="popup2">{*
index ec10594..34d73bf 100644 (file)
@@ -32,7 +32,7 @@ Tu n'es pas administrateur de la liste, mais du site.
 <p>
 Pour inscrire un utilisateur, il faut remplir les champs prévus à cet effet en saisissant un de
 ses identifiants, de la forme "prenom.nom", ou "prenom.nom.promo" en cas d'homonymie. Pour inscrire plusieurs utilisateurs, les séparer par des espaces.
-L'icône <img src='images/retirer.gif' alt='retirer membre' title='retirer membre' /> permet de désinscrire de la liste quelqu'un
+L'icône {icon name=cross title='retirer membre'} permet de désinscrire de la liste quelqu'un
 qui y était abonné.
 </p>
 
@@ -52,7 +52,7 @@ qui y 
         {else}
         {$x.l}
         {/if}
-        <a href='{$platal->pl_self(1)}?del_owner={$x.l}'><img src='images/retirer.gif' alt='retirer modérateur' title='retirer modérateur' /></a>
+        <a href='{$platal->pl_self(1)}?del_owner={$x.l}'>{icon name=cross title='retirer modérateur'}</a>
         <br />
         {/foreach}
       </td>
@@ -86,7 +86,7 @@ qui y 
         {else}
         {$x.l}
         {/if}
-        <a href='{$platal->pl_self(1)}?del_member={$x.l}'><img src='images/retirer.gif' alt='retirer membre' title='retirer membre' /></a>
+        <a href='{$platal->pl_self(1)}?del_member={$x.l}'>{icon name=cross title='retirer membre'}</a>
         <br />
         {/foreach}
       </td>
index 3e44d3a..504f828 100644 (file)
@@ -40,7 +40,7 @@ imm
 
 <p>
 Pour se désinscrire, il suffit de la même manière de cliquer sur l'icone
-<img src="images/retirer.gif" alt="[ désinscription ]" />.
+{icon name=cross title="désinscription"}.
 </p>
 
 <h2>La diffusion sur une liste de diffusion</h2>
index 0ed3a57..14a4302 100644 (file)
@@ -46,7 +46,7 @@
     <td class='right'>
       {if $liste.sub eq 2}
       <a href='{$platal->ns}lists?del={$liste.list}'>
-        <img src="images/retirer.gif" alt="[ désinscription ]" title="me désinscrire de {$liste.list}" />
+        {icon name=cross title="me désinscrire"}
       </a>
       {elseif $liste.sub eq 1}
       <img src="images/flag.png" alt="[ en cours ]" title='inscription en attente de modération' />
index c88b2ae..cef859c 100644 (file)
@@ -58,7 +58,7 @@
       {if $details.sub>1}
       Tu es inscrit sur la liste.<br />
       Te désinscrire :
-      <a href='{$platal->pl_self(1)}?del=1'><img src="images/retirer.gif" alt="[me désinsiscrire]" /></a>
+      <a href='{$platal->pl_self(1)}?del=1'>{icon name=cross title="me désinsiscrire"}</a>
       {elseif $details.sub eq 1}
       Ta demande d'inscription est en cours de validation.
       {else}
index 7c4a4a5..32a4ea9 100644 (file)
@@ -167,7 +167,7 @@ redirection en mode 'inactif'. le logiciel de mailing list saura se d
         {if $options.accept_these_nonmembers|@count}
         {foreach from=$options.accept_these_nonmembers item=addr}
         {$addr}<a href='{$platal->pl_self(1)}&amp;atn_del={$addr}'>
-          <img src="images/retirer.gif" alt='retirer de la whitelist' title="retirer {$addr} de la whitelist" />
+          {icon name=cross title="retirer de la whitelist"}
         </a><br />
         {/foreach}
         {else}
index 08adcab..694fe60 100644 (file)
@@ -54,7 +54,7 @@
       {if $details.sub>1}
       Tu es inscrit sur la liste.<br />
       Te désinscrire :
-      <a href='{$platal->pl_self(1)}?del=1'><img src="images/retirer.gif" alt="[me désinsiscrire]" /></a>
+      <a href='{$platal->pl_self(1)}?del=1'>{icon name=cross title="me désinscrire"}</a>
       {elseif $details.sub eq 1}
       Ta demande d'inscription est en cours de validation.
       {else}
index d68ad8e..39c2567 100644 (file)
@@ -83,7 +83,7 @@ Bienvenue {$smarty.session.prenom}
   <table class="bicol">
     <tr>
       <th>
-        <a href="events?lu={$ev.id}{if $previd}#newsid{$previd}{/if}" style="display:block;float:right"><img alt="Cacher" title="Cacher cet article" src="images/retirer.gif"/></a>
+        <a href="events?lu={$ev.id}{if $previd}#newsid{$previd}{/if}" style="display:block;float:right">{icon name=cross title="Cacher cet article"}</a>
         {assign var="previd" value=$ev.id}
         <a id="newsid{$ev.id}"></a>
         {tidy}