From 5a8a7dad52b11bee51d21887efcfe38050e28494 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 2 Nov 2011 16:55:56 +0100 Subject: [PATCH] Improves nl pages header for nl administrator. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/newsletter.inc.php | 10 ++++++++++ templates/newsletter/admin.tpl | 5 +---- templates/newsletter/index.tpl | 8 +------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 7f1975c..b9e51dc 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -574,6 +574,16 @@ class NewsLetter } } + /** Get links for nl pages. + */ + public function adminLinks() + { + return array( + 'index' => array('link' => $this->prefix(), 'title' => 'Archives'), + 'admin' => array('link' => $this->adminPrefix(), 'title' => 'Administrer') + ); + } + /** Hack used to remove "admin" links on X.org page on X.net * The 'admin' links are enabled for all pages, except for X.org when accessing NL through X.net */ diff --git a/templates/newsletter/admin.tpl b/templates/newsletter/admin.tpl index a5d2c03..4ad6c47 100644 --- a/templates/newsletter/admin.tpl +++ b/templates/newsletter/admin.tpl @@ -20,10 +20,7 @@ {* *} {**************************************************************************} - -

- {$nl->name} -

+{include file="newsletter/header.tpl" current="admin"}

Gérer les catégories d'articles diff --git a/templates/newsletter/index.tpl b/templates/newsletter/index.tpl index 79da294..f9fe9df 100644 --- a/templates/newsletter/index.tpl +++ b/templates/newsletter/index.tpl @@ -20,13 +20,7 @@ {* *} {**************************************************************************} - -

- {$nl->name} -{if $nl->mayEdit() && $nl->adminLinksEnabled()} - [Administrer] -{/if} -

+{include file="newsletter/header.tpl" current="index"} {if $nl->maySubmit()}

-- 2.1.4