parent::Prepare($page);
$res = XDB::query('SELECT date < DATE_SUB(NOW(), INTERVAL 365 DAY) AS is_profile_old,
- date AS profile_date, LENGTH(p.attach) > 0 AS photo
+ date AS profile_date, LENGTH(p.attach) > 0 AS has_photo
FROM auth_user_md5 AS u
LEFT JOIN photo AS p ON (u.user_id = p.uid)
WHERE user_id = {?}',
$page->assign('profile_incitation', $is_profile_old);
$page->assign('profile_last_update', $profile_date);
- $page->assign('photo_incitation', $has_photo);
+ $page->assign('photo_incitation', !$has_photo);
require_once 'geoloc.inc.php';
$res = localize_addresses($this->user->id());
$page->assign('geocoding_incitation', count($res));
-
- $page->assign('incitations_count',
- ($is_profile_old ? 1 : 0) +
- ($has_photo ? 0 : 1) +
- (count($res) > 0 ? 1 : 0));
}
public function template()
La dernière mise à jour de ta <a href="profile/{$smarty.session.hruid}" class="popup2">fiche</a>
date du {$profile_last_update|date_format}. Il est possible qu'elle ne soit pas à jour.
Si tu souhaites la modifier,
- <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/profile'); return false" style="text-decoration: none">
+ <a href="{$reminder->baseurl()}/profile" style="text-decoration: none">
clique ici !</a>
{elseif $photo_incitation}
- Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage. Clique
- <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/photo'); return false" style="text-decoration: none">
- ici</a> si tu souhaites en ajouter une.
+ Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage.
+ <a href="{$reminder->baseurl()}/photo" style="text-decoration: none">
+ Clique ici</a> si tu souhaites en ajouter une.
{elseif $geocoding_incitation > 0}
- Parmi tes adresses, il y en a {$geocoding_incitation} que nous n'avons pas pu localiser. Clique
- <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/geoloc'); return false" style="text-decoration: none">
- ici</a> pour rectifier.
+ Parmi tes adresses, il y en a {$geocoding_incitation} que nous n'avons pas pu localiser.
+ <a href="{$reminder->baseurl()}/geoloc" style="text-decoration: none">
+ Clique ici</a> pour rectifier.
{/if}
<div class="right">