コード例 #1
0
 def direct_to_link(self):
     direct_title = '%s %s' % (
         translate('Direct to', domain="plonetheme.onegov",
                   context=self.request).encode('utf8'),
         escape_html(self.context.Title()))
     return '<li class="directLink"><a aria="menuitem" href="{}">{}</a></li>'.format(
         self.url(self.context),
         direct_title)
コード例 #2
0
 def direct_to_link(self):
     direct_title = '%s %s' % (
         translate('Direct to', domain="plonetheme.onegov",
                   context=self.request).encode('utf8'),
         escape_html(self.context.Title()))
     return '<li class="directLink"><a href="{}">{}</a></li>'.format(
         self.url(self.context),
         direct_title)
コード例 #3
0
    def __call__(self):
        # Disable theming for ajax requests
        self.request.response.setHeader('X-Theme-Disabled', 'True')

        properties = getToolByName(self.context, 'portal_properties')
        self.view_action_types = properties.site_properties.getProperty(
            'typesUseViewActionInListings', ())

        self.sub_objs = self.sub_objects(self.context, level=0)
        children = []
        for obj in self.sub_objs:
            children.append('<li class="%s"><a aria="menuitem" href="%s">%s</a></li>' % (
                self.get_css_classes(obj),
                self.url(obj),
                escape_html(obj.Title())))

        return self.children_markup().format(**dict(
            direct_to = self.direct_to_link(),
            children = ''.join(children)))
コード例 #4
0
    def __call__(self):
        # Disable theming for ajax requests
        self.request.response.setHeader('X-Theme-Disabled', 'True')

        properties = getToolByName(self.context, 'portal_properties')
        self.view_action_types = properties.site_properties.getProperty(
            'typesUseViewActionInListings', ())

        self.sub_objs = self.sub_objects(self.context, level=0)
        children = []
        for obj in self.sub_objs:
            children.append('<li class="%s"><a href="%s">%s</a></li>' % (
                self.get_css_classes(obj),
                self.url(obj),
                escape_html(obj.Title())))

        return self.children_markup().format(**dict(
            direct_to = self.direct_to_link(),
            children = ''.join(children)))