From ee12da4e14360ccd4fd9f7852570c5511c6fc568 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Thu, 4 Oct 2007 00:22:04 +0200 Subject: [PATCH] Because CSS sucks, I've been forced to hard code the flags for 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 --- htdocs/css/default.css | 17 ++------ htdocs/css/keynote.css | 17 ++------ htdocs/css/openweb.css | 17 ++------ modules/profile/page.inc.php | 2 +- templates/include/flags.radio.tpl | 77 +++++++--------------------------- templates/profile/adresses.address.tpl | 2 +- templates/profile/adresses.tel.tpl | 2 +- templates/profile/base.tpl | 4 +- templates/profile/deco.tpl | 9 ++-- templates/profile/general.tpl | 24 +++++------ templates/profile/groups.tpl | 3 +- templates/profile/jobs.job.tpl | 8 ++-- templates/profile/jobs.tpl | 3 +- templates/profile/mentor.tpl | 9 ++-- templates/profile/skill.tpl | 6 ++- templates/profile/trombino.tpl | 7 ---- 16 files changed, 64 insertions(+), 143 deletions(-) diff --git a/htdocs/css/default.css b/htdocs/css/default.css index 39d5aee..fa1589f 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -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{ diff --git a/htdocs/css/keynote.css b/htdocs/css/keynote.css index 725bc91..23f39a2 100644 --- a/htdocs/css/keynote.css +++ b/htdocs/css/keynote.css @@ -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{ diff --git a/htdocs/css/openweb.css b/htdocs/css/openweb.css index 8644bba..f723a8e 100644 --- a/htdocs/css/openweb.css +++ b/htdocs/css/openweb.css @@ -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{ diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index ec0ed62..a7dada8 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -121,7 +121,7 @@ class ProfileBool extends ProfileNoSave if (is_null($value)) { $value = @$page->values[$field]; } - return $value ? 1 : 0; + return $value ? "1" : ""; } } diff --git a/templates/include/flags.radio.tpl b/templates/include/flags.radio.tpl index 1c21d20..d8f3f8a 100644 --- a/templates/include/flags.radio.tpl +++ b/templates/include/flags.radio.tpl @@ -19,68 +19,19 @@ {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} {* *} {**************************************************************************} -{if $display eq "mini"} - - - - - - - - - -{elseif $display eq "div"} - - - - - - - - - -{else} - {if !$notable} - - - {/if} - - - - - - - - - - -
- - - site public - - - - transmis à l'AX - - - - privé - - Quelle couleur ?? -
- {if !$notable} - - - {/if} +{if $withtext} +Quelle couleur ? {/if} + +{icon name="flag_green" title="site public"} +{if $withtext}site public{/if} + +{icon name="flag_orange" title="transmis à l'AX"} +{if $withtext}transmis à l'AX{/if} + +{icon name="flag_red" title="privé"} +{if $withtext}privé{/if} {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/profile/adresses.address.tpl b/templates/profile/adresses.address.tpl index 857a3ef..36d9672 100644 --- a/templates/profile/adresses.address.tpl +++ b/templates/profile/adresses.address.tpl @@ -51,7 +51,7 @@
- {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}
{include file="geoloc/form.address.tpl" name=$adpref id=$adid adr=$adr}
diff --git a/templates/profile/adresses.tel.tpl b/templates/profile/adresses.tel.tpl index 952b01f..0939b09 100644 --- a/templates/profile/adresses.tel.tpl +++ b/templates/profile/adresses.tel.tpl @@ -23,7 +23,7 @@ {assign var=telpref value="`$adpref`[tel][`$t`]"} {assign var=telid value="`$adid`_tel_`$t`"}
- {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}
N°{$t+1} diff --git a/templates/profile/base.tpl b/templates/profile/base.tpl index 3f57433..10cc795 100644 --- a/templates/profile/base.tpl +++ b/templates/profile/base.tpl @@ -26,7 +26,9 @@ voient n'importe quel internaute, l'AX ou les X. - {include file="include/flags.radio.tpl" notable=true disabled=true name="profile_ex_pub"} + +
+ {include file="include/flags.radio.tpl" disabled=true withtext=true name="profile_ex_pub"}
{include file=$profile_page} diff --git a/templates/profile/deco.tpl b/templates/profile/deco.tpl index b59614f..cd81282 100644 --- a/templates/profile/deco.tpl +++ b/templates/profile/deco.tpl @@ -29,12 +29,11 @@
-
- -
-
+ + {icon name="flag_green" title="site public"} + ces informations sont normalement publiques (JO, ...) mais tu peux choisir de les associer a ta fiche publique -
+
- + + {icon name="flag_green" title="site public"}
Informations générales @@ -130,9 +129,8 @@ - - - + + {icon name="flag_orange" title="transmis à l'AX"} Autoriser la synchronisation vers l'AX par des administrateurs ou des scripts automatiques. @@ -159,7 +157,8 @@
- + + {icon name="flag_green" title="site public"}
Trombinoscope @@ -203,9 +202,8 @@ - - + {icon name="flag_red" title="privé"}   Surnom @@ -222,16 +220,15 @@ - {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} - - + {icon name="flag_green" title="site public"}   Page web Perso @@ -244,9 +241,8 @@
- - + {icon name="flag_green" title="site public"}   Complément libre
Commentaire ? ICQ ? etc... diff --git a/templates/profile/groups.tpl b/templates/profile/groups.tpl index 222e387..4f201a2 100644 --- a/templates/profile/groups.tpl +++ b/templates/profile/groups.tpl @@ -24,7 +24,8 @@
- + + {icon name="flag_red" title="privé"}
Informations polytechniciennes diff --git a/templates/profile/jobs.job.tpl b/templates/profile/jobs.job.tpl index 110768b..2ebfe7b 100644 --- a/templates/profile/jobs.job.tpl +++ b/templates/profile/jobs.job.tpl @@ -39,7 +39,7 @@
- {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}
Entreprise n°{$i+1} : - {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} @@ -117,7 +117,7 @@
Adresse
- {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}
{include file="geoloc/form.address.tpl" name="`$jobpref`[adr]" id="`$jobid`_adr" adr=$job.adr} @@ -126,7 +126,7 @@
Téléphone
- {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}
diff --git a/templates/profile/jobs.tpl b/templates/profile/jobs.tpl index 3a6dcea..759221d 100644 --- a/templates/profile/jobs.tpl +++ b/templates/profile/jobs.tpl @@ -37,7 +37,8 @@ diff --git a/templates/profile/mentor.tpl b/templates/profile/mentor.tpl index fdd48c2..7f56684 100644 --- a/templates/profile/mentor.tpl +++ b/templates/profile/mentor.tpl @@ -40,7 +40,8 @@ @@ -73,7 +74,8 @@ @@ -118,7 +120,8 @@ diff --git a/templates/profile/skill.tpl b/templates/profile/skill.tpl index 0417470..28aba2b 100644 --- a/templates/profile/skill.tpl +++ b/templates/profile/skill.tpl @@ -24,7 +24,8 @@ @@ -63,7 +64,8 @@ diff --git a/templates/profile/trombino.tpl b/templates/profile/trombino.tpl index b252158..e7732ab 100644 --- a/templates/profile/trombino.tpl +++ b/templates/profile/trombino.tpl @@ -24,13 +24,6 @@

Trombinoscope

-
- + + {icon name="flag_red" title="privé"}
Curriculum vitae
- + + {icon name="flag_red" title="privé"}
Pays dont tu connais bien la culture professionnelle
- + + {icon name="flag_red" value="privé"}
Secteurs d'activité dans lesquels tu as beaucoup exercé
- + + {icon name="flag_red" title="privé"}
Expérience et expertises que tu acceptes de faire partager
- + + {icon name="flag_red" title="privé"}
Compétences professionnelles
- + + {icon name="flag_red" title="privé"}
Compétences linguistiques
- - - - -
privé
- {if ($session.promo ge 1995) || ($session.promo le 2002)}

Si tu n'as pas encore fourni de photo, c'est celle du trombinoscope de l'X qui est -- 2.1.4