Ejemplo n.º 1
0
    def _getHTMLHeader( self ):
        from MaKaC.webinterface.rh.base import RHModificationBaseProtected
        from MaKaC.webinterface.rh.admins import RHAdminBase

        area=""
        if isinstance(self._rh, RHModificationBaseProtected):
            area=i18nformat(""" - _("Management area")""")
        elif isinstance(self._rh, RHAdminBase):
            area=i18nformat(""" - _("Administrator area")""")

        info = HelperMaKaCInfo().getMaKaCInfoInstance()

        plugin_css = values_from_signal(signals.plugin.inject_css.send(self.__class__), as_list=True,
                                        multi_value_types=list)
        plugin_js = values_from_signal(signals.plugin.inject_js.send(self.__class__), as_list=True,
                                       multi_value_types=list)

        return wcomponents.WHTMLHeader().getHTML({
            "area": area,
            "baseurl": self._getBaseURL(),
            "conf": Config.getInstance(),
            "page": self,
            "extraCSS": map(self._fix_path, self.getCSSFiles() + plugin_css),
            "extraJSFiles": map(self._fix_path, self.getJSFiles() + plugin_js),
            "extraJS": self._extraJS,
            "language": session.lang or info.getLang(),
            "social": info.getSocialAppConfig(),
            "assets": self._asset_env
        })
Ejemplo n.º 2
0
    def _getHTMLHeader(self):
        from MaKaC.webinterface.rh.base import RHModificationBaseProtected
        from MaKaC.webinterface.rh.admins import RHAdminBase

        area = ""
        if self.MANAGEMENT or isinstance(self._rh,
                                         RHModificationBaseProtected):
            area = i18nformat(""" - _("Management area")""")
        elif isinstance(self._rh, RHAdminBase):
            area = i18nformat(""" - _("Administrator area")""")

        plugin_css = values_from_signal(signals.plugin.inject_css.send(
            self.__class__),
                                        as_list=True,
                                        multi_value_types=list)
        plugin_js = values_from_signal(signals.plugin.inject_js.send(
            self.__class__),
                                       as_list=True,
                                       multi_value_types=list)

        return wcomponents.WHTMLHeader().getHTML({
            "area":
            area,
            "baseurl":
            self._getBaseURL(),
            "conf":
            Config.getInstance(),
            "page":
            self,
            "printCSS":
            map(self._fix_path, self.getPrintCSSFiles()),
            "extraCSS":
            map(self._fix_path,
                self.getCSSFiles() + plugin_css + self.get_extra_css_files()),
            "extraJSFiles":
            map(self._fix_path,
                self.getJSFiles() + plugin_js),
            "language":
            session.lang or Config.getInstance().getDefaultLocale(),
            # XXX: Remove SOCIAL_ENABLED once this is moved out of ZODB
            "social":
            HelperMaKaCInfo().getMaKaCInfoInstance().getSocialAppConfig()
            if self.SOCIAL_ENABLED else {},
            "assets":
            self._asset_env
        })
Ejemplo n.º 3
0
def makoMigration(dbi, withRBDB, prevVersion):
    """
    Installing new TPLs for meeting/lecture styles
    """
    info = HelperMaKaCInfo().getMaKaCInfoInstance()
    sm = info.getStyleManager()
    try:
        del sm._stylesheets
    except:
        pass
    for lid in ['meeting', 'simple_event', 'conference']:
        l = sm._eventStylesheets[lid]
        if 'it' in l:
            l.remove('it')
        if 'administrative3' in l:
            l.remove('administrative3')
        sm._eventStylesheets[lid] = l
    styles = sm.getStyles()
    styles['xml'] = ('xml','XML.xsl',None)
    sm.setStyles(styles)
Ejemplo n.º 4
0
    def _getHTMLHeader(self):
        from MaKaC.webinterface.pages.conferences import WPConfSignIn
        from MaKaC.webinterface.pages.signIn import WPSignIn
        from MaKaC.webinterface.pages.registrationForm import WPRegistrationFormSignIn
        from MaKaC.webinterface.rh.base import RHModificationBaseProtected
        from MaKaC.webinterface.rh.admins import RHAdminBase

        area = ""
        if isinstance(self._rh, RHModificationBaseProtected):
            area = i18nformat(""" - _("Management area")""")
        elif isinstance(self._rh, RHAdminBase):
            area = i18nformat(""" - _("Administrator area")""")

        info = HelperMaKaCInfo().getMaKaCInfoInstance()
        websession = self._getAW().getSession()
        if websession:
            language = websession.getLang()
        else:
            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,
            "social":
            info.getSocialAppConfig()
        })