From f871ad010a2549a6ef0d47524f19efd9ac5185bf Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Tue, 8 Nov 2011 15:20:16 +0100 Subject: [PATCH] [IMP] Added Facebook app id to all pages * Otherwise the site owner can't get global domain statistics; --- indico/MaKaC/webinterface/pages/base.py | 21 +++++++++++---------- indico/MaKaC/webinterface/tpls/HTMLHeader.tpl | 6 +++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/indico/MaKaC/webinterface/pages/base.py b/indico/MaKaC/webinterface/pages/base.py index e45be09dc..c86897a1a 100644 --- a/indico/MaKaC/webinterface/pages/base.py +++ b/indico/MaKaC/webinterface/pages/base.py @@ -145,23 +145,24 @@ class WPBase(OldObservable): elif isinstance(self._rh, RHAdminBase): area=i18nformat(""" - _("Administrator area")""") + info = HelperMaKaCInfo().getMaKaCInfoInstance() websession = self._getAW().getSession() if websession: language = websession.getLang() else: - info = HelperMaKaCInfo().getMaKaCInfoInstance() language = info.getLang() return wcomponents.WHTMLHeader().getHTML({ - "area": area, - "baseurl": self._getBaseURL(), - "conf": Config.getInstance(), - "page": self, - "extraCSS": self.getCSSFiles(), - "extraJSFiles": self.getJSFiles(), - "extraJS": self._extraJS, - "language": language - }) + "area": area, + "baseurl": self._getBaseURL(), + "conf": Config.getInstance(), + "page": self, + "extraCSS": self.getCSSFiles(), + "extraJSFiles": self.getJSFiles(), + "extraJS": self._extraJS, + "language": language, + "social": info.getSocialAppConfig() + }) def _getHTMLFooter( self ): return """ diff --git a/indico/MaKaC/webinterface/tpls/HTMLHeader.tpl b/indico/MaKaC/webinterface/tpls/HTMLHeader.tpl index 4e616b655..9ed8739c5 100644 --- a/indico/MaKaC/webinterface/tpls/HTMLHeader.tpl +++ b/indico/MaKaC/webinterface/tpls/HTMLHeader.tpl @@ -13,7 +13,11 @@ - + + +% if social.get('facebook', {}).get('appId', None): + +% endif