Beispiel #1
0
    def __init__(self, context, request, uids):
        self.uids = uids
        AnalysisServicesView.__init__(self, context, request)
        self.show_sort_column = False
        self.show_select_row = False
        self.show_select_column = False
        self.show_column_toggles = False
        self.context_actions = {}
        self.allow_edit = False
        self.pagesize = 999999
        self.contentFilter['UID'] = self.uids

        self.show_categories = True
        self.expand_all_categories = True
        self.ajax_categories = False

        self.columns = {
            'Title': {
                'title': _('Service'),
                'index': 'sortable_title'
            },
            'Price': {
                'title': _('Price')
            },
        }

        self.review_states = [{
            'id': 'default',
            'title': _('All'),
            'contentFilter': {},
            'columns': ['Title', 'Price']
        }]
Beispiel #2
0
    def folderitems(self):
        items = AnalysisServicesView.folderitems(self)
        out_items = []
        for x in range(len(items)):
            if not items[x].has_key('obj'):
                continue
            obj = items[x]['obj']
            items[x]['Price'] = "%s.%02d" % obj.Price
            items[x]['replace']['Title'] = "<a href='%s'>%s</a>" % (
                items[x]['url'], items[x]['Title'])
            out_items.append(items[x])

        return out_items