From 6795ed86cd992c35a28c7a98c39d83ea8250279e Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 16 Sep 2006 16:34:40 +0000 Subject: [PATCH] gross hack to reinstate NL navigation git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@842 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/newsletter.inc.php | 11 ++++++----- templates/newsletter/show.tpl | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 79c70d7..b7bba9c 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -234,15 +234,16 @@ class NewsLetter // }}} // {{{ function toHtml() - function toHtml($prenom,$nom,$sexe,$body=false) + function toHtml($prenom, $nom, $sexe, $body=false, $urlprefix = false) { + $u = $urlprefix ? 'nl/show/'.$this->_id : ''; $res = '
'.$this->title().'
'; $head = $this->head(); $head = str_replace('', $sexe ? 'Chère' : 'Cher', $head); $head = str_replace('', $prenom, $head); $head = str_replace('', $nom, $head); - $head = enriched_to_text($head,true); + $head = enriched_to_text($head, true); if($head) { $res .= "
$head
"; @@ -251,9 +252,9 @@ class NewsLetter $i = 1; $res .= ""; foreach ($this->_arts as $cid=>$arts) { - $res .= "
$i. {$this->_cats[$cid]}"; + $res .= "
$i. {$this->_cats[$cid]}"; foreach ($arts as $art) { - $res .= "  - ".htmlentities($art->title()).""; + $res .= "  - ".htmlentities($art->title()).""; } $res .= '
'; $i ++; @@ -263,7 +264,7 @@ class NewsLetter $res .= "

".$this->_cats[$cid].'

'; foreach($arts as $art) { $res .= $art->toHtml(); - $res .= "

Revenir au sommaire

"; + $res .= "

Revenir au sommaire

"; } } diff --git a/templates/newsletter/show.tpl b/templates/newsletter/show.tpl index ec4b76e..6dce87a 100644 --- a/templates/newsletter/show.tpl +++ b/templates/newsletter/show.tpl @@ -49,10 +49,11 @@ {if $smarty.get.text} -
{$nl->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)}
+
{$nl->toText($smarty.session.prenom, $smarty.session.nom, $smarty.session.femme)}
{else}
- {$nl->toHtml($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults} + {$nl->toHtml($smarty.session.prenom, $smarty.session.nom, $smarty.session.femme, + false, true)|smarty:nodefaults}
{/if} -- 2.1.4