Because CSS sucks, I've been forced to hard code the flags for
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 3 Oct 2007 22:22:04 +0000 (00:22 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 3 Oct 2007 22:22:04 +0000 (00:22 +0200)
public/private/ax states in profile. So, it looks great on all browsers, but
it is not anymore a skin specific skinning.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
16 files changed:
htdocs/css/default.css
htdocs/css/keynote.css
htdocs/css/openweb.css
modules/profile/page.inc.php
templates/include/flags.radio.tpl
templates/profile/adresses.address.tpl
templates/profile/adresses.tel.tpl
templates/profile/base.tpl
templates/profile/deco.tpl
templates/profile/general.tpl
templates/profile/groups.tpl
templates/profile/jobs.job.tpl
templates/profile/jobs.tpl
templates/profile/mentor.tpl
templates/profile/skill.tpl
templates/profile/trombino.tpl

index 39d5aee..fa1589f 100644 (file)
@@ -333,23 +333,14 @@ div.long td.rt { width: 65%; }
     margin-left: 16px;
 }
 
-.flags input {
-    padding: 0 0px 0 16px;
-    width: 32px;
-}
 .flags .texte {
     font-size: smaller;
     font-weight: bold;
-    padding: 0 8px 0 0;
-}
-.flags .vert {
-    background: url('../images/icons/flag_green.gif') top right no-repeat;
-}
-.flags .orange {
-    background: url('../images/icons/flag_orange.gif') top right no-repeat;
+    margin-left: -6px;
+    padding: 0 12px 0 0;
 }
-.flags .rouge {
-    background: url('../images/icons/flag_red.gif') top right no-repeat;
+.flags img {
+    padding: 0 6px 0 0;
 }
 
 table.cadre_a_onglet{
index 725bc91..23f39a2 100644 (file)
@@ -345,23 +345,14 @@ div.long td.rt { width: 65%; }
     margin-left: 16px;
 }
 
-.flags input {
-    padding: 0 0px 0 16px;
-    width: 32px;
-}
 .flags .texte {
     font-size: smaller;
     font-weight: bold;
-    padding: 0 8px 0 0;
-}
-.flags .vert {
-    background: url('../images/icons/flag_green.gif') top right no-repeat;
-}
-.flags .orange {
-    background: url('../images/icons/flag_orange.gif') top right no-repeat;
+    margin-left: -6px;
+    padding: 0 12px 0 0;
 }
-.flags .rouge {
-    background: url('../images/icons/flag_red.gif') top right no-repeat;
+.flags img {
+    padding: 0 6px 0 0;
 }
 
 table.cadre_a_onglet{
index 8644bba..f723a8e 100644 (file)
@@ -325,23 +325,14 @@ div.long td.rt { width: 65%; }
     margin-right: 1em;
 }
 
-.flags input {
-    padding: 0 0px 0 16px;
-    width: 32px;
-}
 .flags .texte {
     font-size: smaller;
     font-weight: bold;
-    padding: 0 8px 0 0;
-}
-.flags .vert {
-    background: url('../images/icons/flag_green.gif') top right no-repeat;
-}
-.flags .orange {
-    background: url('../images/icons/flag_orange.gif') top right no-repeat;
+    margin-left: -6px;
+    padding: 0 12px 0 0;
 }
-.flags .rouge {
-    background: url('../images/icons/flag_red.gif') top right no-repeat;
+.flags img {
+    padding: 0 6px 0 0;
 }
 
 table.cadre_a_onglet{
index ec0ed62..a7dada8 100644 (file)
@@ -121,7 +121,7 @@ class ProfileBool extends ProfileNoSave
         if (is_null($value)) {
             $value = @$page->values[$field];
         }
-        return $value ? 1 : 0;
+        return $value ? "1" : "";
     }
 }
 
index 1c21d20..d8f3f8a 100644 (file)
 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
 {*                                                                        *}
 {**************************************************************************}
-{if $display eq "mini"}
-<td class="vert">
-  <input type="radio" name="{$name}" value="public" {if $val eq 'public'}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if} />
-</td>
-<td class="orange">
-  <input type="radio" name="{$name}" value="ax" {if $val eq 'ax'}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if}/>
-</td>
-<td class="rouge">
-  <input type="radio" name="{$name}" value="private" {if $val eq 'private' || (!$val && !$disabled)}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if}/>
-</td>
-{elseif $display eq "div"}
-<span class="vert">
-  <input type="radio" name="{$name}" value="public" {if $val eq 'public'}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if}/>
-</span>
-<span class="orange">
-  <input type="radio" name="{$name}" value="ax" {if $val eq 'ax'}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if}/>
-</span>
-<span class="rouge">
-  <input type="radio" name="{$name}" value="private" {if $val eq 'private' || (!$val && !$disabled)}checked="checked"{/if}
-         {if $disabled}disabled="disabled"{/if}/>
-</span>
-{else}
-  {if !$notable}
-    <tr>
-      <td colspan="5" class="pflags">
-  {/if}
-        <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
-          <tr>
-            <td class="vert">
-              <input type="radio" name="{$name}" value="public" {if $val eq 'public'}checked="checked"{/if}
-                     {if $disabled}disabled="disabled"{/if} />
-            </td>
-            <td class="texte">
-              site public
-            </td>
-            <td class="orange">
-              <input type="radio" name="{$name}" value="ax" {if $val eq 'ax'}checked="checked"{/if}
-                     {if $disabled}disabled="disabled"{/if}/>
-            </td>
-            <td class="texte">
-              transmis à l'AX
-            </td>
-            <td class="rouge">
-              <input type="radio" name="{$name}" value="private" {if $val eq 'private' || (!$val && !$disabled)}checked="checked"{/if}
-                     {if $disabled}disabled="disabled"{/if} />
-            </td>
-            <td class="texte">
-              privé
-            </td>
-            <td class="texte">
-              <a href="Xorg/FAQ?display=light#flags" class="popup_800x240">Quelle couleur ??</a>
-            </td>
-          </tr>
-        </table>
-  {if !$notable}
-      </td>
-    </tr>
-  {/if}
+{if $withtext}
+<a href="Xorg/FAQ?display=light#flags" class="popup_800x240">Quelle couleur ?</a>
 {/if}
+<input type="radio" name="{$name}" value="public" {if $val eq 'public'}checked="checked"{/if}
+       {if $disabled}disabled="disabled"{/if}/>
+{icon name="flag_green" title="site public"}
+{if $withtext}<span class="texte">site public</span>{/if}
+<input type="radio" name="{$name}" value="ax" {if $val eq 'ax'}checked="checked"{/if}
+       {if $disabled}disabled="disabled"{/if}/>
+{icon name="flag_orange" title="transmis à l'AX"}
+{if $withtext}<span class="texte">transmis à l'AX</span>{/if}
+<input type="radio" name="{$name}" value="private" {if $val eq 'private' || (!$val && !$disabled)}checked="checked"{/if}
+       {if $disabled}disabled="disabled"{/if}/>
+{icon name="flag_red" title="privé"}
+{if $withtext}<span class="texte">privé</span>{/if}
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 857a3ef..36d9672 100644 (file)
@@ -51,7 +51,7 @@
   <tr>
     <td>
       <div style="margin-bottom: 0.2em" class="flags">
-        {include file="include/flags.radio.tpl" name="`$adpref`[pub]" notable=true val=$adr.pub display="div"}
+        {include file="include/flags.radio.tpl" name="`$adpref`[pub]" val=$adr.pub}
       </div>
       <div style="clear: both"></div>
       <div style="float: left">{include file="geoloc/form.address.tpl" name=$adpref id=$adid adr=$adr}</div>
index 952b01f..0939b09 100644 (file)
@@ -23,7 +23,7 @@
 {assign var=telpref value="`$adpref`[tel][`$t`]"}
 {assign var=telid value="`$adid`_tel_`$t`"}
 <div style="float: right" class="flags">
-  {include file="include/flags.radio.tpl" name="`$telpref`[pub]" val=$tel.pub display="div"}
+  {include file="include/flags.radio.tpl" name="`$telpref`[pub]" val=$tel.pub}
 </div>
 <span class="titre">N°{$t+1}</span>
 <input type="hidden" name="{$telpref}[removed]" value="0" />
index 3f57433..10cc795 100644 (file)
@@ -26,7 +26,9 @@
     voient <a class="popup2" href="profile/{$smarty.session.forlife}?view=public">n'importe quel internaute</a>,
     <a class="popup2" href="profile/{$smarty.session.forlife}?view=ax">l'AX</a> ou
     <a class="popup2" href="profile/{$smarty.session.forlife}">les X</a>.
-    {include file="include/flags.radio.tpl" notable=true disabled=true name="profile_ex_pub"}
+  </div>
+  <div class="flags">
+  {include file="include/flags.radio.tpl" disabled=true withtext=true name="profile_ex_pub"}
   </div>
   <div style="margin-top: 1em">
     {include file=$profile_page}
index b59614f..cd81282 100644 (file)
   <tr>
     <td>
       <div class="flags">
-        <div class="vert" style="float: left">
-          <input type="checkbox" name="medals_pub"{if $medals_pub eq 'public'} checked="checked"{/if} />
-        </div>
-        <div class="texte">
+        <input type="checkbox" name="medals_pub"{if $medals_pub eq 'public'} checked="checked"{/if} />
+        {icon name="flag_green" title="site public"}
+        <span class="texte">
           ces informations sont normalement publiques (JO, ...) mais tu peux choisir de les associer a ta fiche publique
-        </div>
+        </span>
       </div>
       <div style="clear: both; margin-top: 0.2em" id="medals">
         <select name="medal_sel" onchange="updateMedal()">
index 006b0a8..37ca92d 100644 (file)
@@ -25,9 +25,8 @@
   <tr>
     <th colspan="2">
       <div class="flags" style="float: left">
-        <span class="vert">
-          <input type="checkbox" disabled="disabled" checked="checked" />
-        </span>
+        <input type="checkbox" disabled="disabled" checked="checked" />
+        {icon name="flag_green" title="site public"}
       </div>
       Informations générales
     </th>
   </tr>
   <tr>
     <td class="flags">
-      <span class="orange">
-        <input type="checkbox" name="synchro_ax" {if $synchro_ax}checked="checked" {/if}/>
-      </span>
+      <input type="checkbox" name="synchro_ax" {if $synchro_ax}checked="checked" {/if}/>
+      {icon name="flag_orange" title="transmis à l'AX"}
       <span class="texte">
         Autoriser la synchronisation vers l'AX par des administrateurs ou des scripts automatiques.
       </span>
   <tr>
     <th colspan="2">
       <div class="flags" style="float: left">
-        <span class="vert"><input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/></span>
+        <input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/>
+        {icon name="flag_green" title="site public"}
       </div>
       Trombinoscope
     </th>
   <tr>
     <td>
       <span class="flags">
-        <span class="rouge">
         <input type="checkbox" checked="checked" disabled="disabled" />
-        </span>
+        {icon name="flag_red" title="privé"}
       </span>&nbsp;
       <span class="titre">Surnom</span>
     </td>
       <input type="text" size="18" maxlength="18" name="mobile"
              {if $errors.mobile}class="error"{/if} value="{$mobile}" />
       <span class="flags">
-        {include file="include/flags.radio.tpl" name="mobile_pub" notable="true" var=$mobile_pub display="div"}
+        {include file="include/flags.radio.tpl" name="mobile_pub" val=$mobile_pub}
       </span>
     </td>
   </tr>
   <tr>
     <td>
       <span class="flags">
-        <span class="vert">
         <input type="checkbox" name="web_pub" {if $web_pub eq 'public'}checked="checked"{/if} />
-        </span>
+        {icon name="flag_green" title="site public"}
       </span>&nbsp;
       <span class="titre">Page web Perso</span>
     </td>
     <td>
       <div>
         <span class="flags">
-          <span class="vert">
           <input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
-          </span>
+          {icon name="flag_green" title="site public"}
         </span>&nbsp;
         <span class="titre">Complément libre</span><br />
         <span class="comm">Commentaire ? ICQ ? etc...</span>
index 222e387..4f201a2 100644 (file)
@@ -24,7 +24,8 @@
   <tr>
     <th colspan="2">
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Informations polytechniciennes
     </th>
index 110768b..2ebfe7b 100644 (file)
@@ -39,7 +39,7 @@
     <tr>
       <th colspan="2" style="text-align: right">
         <div class="flags" style="float: left; text-align: left">
-          {include file="include/flags.radio.tpl" notable=true display="div" name="`$jobpref`[pub]" value=$job.pub}
+          {include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub}
         </div>
         Entreprise n°{$i+1}&nbsp;:
         <input type="text" {if $job.name_error}class="error"{/if} size="35" maxlength="100"
         <input type="text" size="30" maxlength="60" {if $job.email_error}class="error"{/if}
                name="{$jobpref}[email]" value="{$job.email}" />
         <span class="flags">
-          {include file="include/flags.radio.tpl" name="`$jobpref`[email_pub]" val=$job.mail_pub display="div"}
+          {include file="include/flags.radio.tpl" name="`$jobpref`[email_pub]" val=$job.mail_pub}
         </span>
       </td>
     </tr>
         <div style="float: left">
           <div class="titre">Adresse</div>
           <div class="flags">
-            {include file="include/flags.radio.tpl" name="`$jobpref`[adr][pub]" val=$job.adr.pub display="div"}
+            {include file="include/flags.radio.tpl" name="`$jobpref`[adr][pub]" val=$job.adr.pub}
           </div>
           <div style="margin-top: 20px; clear: both">
             {include file="geoloc/form.address.tpl" name="`$jobpref`[adr]" id="`$jobid`_adr" adr=$job.adr}
         <div style="float: right; width: 50%">
           <div class="titre">Téléphone</div>
           <div class="flags">
-            {include file="include/flags.radio.tpl" name="`$jobpref`[tel_pub]" val=$job.tel_pub display="div"}
+            {include file="include/flags.radio.tpl" name="`$jobpref`[tel_pub]" val=$job.tel_pub}
           </div>
           <table style="clear: both">
             <tr>
index 3a6dcea..759221d 100644 (file)
@@ -37,7 +37,8 @@
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesCV" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesCV" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Curriculum vitae
     </th>
index fdd48c2..7f56684 100644 (file)
@@ -40,7 +40,8 @@
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Pays dont tu connais bien la culture professionnelle
     </th>
@@ -73,7 +74,8 @@
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" value="privé"}
       </div>
       Secteurs d'activité dans lesquels tu as beaucoup exercé
     </th>
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Expérience et expertises que tu acceptes de faire partager
     </th>
index 0417470..28aba2b 100644 (file)
@@ -24,7 +24,8 @@
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Compétences professionnelles
     </th>
@@ -63,7 +64,8 @@
   <tr>
     <th>
       <div class="flags" style="float: left">
-        <span class="rouge"><input type="checkbox" name="accesX" checked="checked" disabled="disabled" /></span>
+        <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+        {icon name="flag_red" title="privé"}
       </div>
       Compétences linguistiques
     </th>
index b252158..e7732ab 100644 (file)
 <h1>Trombinoscope</h1>
 
 <form enctype="multipart/form-data" action="photo/change" method="post">
-  <table class="flags" cellspacing="0" summary="Flags">
-    <tr>
-      <td class="rouge"><input type="radio" checked="checked" /></td>
-      <td class="texte">privé</td>
-    </tr>
-  </table>
-
   {if ($session.promo ge 1995) || ($session.promo le 2002)}
   <p>
   Si tu n'as pas encore fourni de photo, c'est celle du trombinoscope de l'X qui est