def render_settingsLink(self, ctx, data): """ Add the URL of the settings page to the given tag. @see L{xmantissa.webnav.settingsLink} """ return settingsLink(self.translator, self.pageComponents.settings, ctx.tag)
def render_settingsLink(self, ctx, data): """ Add the URL of the settings page to the given tag. @see L{xmantissa.webnav.settingsLink} """ return settingsLink( self.translator, self.pageComponents.settings, ctx.tag)
def render_settingsLink(self, ctx, data): """ For authenticated users, add the URL of the settings page to the given tag. For unauthenticated users, remove the given tag from the output. """ if self.username is None: return '' translator = self._getViewerPrivateApplication() return settingsLink(translator, translator.getPageComponents().settings, ctx.tag)
def test_settingsLink(self): """ L{settingsLink} should add a link to the settings item supplied as a child of the tag supplied. """ self.storeID = 123 node = tags.span() tag = webnav.settingsLink(FakeTranslator(), self, node) self.assertEqual(tag.tagName, 'span') self.assertEqual(tag.children, ['/link/123'])
def test_settingsLink(self): """ L{settingsLink} should add a link to the settings item supplied as a child of the tag supplied. """ self.storeID = 123 node = tags.span() tag = webnav.settingsLink(FakeTranslator(), self, node) self.assertEqual(tag.tagName, "span") self.assertEqual(tag.children, ["/link/123"])
def render_settingsLink(self, ctx, data): """ For authenticated users, add the URL of the settings page to the given tag. For unauthenticated users, remove the given tag from the output. """ if self.username is None: return '' translator = self._getViewerPrivateApplication() return settingsLink( translator, translator.getPageComponents().settings, ctx.tag)