From: Pascal Corpet Date: Sat, 16 Jul 2005 20:21:19 +0000 (+0000) Subject: wish 329 and bug 328, amelioration de la gestion de la fiche publique X-Git-Tag: xorg/old~1 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a2e83100d97e988b3fd458ea3ba4e48d3a1c5110;p=platal.git wish 329 and bug 328, amelioration de la gestion de la fiche publique git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-763 --- diff --git a/htdocs/fiche.php b/htdocs/fiche.php index 9931089..671c2ae 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -75,8 +75,8 @@ if($user['x'] < 160){ } // manage the public fiche -$page->assign('logged', logged()); -if (!logged()) { +$page->assign('logged', logged() && !Env::has('public')); +if (!logged() || Env::has('public')) { // hide the orange status $user['promo_sortie'] = $user['promo'] + 3; if ($user['mobile_pub'] != 'public') $user['mobile'] = ''; @@ -141,7 +141,7 @@ foreach($user['adr_pro'] as $i=>$pro) { if ($pro['entreprise'] == '' && $pro['fonction'] == '' && $pro['secteur'] == '' && $pro['poste'] == '' && $pro['adr1'] == '' && $pro['adr2'] == '' && $pro['adr3'] == '' - && $pro['postcode'] == '' && $pro['city'] == '' && $pro['country'] == '' + && $pro['postcode'] == '' && $pro['city'] == '' && $pro['country'] == '00' && $pro['tel'] == '' && $pro['fax'] == '' && $pro['mobile'] == '' && $pro['email'] == '') unset($user['adr_pro'][$i]); diff --git a/include/user.func.inc.php b/include/user.func.inc.php index a90fcd3..9d02f5d 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -183,7 +183,7 @@ function &get_user_details($login, $from_uid = '') $sql = "SELECT e.entreprise, s.label as secteur , ss.label as sous_secteur , f.fonction_fr as fonction, e.poste, e.adr1, e.adr2, e.adr3, e.postcode, e.city, gp.pays AS countrytxt, gr.name AS region, e.tel, e.fax, e.mobile, e.entrid, - e.pub, e.tel_pub, e.email, e.email_pub, e.web + e.pub, e.adr_pub, e.tel_pub, e.email, e.email_pub, e.web FROM entreprises AS e LEFT JOIN emploi_secteur AS s ON(e.secteur = s.id) LEFT JOIN emploi_ss_secteur AS ss ON(e.ss_secteur = ss.id AND e.secteur = ss.secteur) diff --git a/templates/fiche.tpl b/templates/fiche.tpl index a886db2..3d1126d 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -34,7 +34,7 @@ function chgMainWinLoc( strPage ) {
{if $x.sexe}•{/if} {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if} - {min_auth level="cookie"} + {if $logged} {if $x.nickname} (aka {$x.nickname}){/if}  Afficher la carte de visite @@ -53,17 +53,17 @@ function chgMainWinLoc( strPage ) { admin {/perms} - {/min_auth} + {/if}
- {min_auth level="cookie"} + {if $logged}
Fiche mise à jour
le {$x.date|date_format}
- {/min_auth} - {if $logged || $c.mobile} + {/if} + {if $logged || $x.mobile}
- {min_auth level="cookie"} + {if $logged} - {/min_auth} + {/if}
{if $x.mobile}Mobile : {$x.mobile}
{/if}
@@ -97,20 +97,20 @@ function chgMainWinLoc( strPage ) { {if $x.applis_join}  - Formation : {$x.applis_join|smarty:nodefaults} {/if} - {min_auth level="cookie"} + {if $logged} {if $x.is_referent} [Ma fiche référent] {/if} - {/min_auth} + {/if}
{if $photo_url}Photo de {$x.forlife}{/if} - {min_auth level="cookie"} + {if $logged} {if $x.section}
Section : {$x.section}
{/if} {if $x.binets_join}
Binet(s) : {$x.binets_join}
{/if} {if $x.gpxs_join}
Groupe(s) X : {$x.gpxs_join|smarty:nodefaults}
{/if} - {/min_auth} + {/if} {if $x.web}
Site Web : {$x.web}
{/if} {if $x.freetext}
Commentaires :
{$x.freetext|nl2br}
{/if} @@ -165,7 +165,7 @@ function chgMainWinLoc( strPage ) { {/if} - {min_auth level="cookie"} + {if $logged} {if $x.cv} @@ -174,7 +174,7 @@ function chgMainWinLoc( strPage ) { {/if} - {/min_auth} + {/if} diff --git a/templates/include/emploi.tpl b/templates/include/emploi.tpl index 9f7b197..0392a81 100644 --- a/templates/include/emploi.tpl +++ b/templates/include/emploi.tpl @@ -20,10 +20,10 @@ {* *} {**************************************************************************} {if $address.entreprise || $address.secteur || $address.fonction || - $address.poste || $address.fonction} + $address.poste || $address.fonction || $address.email || $address.web}
- {if $address.entreprise} + {if $address.entreprise || $address.web} diff --git a/templates/profil.tpl b/templates/profil.tpl index 5c9cecd..6367def 100644 --- a/templates/profil.tpl +++ b/templates/profil.tpl @@ -29,8 +29,9 @@

{$e}

{/foreach} -

Tu peux consulter l'état actuel de ta fiche -tel qu'elle apparaîtra pour un camarade.

+

Tu peux consulter l'état actuel de ta fiche +tel qu'elle apparaîtra pour un camarade, +ou tel qu'elle apparaîtra à tout le monde.

Ent/Org: {$address.entreprise}{if $address.web} [site]{/if}