if obj.getAccredited(): after_icons += "<img src='++resource++bika.lims.images/accredited.png' title='%s'>" % ( _("Accredited")) if obj.getReportDryMatter(): after_icons += "<img src='++resource++bika.lims.images/dry.png' title='%s'>" % ( _("Can be reported as dry matter")) if obj.getAttachmentOption() == 'r': after_icons += "<img src='++resource++bika.lims.images/attach_reqd.png' title='%s'>" % ( _("Attachment required")) if obj.getAttachmentOption() == 'n': after_icons += "<img src='++resource++bika.lims.images/attach_no.png' title='%s'>" % ( _('Attachment not permitted')) if after_icons: items[x]['after']['Title'] = after_icons self.categories.sort() return items schema = ATFolderSchema.copy() class AnalysisServices(ATFolder): implements(IAnalysisServices) displayContentsTab = False schema = schema schemata.finalizeATCTSchema(schema, folderish=True, moveDiscussion=False) atapi.registerType(AnalysisServices, PROJECTNAME)
('getDateSampled', _('Date Sampled')), ('getProfilesTitle', _('Analysis Profiles')), ('getRequestID', _('Request ID')), ('getSampleID', _('Sample ID')), ('getSamplePointTitle', _('Sample Point')), ('getSampleTypeTitle', _('Sample Type')), ('review_state', _p('Review state')), )) security.declareProtected(View, 'results') def results(self, batch=True, b_start=0, b_size=None, sort_on=None, brains=False, catalog_name='bika_catalog'): """Get results""" if sort_on is None: sort_on = self.getSort_on() if b_size is None: b_size = self.getLimit() return self.getQuery(batch=batch, b_start=b_start, b_size=b_size, sort_on=sort_on, brains=brains, catalog_name='bika_catalog') schemata.finalizeATCTSchema(QuerySchema, folderish=False) atapi.registerType(Query, PROJECTNAME)
'Description']}, {'id':'all', 'title': _('All'), 'contentFilter':{}, 'columns': ['Title', 'Description']}, ] def folderitems(self): items = BikaListingView.folderitems(self) for x in range(len(items)): if not items[x].has_key('obj'): continue obj = items[x]['obj'] items[x]['Description'] = obj.Description() items[x]['replace']['Title'] = "<a href='%s'>%s</a>" % \ (items[x]['url'], items[x]['Title']) return items schema = ATFolderSchema.copy() class ContainerTypes(ATFolder): implements(IContainerTypes) displayContentsTab = False schema = schema schemata.finalizeATCTSchema(schema, folderish = True, moveDiscussion = False) atapi.registerType(ContainerTypes, PROJECTNAME)
('review_state', _p('Review state')), )) security.declareProtected(View, 'results') def results(self, batch=True, b_start=0, b_size=None, sort_on=None, brains=False, catalog_name='bika_catalog'): """Get results""" if sort_on is None: sort_on = self.getSort_on() if b_size is None: b_size = self.getLimit() return self.getQuery(batch=batch, b_start=b_start, b_size=b_size, sort_on=sort_on, brains=brains, catalog_name='bika_catalog') schemata.finalizeATCTSchema(QuerySchema, folderish=False) atapi.registerType(Query, PROJECTNAME)