From 38d87ed97a76d750f7e6c3e27acb695f3ac61c5f Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Thu, 10 Aug 2006 20:58:12 +0000 Subject: [PATCH] Remove the ugly "[Mettre a jour]" in banana git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@798 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/banana/banana.inc.php | 15 +++++++++++++++ templates/banana/index.tpl | 5 ----- templates/banana/profile.tpl | 4 +--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/banana/banana.inc.php b/modules/banana/banana.inc.php index 5fcc67a..6837e1e 100644 --- a/modules/banana/banana.inc.php +++ b/modules/banana/banana.inc.php @@ -41,6 +41,21 @@ function hook_shortcuts() 'Préférences')); } +function hook_browsingAction() +{ + global $platal, $banana; + $page = $banana->state['page']; + if ((@$page != 'message' && @$page != 'group' && @$page != 'forums') + || $banana->profile['autoup']) { + return null; + } + return '

' + . 'path . ', {"updateall": 1})\'>' + . 'Marquer tous les messages comme lus' + . '' + . '

'; +} + function hook_makeLink($params) { global $globals; $base = $globals->baseurl . '/banana'; diff --git a/templates/banana/index.tpl b/templates/banana/index.tpl index c8bae9e..dc54b99 100644 --- a/templates/banana/index.tpl +++ b/templates/banana/index.tpl @@ -20,12 +20,7 @@ {* *} {**************************************************************************} -{if !$banana->profile.autoup} -[Mettre à jour] -{/if} -
- {$banana_res|smarty:nodefaults} {* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/banana/profile.tpl b/templates/banana/profile.tpl index 4b707f7..f2cdfaa 100644 --- a/templates/banana/profile.tpl +++ b/templates/banana/profile.tpl @@ -20,9 +20,7 @@ {* *} {**************************************************************************} -{if !$banana->profile.autoup} -[Mettre à jour] -{/if} +
-- 2.1.4